Skip to content

Commit f82799f

Browse files
committed
Update bam_functions.py
1 parent 68e5429 commit f82799f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/smftools/informatics/bam_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,8 @@ def extract_readnames_from_bam(aligned_BAM, samtools_backend: str | None = "auto
13691369
for line in samtools_view.stdout:
13701370
if not line.strip():
13711371
continue
1372-
output_file.write(f"{line.split('\\t', 1)[0]}\n")
1372+
qname = line.split("\t", 1)[0]
1373+
output_file.write(f"{qname}\n")
13731374
rc = samtools_view.wait()
13741375
if rc != 0:
13751376
stderr = samtools_view.stderr.read() if samtools_view.stderr else ""

0 commit comments

Comments
 (0)