compute GC fraction from genbank (automate the process for other organisms)
yseif opened this issue · comments
Yara commented
def getGC_content(genbank_file):
for seqrecord in SeqIO.parse(genbank_file, 'genbank'):
sequence = str(seqrecord.seq)
GC_fraction = (sequence.count('G')+sequence.count('C'))/float(sequence.count('G')+sequence.count('C')+sequence.count('T')+sequence.count('A'))
return GC_fraction