Skip to content

Commit 45f51d1

Browse files
committed
Corrected a parsing routine that could break in special cases.
1 parent fd86820 commit 45f51d1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

SNPgrabber.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def TCStoDict(tcs_file, minqual):
2727

2828
for lines in tcs:
2929
name = re.match('^\w*', lines).group(0) # Contig name
30-
quals = re.split(' *', re.search('\|.{16}\|', lines).
31-
group(0)[2:-2].strip())
30+
quals = lines.split("|")[3].split()
31+
3232
SNP = ''
3333
for q, b in zip(quals[:-1], ['A', 'C', 'G', 'T']):
3434
try:

0 commit comments

Comments
 (0)