文章详情
时间:2009-04-05 来源:blackjimmy
import string def Compute_GC (seq): GC = 0 total =0 for i in range(0, len(seq)): if string.upper(seq[i]) in ['A','T','G','C']: total = total +1 if string.upper(seq[i]) in ['G', 'C']: GC = GC+1 return float(GC)/total*100 seq = 'atcgAATTTCCGGGGTTAATCAGNNNtgGT' print 'GC percent of %s %2.2f%%' % (seq,Compute_GC(seq))
辰域智控app
网医联盟app
汇丰汇选App
1970-01-01