Commit 3c5edeb2 authored by van den Berg's avatar van den Berg
Browse files

Use local tmp folder as java tempdir

This fixes a rare bug where picard runs out of disk space on when spilling
reads to disk, because it uses the internal java temp dir as a location. This
closes issue #42
parent 1155ac47
Pipeline #3129 failed with stages
in 2 minutes and 2 seconds
......@@ -283,13 +283,14 @@ rule align:
r1 = "{sample}/pre_process/{sample}.cutadapt_R1.fastq",
r2 = "{sample}/pre_process/{sample}.cutadapt_R2.fastq",
temp = ancient("tmp")
tmp = ancient("tmp")
rg = "@RG\\tID:{sample}_lib1\\tSM:{sample}\\tPL:ILLUMINA"
output: temp("{sample}/bams/{sample}.sorted.bam")
singularity: "docker://"
shell: "bwa mem -t 8 -R '{params.rg}' {input.ref} {input.r1} {input.r2} "
"| picard -Xmx4G SortSam CREATE_INDEX=TRUE TMP_DIR={input.temp} "
"| picard -Xmx4G{input.tmp} SortSam "
"INPUT=/dev/stdin OUTPUT={output} SORT_ORDER=coordinate"
rule markdup:
......@@ -302,7 +303,8 @@ rule markdup:
bai = "{sample}/bams/{sample}.markdup.bai",
metrics = "{sample}/bams/{sample}.markdup.metrics"
singularity: "docker://"
shell: "picard -Xmx4G MarkDuplicates CREATE_INDEX=TRUE TMP_DIR={input.tmp} "
shell: "picard -Xmx4G{input.tmp} MarkDuplicates "
"INPUT={input.bam} OUTPUT={output.bam} "
"METRICS_FILE={output.metrics} "
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment