comparison gene_identification.py @ 92:b869a126e2c4 draft

Uploaded
author davidvanzessen
date Mon, 06 Jun 2016 08:26:54 -0400
parents 0fdd90f7c654
children 53fb2948726e
comparison
equal deleted inserted replaced
91:5e237c243088 92:b869a126e2c4
158 chunksInCA = len(compiledregex["ca"]) 158 chunksInCA = len(compiledregex["ca"])
159 chunksInCG = len(compiledregex["cg"]) 159 chunksInCG = len(compiledregex["cg"])
160 chunksInCM = len(compiledregex["cm"]) 160 chunksInCM = len(compiledregex["cm"])
161 requiredChunkPercentage = 0.7 161 requiredChunkPercentage = 0.7
162 varsInCA = float(len(ca1.keys()) * 2) 162 varsInCA = float(len(ca1.keys()) * 2)
163 varsInCG = float(len(cg1.keys()) * 2) - 1 # -1 because the sliding window doesn't hit the first nt twice 163 varsInCG = float(len(cg1.keys()) * 2) - 2 # -1 because the sliding window doesn't hit the first nt twice
164 varsInCM = 0 164 varsInCM = 0
165 requiredVarPercentage = 0.7 165
166 166
167 167
168 first = True 168 first = True
169 seq_write_count=0 169 seq_write_count=0
170 with open(infile, 'r') as f: #read all sequences into a dictionary as key = ID, value = sequence 170 with open(infile, 'r') as f: #read all sequences into a dictionary as key = ID, value = sequence