Module 8

GC content

A classic biological calculation.

GC content

GC content is the percentage of bases that are G or C. It is one of the most common calculations in bioinformatics.

Python
seq = "ATGCGCAT"
g = seq.count("G")
c = seq.count("C")
gc = (g + c) / len(seq) * 100
print(gc)
50.0
ATGCGCAT
G + C = 4
/ 8 · 50%
Your task

Compute GC content

  • Compute and print the GC content of ATGCGCAT.