From b97877cb9f869e2861e0515327c4f663b9df322d Mon Sep 17 00:00:00 2001 From: hiruna534 Date: Fri, 27 Dec 2024 14:47:28 +1100 Subject: [PATCH] use pi aux tag too to filter split reads --- src/reform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reform.py b/src/reform.py index a9f18db..7841b8f 100644 --- a/src/reform.py +++ b/src/reform.py @@ -85,7 +85,7 @@ def run(args): with pysam.AlignmentFile(args.bam, "rb", check_sq=False) as bam: for sam_record in bam: len_seq = len(sam_record.get_forward_sequence()) - kmer_length + 1 # to get the number of kmers - if sam_record.has_tag("sp"): + if sam_record.has_tag("sp") or sam_record.has_tag("pi"): count_split_reads += 1 continue if sam_record.has_tag("dx") and int(sam_record.get_tag("dx")) == 1: