From 925f1b7de9d22ff74dfc31d9ceafd1ea3e8703ae Mon Sep 17 00:00:00 2001 From: mlorthiois Date: Sat, 13 Jan 2024 16:03:21 +0100 Subject: [PATCH] fix: forget to lowercase the record tx_id when restranding --- bin/filter_gtf_ndr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/filter_gtf_ndr.py b/bin/filter_gtf_ndr.py index 7811daa..673e749 100755 --- a/bin/filter_gtf_ndr.py +++ b/bin/filter_gtf_ndr.py @@ -122,8 +122,9 @@ def filter_count_matrix(file, transcripts, wr): with open("unformat.novel.filter.gtf", "w") as wr: for record in GTF.parse_by_line(args.gtf): - if "transcript_id" in record and record["transcript_id"].lower() in filter: - record.strand = strand_dict[record["transcript_id"]] + tx_id = record["transcript_id"].lower() + if "transcript_id" in record and tx_id in filter: + record.strand = strand_dict[tx_id] print(record, file=wr) with open("counts_transcript.filter.txt", "w") as wr: