diff --git a/config/softwares.config b/config/softwares.config index 2b568cf..6151fb4 100644 --- a/config/softwares.config +++ b/config/softwares.config @@ -27,7 +27,7 @@ process { container = 'quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0' } withLabel: 'hisat2' { - container = 'quay.io/biocontainers/hisat2:2.2.1--hdbdd923_6' + container = 'quay.io/biocontainers/hisat2:2.2.2--h503566f_0' } withLabel: 'kallisto' { container = 'quay.io/biocontainers/kallisto:0.48.0--h0d531b0_1' diff --git a/modules/bash.nf b/modules/bash.nf index c84a985..2d35604 100644 --- a/modules/bash.nf +++ b/modules/bash.nf @@ -187,6 +187,9 @@ process check_aligner_params{ tag "${meta.uid}" publishDir "${params.outdir}/${outpath}", pattern: "*.txt", mode: 'copy' + // improve cache + cache 'lenient' // or 'deep' depending needs + input: tuple val(meta), path(fastq) val aligner_list diff --git a/modules/hisat2.nf b/modules/hisat2.nf index 8124255..845326c 100644 --- a/modules/hisat2.nf +++ b/modules/hisat2.nf @@ -26,6 +26,8 @@ process hisat2 { label 'hisat2' tag "${meta.uid}" publishDir "${params.outdir}/${outpath}", pattern: "*.txt", mode: 'copy' + // use a local tmp + scratch true input: tuple val(meta), path(reads) @@ -50,14 +52,22 @@ process hisat2 { // alignment if (meta.paired) { """ + # To avoid /tmp not mounted in Singularity container + export TMPDIR=\$PWD/tmp + mkdir -p \$TMPDIR + hisat2 ${hisat2_options} --novel-splicesite-outfile ${fileName}_splicesite.txt \\ - --new-summary --summary-file ${fileName}_sorted_summary.txt \\ + --new-summary --summary-file ${fileName}_sorted_summary.txt --temp-directory \$TMPDIR \\ -p ${task.cpus} -x $index_basename -1 ${reads[0]} -2 ${reads[1]} > ${fileName}.sam """ } else { """ + # To avoid /tmp not mounted in Singularity container + export TMPDIR=\$PWD/tmp + mkdir -p \$TMPDIR + hisat2 ${hisat2_options} --novel-splicesite-outfile ${fileName}_splicesite.txt \\ - --new-summary --summary-file ${fileName}_sorted_summary.txt \\ + --new-summary --summary-file ${fileName}_sorted_summary.txt --temp-directory \$TMPDIR \\ -p ${task.cpus} -x $index_basename -U $reads > ${fileName}.sam """ }