Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the intermediate files written during SplitBamByCellBarcodes from BAM to SAM #79

Merged
merged 2 commits into from
Jul 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/sctools/bam.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,8 @@ def write_barcodes_to_bins(
for i in range(len(bins)):
out_bam_name = os.path.join(f"{dirname}", f"{dirname}_{i}.bam")
filepaths.append(out_bam_name)
# For now, bam writing uses one thread for compression. Better logic could support more processes without
# starving the machine for resources
open_bam = pysam.AlignmentFile(
out_bam_name, "wb", template=input_alignments
)

open_bam = pysam.AlignmentFile(out_bam_name, "w", template=input_alignments)
files.append(open_bam)

# Loop over input; check each tag in priority order and partition barcodes into files based
Expand Down