SBRG / ecolime

Data and tools necessary to construct iJL1678b-ME, a genome-scale model of E. coli K-12 MG1655 metabolism and expression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compute GC fraction from genbank (automate the process for other organisms)

yseif opened this issue · comments

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