#!/usr/bin/env python
import re
import string
 
def main():
    file = open("chry_multiplied.fa","r")
    a = 0
    t = 0
    g = 0
    c = 0
    for line in file:
        if not line.startswith(">"):
            g += line.count("G")
            c += line.count("C")
            a += line.count("A")
            t += line.count("T")
    totalBaseCount = a + t + c + g
    gcCount = g + c
    gcFraction = float(gcCount) / totalBaseCount
    print( gcFraction * 100 )
 
if __name__ == '__main__':
    main()

@@ -172,31 +172,78 @@
  if 
-not line.startswith(%22%3E%22
+line%5B0%5D != '%3E' and (line%5B0%5D != %22N%22 or len(line) != line.count(%22N%22) + 1
 ):%0A 

Update gc