comparison gene_identification.py @ 28:c0ecc31829bd draft

Uploaded
author davidvanzessen
date Wed, 07 Dec 2016 08:17:09 -0500
parents 69baebd10e54
children
comparison
equal deleted inserted replaced
27:69baebd10e54 28:c0ecc31829bd
104 for i in range(0, len(searchstrings["cm"]) - chunklength, chunklength / 2): 104 for i in range(0, len(searchstrings["cm"]) - chunklength, chunklength / 2):
105 compiledregex["cm"].append((re.compile(searchstrings["cm"][i:i+chunklength]), False)) 105 compiledregex["cm"].append((re.compile(searchstrings["cm"][i:i+chunklength]), False))
106 106
107 for i in range(0, len(searchstrings["ce"]) - chunklength + 1, chunklength / 2): 107 for i in range(0, len(searchstrings["ce"]) - chunklength + 1, chunklength / 2):
108 compiledregex["ce"].append((re.compile(searchstrings["ce"][i:i+chunklength]), False)) 108 compiledregex["ce"].append((re.compile(searchstrings["ce"][i:i+chunklength]), False))
109
110 print "ce chunks", len(compiledregex["ce"])
111
112 109
113 def removeAndReturnMaxIndex(x): #simplifies a list comprehension 110 def removeAndReturnMaxIndex(x): #simplifies a list comprehension
114 m = max(x) 111 m = max(x)
115 index = x.index(m) 112 index = x.index(m)
116 x[index] = 0 113 x[index] = 0