Skip to content

Commit

Permalink
make sure that tmp file is unique - this truncates the file when mult…
Browse files Browse the repository at this point in the history
…iple processes access it
  • Loading branch information
riasc committed Mar 13, 2024
1 parent b9d050a commit 39cf845
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions workflow/rules/align.smk
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,10 @@ rule rnaseq_postproc_markdup:
shell:
"""
samtools sort -@4 -m4G -O BAM -T tmp/ {input.bam} \
-o tmp/sorted.bam > {log} 2>&1
samtools markdup -r -@4 tmp/sorted.bam {output} > {log} 2>&1
rm tmp/sorted.bam
-o tmp/rnaseq_fixmate_sorted_{wildcards.sample}_{wildcards.group}.bam > {log} 2>&1
samtools markdup -r -@4 tmp/rnaseq_fixmate_sorted_{wildcards.sample}_{wildcards.group}.bam \
{output} > {log} 2>&1
rm tmp/rnaseq_fixmate_sorted_{wildcards.sample}_{wildcards.group}.bam
"""

rule postproc_bam_index:
Expand Down

0 comments on commit 39cf845

Please sign in to comment.