Skip to content

Commit

Permalink
fix: forget to lowercase the record tx_id when restranding
Browse files Browse the repository at this point in the history
  • Loading branch information
mlorthiois committed Jan 13, 2024
1 parent 3a39e48 commit 925f1b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/filter_gtf_ndr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 925f1b7

Please sign in to comment.