Skip to content

Commit

Permalink
fix: batch size issue in sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Schubach committed Jul 25, 2024
1 parent d5cd2f6 commit 487ba8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workflow/rules/assignment.smk
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ rule assignment_collectBCs:
output:
"results/assignment/{assignment}/barcodes_incl_other.sorted.tsv.gz",
params:
batch_size=getSplitNumber(),
batch_size="--batch-size=%d" % getSplitNumber() if getSplitNumber() > 1 else "",
conda:
"../envs/default.yaml"
log:
temp("results/logs/assignment/collectBCs.{assignment}.log"),
shell:
"""
export LC_ALL=C # speed up sort
sort -S 7G --batch-size={params.batch_size} --parallel={threads} -k1,1 -k2,2 -k3,3 -m {input} | \
sort -S 7G {params.batch_size} --parallel={threads} -k1,1 -k2,2 -k3,3 -m {input} | \
gzip -c > {output} 2> {log}
"""

Expand Down

0 comments on commit 487ba8c

Please sign in to comment.