From 934d984dabdbc7680f07e278ee92a43c985366e5 Mon Sep 17 00:00:00 2001 From: chenminicode <34672883+chenminicode@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:31:25 +0800 Subject: [PATCH] Update assign_multimappers.py Write the last read that can't be processed in the for loop. --- src/assign_multimappers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/assign_multimappers.py b/src/assign_multimappers.py index fed90b75..a9763887 100755 --- a/src/assign_multimappers.py +++ b/src/assign_multimappers.py @@ -71,3 +71,8 @@ def parse_args(): # First read in file current_reads.append(line) current_qname = read_elems[0] + + # Write last read + if len(current_reads) > 0 and len(current_reads) <= alignment_cutoff: + for read in current_reads: + sys.stdout.write(str(read))