File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ process ADAPTER_TRIM {
1515 def fq1_base = fastq_1. toString(). tokenize(' .' )[0 ]
1616 def fq2_base = fastq_2. toString(). tokenize(' .' )[0 ]
1717 """
18- total_threads=${ task.cpus}
1918 set -euo pipefail
19+ export TMPDIR=${ task.workDir}
20+ total_threads=${ task.cpus}
2021 trim_galore \
2122 --paired \
2223 --illumina \
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ process STAR_ALIGNMENT_WASP {
1313 script:
1414 """
1515 set -euo pipefail
16-
16+ export TMPDIR= ${ task.workDir }
1717 STAR \\
1818 --runMode alignReads \\
1919 --runThreadN ${ task.cpus} \\
@@ -25,6 +25,7 @@ process STAR_ALIGNMENT_WASP {
2525 --readFilesCommand zcat \\
2626 --outSAMtype BAM SortedByCoordinate \\
2727 --outSAMunmapped Within \\
28+ --outTmpDir ${ task.workDir} \\
2829 --outFileNamePrefix ${ meta.sampleid} . \\
2930 --outFilterMultimapNmax 20 \\
3031 --alignSJoverhangMin 8 \\
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ process ALLELE_COUNT{
1212 script:
1313 """
1414 set -euo pipefail
15+
16+ export TMPDIR=${ task.workDir}
1517
1618 [[ -f "${ reference_fa} .fai" ]] || samtools faidx ${ reference_fa}
1719
Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ process STAR_GENOME_INDEX {
99 script:
1010 """
1111 set -euo pipefail
12+ export TMPDIR=${ task.workDir}
1213
1314 mkdir -p STAR_INDEX
1415
1516 STAR --runMode genomeGenerate \\
1617 --runThreadN ${ task.cpus} \\
1718 --genomeDir STAR_INDEX \\
1819 --genomeFastaFiles ${ ref_fa} \\
19- --sjdbGTFfile ${ gtf}
20+ --sjdbGTFfile ${ gtf} \\
21+ --outTmpDir ${ task.workDir}
2022 """
2123}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ process REPORT {
1010
1111 script:
1212 """
13+ export TMPDIR=${ task.workDir}
1314 multiqc --no-ai .
1415 """
1516}
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ process SUBSET_1KGP_VCF {
99
1010 script:
1111 """
12+ export TMPDIR=${ task.workDir}
13+
1214 total_threads=${ task.cpus}
1315
1416 threads_per_job=\$ (( total_threads > 4 ? 4 : total_threads ))
@@ -54,7 +56,7 @@ process SUBSET_1KGP_VCF {
5456 } > list.txt
5557
5658 bcftools concat -f list.txt -Ou \\
57- | bcftools sort --temp-dir ./ -Ov -o ${ meta.sampleid} .1KGP.snps.het.vcf
59+ | bcftools sort --temp-dir ${ task.workDir } -Ov -o ${ meta.sampleid} .1KGP.snps.het.vcf
5860 else
5961 echo "Phased VCF dir is empty. Creating empty output files."
6062 touch ${ meta.sampleid} .1KGP.snps.het.vcf
You can’t perform that action at this time.
0 commit comments