comparison gene_identification.py @ 27:69baebd10e54 draft

Uploaded
author davidvanzessen
date Wed, 07 Dec 2016 05:30:33 -0500
parents ce25fb581ca3
children c0ecc31829bd
comparison
equal deleted inserted replaced
26:ce25fb581ca3 27:69baebd10e54
102 compiledregex["cg"].append((re.compile(result), varsInResult)) 102 compiledregex["cg"].append((re.compile(result), varsInResult))
103 103
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, 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"])
109 111
110 112
111 def removeAndReturnMaxIndex(x): #simplifies a list comprehension 113 def removeAndReturnMaxIndex(x): #simplifies a list comprehension
112 m = max(x) 114 m = max(x)
113 index = x.index(m) 115 index = x.index(m)