comparison SAINT_preprocessing.py @ 10:1b0547d3c7bc draft

Uploaded
author bornea
date Tue, 29 Mar 2016 14:46:04 -0400
parents 019e60bd3f7f
children b688d0dae86b
comparison
equal deleted inserted replaced
9:d6a427973fe4 10:1b0547d3c7bc
130 if ">sp" in data_line: 130 if ">sp" in data_line:
131 namer = data_line.split("|")[2] 131 namer = data_line.split("|")[2]
132 if uniprot_accession_in == data_line.split("|")[1]: 132 if uniprot_accession_in == data_line.split("|")[1]:
133 match = count + 1 133 match = count + 1
134 if 'GN=' in data_line: 134 if 'GN=' in data_line:
135 lst = data_linedata_line.split('GN=') 135 lst = data_line.split('GN=')
136 lst2 = lst[1].split(' ') 136 lst2 = lst[1].split(' ')
137 genename = lst2[0] 137 genename = lst2[0]
138 if 'GN=' not in data_line: 138 if 'GN=' not in data_line:
139 genename = 'NA' 139 genename = 'NA'
140 while ">sp" not in data_lines[match]: 140 while ">sp" not in data_lines[match]:
142 seqlength = seqlength + len(data_lines[match].strip()) 142 seqlength = seqlength + len(data_lines[match].strip())
143 match = match + 1 143 match = match + 1
144 else: 144 else:
145 break 145 break
146 return ReturnValue1(seqlength, genename) 146 return ReturnValue1(seqlength, genename)
147 elif uniprot_accession_in == namer.split(" ")[0]: 147 if uniprot_accession_in == namer.split(" ")[0]:
148 match = count + 1 148 match = count + 1
149 # Ensures consistent spacing throughout. 149 # Ensures consistent spacing throughout.
150 if 'GN=' in data_line: 150 if 'GN=' in data_line:
151 lst = data_line.split('GN=') 151 lst = data_line.split('GN=')
152 lst2 = lst[1].split(' ') 152 lst2 = lst[1].split(' ')