Skip to content

Instantly share code, notes, and snippets.

@lgliducik
Created November 1, 2012 07:31
Show Gist options
  • Save lgliducik/3992323 to your computer and use it in GitHub Desktop.
Save lgliducik/3992323 to your computer and use it in GitHub Desktop.
вот
f = open("test_7.txt",'r')
count_GC = 0
str_ = []
while 1:
str1 = f.readline()
if str1 == "":
print str_[-1],count_GC
break
str2 = f.readline()
temp1 = str2
if str2 == "": break
while temp1[0]!='>':
temp1 = f.readline()
str2 = str2 + temp1
if temp1 == "":
temp1 = '>'
print str1,str2
count_next = float(str2.count("G")+str2.count("C"))/float(len(str2))
if count_GC < count_next:
count_GC = count_next
str_.append(str1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment