diff --git a/modules/nf-core/mitohifi/mitohifi/environment.yml b/modules/nf-core/mitohifi/mitohifi/environment.yml deleted file mode 100644 index bcd3a8b1c632..000000000000 --- a/modules/nf-core/mitohifi/mitohifi/environment.yml +++ /dev/null @@ -1,4 +0,0 @@ -channels: - - conda-forge - - bioconda - - defaults diff --git a/modules/nf-core/mitohifi/mitohifi/main.nf b/modules/nf-core/mitohifi/mitohifi/main.nf index de9b3fd39b0e..7f2bc2a058af 100644 --- a/modules/nf-core/mitohifi/mitohifi/main.nf +++ b/modules/nf-core/mitohifi/mitohifi/main.nf @@ -10,6 +10,7 @@ process MITOHIFI_MITOHIFI { tuple val(meta), path(input) path ref_fa path ref_gb + val input_mode val mito_code output: @@ -41,13 +42,11 @@ process MITOHIFI_MITOHIFI { } def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - if (! ["-c", "-r"].contains(args2)) { - error "-r for reads or -c for contigs must be specified" + if (! ["c", "r"].contains(input_mode)) { + error "r for reads or c for contigs must be specified" } - def script_input = "${args2} ${input}" """ - mitohifi.py ${script_input} \\ + mitohifi.py -${input_mode} ${input} \\ -f ${ref_fa} \\ -g ${ref_gb} \\ -o ${mito_code} \\ diff --git a/modules/nf-core/mitohifi/mitohifi/meta.yml b/modules/nf-core/mitohifi/mitohifi/meta.yml index a4f1658a3b3e..bd80dc27234a 100644 --- a/modules/nf-core/mitohifi/mitohifi/meta.yml +++ b/modules/nf-core/mitohifi/mitohifi/meta.yml @@ -25,6 +25,10 @@ input: type: file description: Reference annotation pattern: "*.{gb}" + - input_mode: + type: string + description: Specifies type of input - reads or contigs + pattern: "{r,c}" - code: type: integer description: Mitochndrial code for annotation diff --git a/tests/modules/nf-core/mitohifi/mitohifi/main.nf b/tests/modules/nf-core/mitohifi/mitohifi/main.nf index afbc5759848d..f5a0a95c6b76 100644 --- a/tests/modules/nf-core/mitohifi/mitohifi/main.nf +++ b/tests/modules/nf-core/mitohifi/mitohifi/main.nf @@ -12,8 +12,9 @@ workflow test_mitohifi_mitohifi_contigs { data_contigs = Channel.of([[id:"ilDeiPorc1"],file(params.test_data['deilephila_porcellus']['mito']['contigs'], checkIfExists: true)]) ref_gb = file(params.test_data['deilephila_porcellus']['mito']['ref_gb'], checkIfExists: true) ref_fa = file(params.test_data['deilephila_porcellus']['mito']['ref_fa'], checkIfExists: true) + input_mode = Channel.of('c') code = 5 - MITOHIFI_MITOHIFI_CONTIGS ( data_contigs, ref_fa, ref_gb, code ) + MITOHIFI_MITOHIFI_CONTIGS ( data_contigs, ref_fa, ref_gb, input_mode, code ) } @@ -24,6 +25,7 @@ workflow test_mitohifi_mitohifi_reads { data_reads = Channel.of([[id:"ilDeiPorc1"],file(params.test_data['deilephila_porcellus']['mito']['hifi_reads'], checkIfExists: true)]) ref_gb = file(params.test_data['deilephila_porcellus']['mito']['ref_gb'], checkIfExists: true) ref_fa = file(params.test_data['deilephila_porcellus']['mito']['ref_fa'], checkIfExists: true) + input_mode = Channel.of('r') code = 5 - MITOHIFI_MITOHIFI_READS ( data_reads, ref_fa, ref_gb, code ) + MITOHIFI_MITOHIFI_READS ( data_reads, ref_fa, ref_gb, input_mode, code ) } diff --git a/tests/modules/nf-core/mitohifi/mitohifi/nextflow.config b/tests/modules/nf-core/mitohifi/mitohifi/nextflow.config index b0144acc668b..94a611a79f74 100644 --- a/tests/modules/nf-core/mitohifi/mitohifi/nextflow.config +++ b/tests/modules/nf-core/mitohifi/mitohifi/nextflow.config @@ -1,11 +1,5 @@ process { - withName: MITOHIFI_MITOHIFI_CONTIGS { - ext.args2 = '-c' - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - } - - withName: MITOHIFI_MITOHIFI_READS { - ext.args2 = '-r' + withName: MITOHIFI_MITOHIFI { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } }