diff --git a/conf/modules.config b/conf/modules.config index 20a6c17..f6045e5 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -281,7 +281,7 @@ process { } withName: MALT_RUN { - ext.args = { "${meta.db_params}" } + ext.args = { "${meta.db_params} -m ${params.malt_mode}" } // one run with multiple samples, so fix ID to just db name to ensure clean log name ext.prefix = { "${meta.db_name}" } publishDir = [ @@ -457,6 +457,13 @@ process { } withName: MOTUS_PROFILE { + ext.args = { + [ + params.motus_remove_ncbi_ids ? "" : "-p", + params.motus_use_relative_abundance ? "" : "-c", + params.motus_save_mgc_read_counts ? "-M ${task.ext.prefix}.mgc" : "" + ].join(',').replaceAll(','," ") + } ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } publishDir = [ path: { "${params.outdir}/motus/${meta.db_name}/" }, diff --git a/conf/test.config b/conf/test.config index 016eb2e..898743e 100644 --- a/conf/test.config +++ b/conf/test.config @@ -52,6 +52,7 @@ params { process { withName: MALT_RUN { maxForks = 1 + ext.args = { "-m ${params.malt_mode} -J-Xmx12G" } } withName: MEGAN_RMA2INFO_TSV { maxForks = 1 diff --git a/conf/test_motus.config b/conf/test_motus.config index a077dad..ee41447 100644 --- a/conf/test_motus.config +++ b/conf/test_motus.config @@ -44,5 +44,8 @@ params { run_diamond = false run_krakenuniq = false run_motus = true + motus_save_mgc_read_counts = false + motus_remove_ncbi_ids = false + motus_use_relative_abundance = false run_profile_standardisation = true } diff --git a/conf/test_nopreprocessing.config b/conf/test_nopreprocessing.config index 9a51320..1a36159 100644 --- a/conf/test_nopreprocessing.config +++ b/conf/test_nopreprocessing.config @@ -46,5 +46,6 @@ params { process { withName: MALT_RUN { maxForks = 1 + ext.args = { "-m ${params.malt_mode} -J-Xmx12G" } } } diff --git a/conf/test_nothing.config b/conf/test_nothing.config index 47976df..b95deb4 100644 --- a/conf/test_nothing.config +++ b/conf/test_nothing.config @@ -45,5 +45,6 @@ params { process { withName: MALT_RUN { maxForks = 1 + ext.args = { "-m ${params.malt_mode} -J-Xmx12G" } } } diff --git a/conf/test_pep.config b/conf/test_pep.config index 762ebb3..6ce788d 100644 --- a/conf/test_pep.config +++ b/conf/test_pep.config @@ -37,6 +37,7 @@ params { process { withName: MALT_RUN { maxForks = 1 + ext.args = { "-m ${params.malt_mode} -J-Xmx12G" } } withName: MEGAN_RMA2INFO { maxForks = 1 diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy index 7883d70..02d4347 100755 --- a/lib/WorkflowMain.groovy +++ b/lib/WorkflowMain.groovy @@ -12,9 +12,9 @@ class WorkflowMain { // TODO nf-core: Add Zenodo DOI for pipeline after first release //"* The pipeline\n" + //" https://doi.org/10.5281/zenodo.XXXXXXX\n\n" + - "* The nf-core framework\n" + - " https://doi.org/10.1038/s41587-020-0439-x\n\n" + - "* Software dependencies\n" + + '* The nf-core framework\n' + + ' https://doi.org/10.1038/s41587-020-0439-x\n\n' + + '* Software dependencies\n' + " https://github.com/${workflow.manifest.name}/blob/master/CITATIONS.md" } @@ -53,15 +53,15 @@ class WorkflowMain { System.exit(0) } + // Print parameter summary log to screen + + log.info paramsSummaryLog(workflow, params, log) + // Validate workflow parameters via the JSON schema if (params.validate_params) { NfcoreSchema.validateParameters(workflow, params, log) } - // Print parameter summary log to screen - - log.info paramsSummaryLog(workflow, params, log) - // Check that a -profile or Nextflow config has been provided to run the pipeline NfcoreTemplate.checkConfigProvided(workflow, log) @@ -90,4 +90,5 @@ class WorkflowMain { } return null } + } diff --git a/modules.json b/modules.json index a7c63e6..f2b6da8 100644 --- a/modules.json +++ b/modules.json @@ -111,7 +111,7 @@ }, "malt/run": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "6d9712f03ec2de8264a50ee4541a617e1e063b51" }, "megan/rma2info": { "branch": "master", diff --git a/modules/nf-core/malt/run/main.nf b/modules/nf-core/malt/run/main.nf index 2b91d90..2e75b4c 100644 --- a/modules/nf-core/malt/run/main.nf +++ b/modules/nf-core/malt/run/main.nf @@ -2,14 +2,13 @@ process MALT_RUN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::malt=0.41" : null) + conda (params.enable_conda ? "bioconda::malt=0.61" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/malt:0.41--1' : - 'quay.io/biocontainers/malt:0.41--1' }" + 'https://depot.galaxyproject.org/singularity/malt:0.61--hdfd78af_0' : + 'quay.io/biocontainers/malt:0.61--hdfd78af_0' }" input: tuple val(meta), path(fastqs) - val mode path index output: @@ -38,7 +37,6 @@ process MALT_RUN { -o . \\ $args \\ --inFile ${fastqs.join(' ')} \\ - -m $mode \\ --index $index/ |&tee ${prefix}-malt-run.log cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/malt/run/meta.yml b/modules/nf-core/malt/run/meta.yml index 66f2d7a..8fa1958 100644 --- a/modules/nf-core/malt/run/meta.yml +++ b/modules/nf-core/malt/run/meta.yml @@ -28,10 +28,6 @@ input: type: file description: Input FASTQ files pattern: "*.{fastq.gz,fq.gz}" - - mode: - type: string - description: Program mode - pattern: "Unknown|BlastN|BlastP|BlastX|Classifier" - index: type: directory description: Index/database directory from malt-build diff --git a/nextflow.config b/nextflow.config index 721a21c..3cf160d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -145,7 +145,10 @@ params { diamond_save_reads = false // this will override default diamond output format so no taxonomic profile is generated! added directly to module in profiling.nf // mOTUs - run_motus = false + run_motus = false + motus_use_relative_abundance = false + motus_remove_ncbi_ids = false + motus_save_mgc_read_counts = false // krona run_krona = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 28d5446..ae4e311 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -464,6 +464,18 @@ "type": "boolean", "fa_icon": "fas fa-toggle-on", "description": "Turn on profiling with mOTUs. Requires database to be present CSV file passed to --databases" + }, + "motus_use_relative_abundance": { + "type": "boolean", + "description": "Turn on printing relative abundance instead of counts." + }, + "motus_save_mgc_read_counts": { + "type": "boolean", + "description": "Turn on saving the mgc reads count." + }, + "motus_remove_ncbi_ids": { + "type": "boolean", + "description": "Turn on removing NCBI taxonomic IDs." } }, "fa_icon": "fas fa-align-center" diff --git a/subworkflows/local/profiling.nf b/subworkflows/local/profiling.nf index 5256951..b8eb086 100644 --- a/subworkflows/local/profiling.nf +++ b/subworkflows/local/profiling.nf @@ -97,7 +97,7 @@ workflow PROFILING { db: it[2] } - MALT_RUN ( ch_input_for_malt.reads, params.malt_mode, ch_input_for_malt.db ) + MALT_RUN ( ch_input_for_malt.reads, ch_input_for_malt.db ) ch_maltrun_for_megan = MALT_RUN.out.rma6 .transpose()