ngsfilter: unidentified sequences are now stored untrimmed
This commit is contained in:
@ -58,7 +58,7 @@ def addOptions(parser):
|
|||||||
metavar="<URI>",
|
metavar="<URI>",
|
||||||
type=str,
|
type=str,
|
||||||
default=None,
|
default=None,
|
||||||
help="URI to the view used to store the sequences unassigned to any sample")
|
help="URI to the view used to store the sequences unassigned to any sample. Those sequences are untrimmed.")
|
||||||
|
|
||||||
group.add_argument('--no-tags',
|
group.add_argument('--no-tags',
|
||||||
action="store_true", dest="ngsfilter:notags",
|
action="store_true", dest="ngsfilter:notags",
|
||||||
@ -646,7 +646,13 @@ def run(config):
|
|||||||
o_view[g].set(oseq.id, oseq.seq, definition=oseq.definition, quality=oseq.quality, tags=oseq)
|
o_view[g].set(oseq.id, oseq.seq, definition=oseq.definition, quality=oseq.quality, tags=oseq)
|
||||||
g+=1
|
g+=1
|
||||||
elif unidentified is not None:
|
elif unidentified is not None:
|
||||||
unidentified[u].set(oseq.id, oseq.seq, definition=oseq.definition, quality=oseq.quality, tags=oseq)
|
# Untrim sequences (put original back)
|
||||||
|
if len(modseq) > 1:
|
||||||
|
oseq[REVERSE_SEQUENCE_COLUMN] = reverse[i].seq
|
||||||
|
oseq[REVERSE_QUALITY_COLUMN] = reverse[i].quality
|
||||||
|
unidentified[u].set(oseq.id, forward[i].seq, definition=oseq.definition, quality=forward[i].quality, tags=oseq)
|
||||||
|
else:
|
||||||
|
unidentified[u].set(oseq.id, entries[i].seq, definition=oseq.definition, quality=entries[i].quality, tags=oseq)
|
||||||
u+=1
|
u+=1
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
if unidentified is not None:
|
if unidentified is not None:
|
||||||
|
Reference in New Issue
Block a user