Skip to content

Commit

Permalink
Changed the intermediate files written during SplitBamByCellBarcodes …
Browse files Browse the repository at this point in the history
…from BAM to SAM (#79)

* changed the intermediate bam file writing of the SplitBam command to simply sam

* changed the intermediate bam file writing of the SplitBam command to simply sam
  • Loading branch information
kishorikonwar committed Jul 28, 2020
1 parent 0a8c4df commit f82f789
Showing 1 changed file with 2 additions and 5 deletions.
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

0 comments on commit f82f789

Please sign in to comment.