diff --git a/python/obitools3/commands/ngsfilter.pyx b/python/obitools3/commands/ngsfilter.pyx index 7f4598f..89371e0 100644 --- a/python/obitools3/commands/ngsfilter.pyx +++ b/python/obitools3/commands/ngsfilter.pyx @@ -58,7 +58,7 @@ def addOptions(parser): metavar="", type=str, 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', 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) g+=1 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 except Exception, e: if unidentified is not None: