ngsfilter: made more robust and practical to use with empty tags
This commit is contained in:
3
python/obitools3/parsers/ngsfilter.pyx
Executable file → Normal file
3
python/obitools3/parsers/ngsfilter.pyx
Executable file → Normal file
@ -57,6 +57,9 @@ def ngsfilterIterator(lineiterator,
|
||||
split_line = line.split()
|
||||
tags = split_line.pop(2)
|
||||
tags = tags.split(b":")
|
||||
for t_idx in range(2):
|
||||
if tags[t_idx]==b"-" or tags[t_idx]==b"None" or tags[t_idx]==b"":
|
||||
tags[t_idx] = nastring
|
||||
if len(tags) == 1: # Forward and reverse tags are the same
|
||||
tags.append(tags[0])
|
||||
split_line.insert(2, tags[0])
|
||||
|
Reference in New Issue
Block a user