diff --git a/conf/modules.config b/conf/modules.config index 1558a98..9c61999 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -145,7 +145,7 @@ process { publishDir = [ path: { "${params.outdir}/filtlong" }, mode: params.publish_dir_mode, - pattern: '*.fastq.gz', + pattern: '*.{fastq.gz,log}', enabled: params.save_preprocessed_reads ] } @@ -347,6 +347,7 @@ process { } withName: CENTRIFUGE_KREPORT { + errorStrategy = {task.exitStatus == 255 ? 'ignore' : 'retry'} ext.args = { "${meta.db_params}" } ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } publishDir = [ @@ -386,7 +387,7 @@ process { publishDir = [ path: { "${params.outdir}/diamond/${meta.db_name}" }, mode: params.publish_dir_mode, - pattern: '*.{blast,xml,txt,daa,sam,tsv,paf}' + pattern: '*.{blast,xml,txt,daa,sam,tsv,paf,log}' ] } diff --git a/modules.json b/modules.json index 9291fad..33c0c10 100644 --- a/modules.json +++ b/modules.json @@ -22,13 +22,13 @@ "git_sha": "d2726fcf75063960f06b36d2229a4c0966614108" }, "centrifuge/kreport": { - "git_sha": "be4ae28c3c95b3c4047a7d9fb4cb0ed749631cea" + "git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838" }, "custom/dumpsoftwareversions": { "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" }, "diamond/blastx": { - "git_sha": "bd3bfe0817246082525ab93707976676b1fe208b" + "git_sha": "3531824af826c16cd252bc5aa82ae169b244ebaa" }, "fastp": { "git_sha": "d0a1cbb703a130c19f6796c3fce24fbe7dfce789" diff --git a/modules/nf-core/modules/centrifuge/kreport/main.nf b/modules/nf-core/modules/centrifuge/kreport/main.nf index 124cbdb..381ddd6 100644 --- a/modules/nf-core/modules/centrifuge/kreport/main.nf +++ b/modules/nf-core/modules/centrifuge/kreport/main.nf @@ -8,7 +8,7 @@ process CENTRIFUGE_KREPORT { 'quay.io/biocontainers/centrifuge:1.0.4_beta--h9a82719_6' }" input: - tuple val(meta), path(results) + tuple val(meta), path(report) path db output: @@ -23,7 +23,7 @@ process CENTRIFUGE_KREPORT { def prefix = task.ext.prefix ?: "${meta.id}" """ db_name=`find -L ${db} -name "*.1.cf" -not -name "._*" | sed 's/.1.cf//'` - centrifuge-kreport -x \$db_name ${results} > ${prefix}.txt + centrifuge-kreport -x \$db_name ${report} > ${prefix}.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/modules/centrifuge/kreport/meta.yml b/modules/nf-core/modules/centrifuge/kreport/meta.yml index fbcae24..822a280 100644 --- a/modules/nf-core/modules/centrifuge/kreport/meta.yml +++ b/modules/nf-core/modules/centrifuge/kreport/meta.yml @@ -15,9 +15,9 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - results: + - report: type: file - description: File containing the centrifuge classification results + description: File containing the centrifuge classification report pattern: "*.{txt}" output: diff --git a/modules/nf-core/modules/diamond/blastx/main.nf b/modules/nf-core/modules/diamond/blastx/main.nf index d327227..1f4ff25 100644 --- a/modules/nf-core/modules/diamond/blastx/main.nf +++ b/modules/nf-core/modules/diamond/blastx/main.nf @@ -21,6 +21,7 @@ process DIAMOND_BLASTX { tuple val(meta), path('*.sam') , optional: true, emit: sam tuple val(meta), path('*.tsv') , optional: true, emit: tsv tuple val(meta), path('*.paf') , optional: true, emit: paf + tuple val(meta), path("*.log") , emit: log path "versions.yml" , emit: versions when: @@ -54,7 +55,10 @@ process DIAMOND_BLASTX { --query $fasta \\ --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.${out_ext} + --out ${prefix}.${out_ext} \\ + --log + + mv diamond.log ${prefix}.log cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/modules/diamond/blastx/meta.yml b/modules/nf-core/modules/diamond/blastx/meta.yml index 2dcd7bc..327b893 100644 --- a/modules/nf-core/modules/diamond/blastx/meta.yml +++ b/modules/nf-core/modules/diamond/blastx/meta.yml @@ -70,7 +70,12 @@ output: type: file description: File containing software versions pattern: "versions.yml" + - log: + type: file + description: Log file containing stdout information + pattern: "*.{log}" authors: - "@spficklin" - "@jfy133" + - "@mjamy" diff --git a/subworkflows/local/profiling.nf b/subworkflows/local/profiling.nf index 8625751..9d87b41 100644 --- a/subworkflows/local/profiling.nf +++ b/subworkflows/local/profiling.nf @@ -148,7 +148,7 @@ workflow PROFILING { } CENTRIFUGE_CENTRIFUGE ( ch_input_for_centrifuge.reads, ch_input_for_centrifuge.db, params.centrifuge_save_reads, params.centrifuge_save_reads, params.centrifuge_save_reads ) - CENTRIFUGE_KREPORT (CENTRIFUGE_CENTRIFUGE.out.results, ch_input_for_centrifuge.db) + CENTRIFUGE_KREPORT (CENTRIFUGE_CENTRIFUGE.out.report, ch_input_for_centrifuge.db) ch_versions = ch_versions.mix( CENTRIFUGE_CENTRIFUGE.out.versions.first() ) ch_raw_classifications = ch_raw_classifications.mix( CENTRIFUGE_CENTRIFUGE.out.results ) ch_raw_profiles = ch_raw_profiles.mix( CENTRIFUGE_KREPORT.out.kreport ) @@ -208,6 +208,7 @@ workflow PROFILING { DIAMOND_BLASTX ( ch_input_for_diamond.reads, ch_input_for_diamond.db, ch_diamond_reads_format , [] ) ch_versions = ch_versions.mix( DIAMOND_BLASTX.out.versions.first() ) ch_raw_profiles = ch_raw_profiles.mix( DIAMOND_BLASTX.out.tsv ) + ch_multiqc_files = ch_multiqc_files.mix( DIAMOND_BLASTX.out.log ) }