From 02e9df3ad173262f903ef7f35aba740b16f616a6 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Wed, 21 Sep 2022 11:32:19 +1200 Subject: [PATCH] alignpairedend and ngsfilter: ids of original sequences are now kept --- python/obitools3/commands/alignpairedend.pyx | 4 ++++ python/obitools3/commands/ngsfilter.pyx | 4 ++++ src/.gitignore | 1 + 3 files changed, 9 insertions(+) diff --git a/python/obitools3/commands/alignpairedend.pyx b/python/obitools3/commands/alignpairedend.pyx index 07c822c..1762fa1 100755 --- a/python/obitools3/commands/alignpairedend.pyx +++ b/python/obitools3/commands/alignpairedend.pyx @@ -233,6 +233,10 @@ def run(config): PyErr_CheckSignals() consensus = o_view[i] + + if two_views: + consensus[b"R1_parent"] = forward[i].id + consensus[b"R2_parent"] = reverse[i].id if not two_views: seqF = entries[i] diff --git a/python/obitools3/commands/ngsfilter.pyx b/python/obitools3/commands/ngsfilter.pyx index e7356e9..2c1b42c 100755 --- a/python/obitools3/commands/ngsfilter.pyx +++ b/python/obitools3/commands/ngsfilter.pyx @@ -264,6 +264,10 @@ cdef tuple annotate(sequences, infos, no_tags, verbose=False): not_aligned = len(sequences) > 1 sequences[0] = sequences[0].clone() + + if not_aligned: + sequences[0][b"R1_parent"] = sequences[0].id + sequences[0][b"R2_parent"] = sequences[1].id if not_aligned: sequences[1] = sequences[1].clone() diff --git a/src/.gitignore b/src/.gitignore index 1296339..9eeb4b5 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -3,3 +3,4 @@ /cmake_install.cmake /libcobitools3.dylib /Makefile +/build/