diff --git a/modules/artic/minion/main.nf b/modules/artic/minion/main.nf index af74b132..22a6fd87 100644 --- a/modules/artic/minion/main.nf +++ b/modules/artic/minion/main.nf @@ -13,7 +13,8 @@ process ARTIC_MINION { path sequencing_summary path ("primer-schemes/${scheme}/V${scheme_version}/${scheme}.reference.fasta") path ("primer-schemes/${scheme}/V${scheme_version}/${scheme}.scheme.bed") - path medaka_model + path medaka_model_file + val medaka_model_string val scheme val scheme_version @@ -44,7 +45,7 @@ process ARTIC_MINION { if (args.tokenize().contains('--medaka')) { fast5 = "" summary = "" - model = file(medaka_model).exists() ? "--medaka-model ./$medaka_model" : "--medaka-model $medaka_model" + model = medaka_model_file ? "--medaka-model ./$medaka_model_file" : "--medaka-model $medaka_model_string" } def hd5_plugin_path = task.ext.hd5_plugin_path ? "export HDF5_PLUGIN_PATH=" + task.ext.hd5_plugin_path : "export HDF5_PLUGIN_PATH=/usr/local/lib/python3.6/site-packages/ont_fast5_api/vbz_plugin" """ diff --git a/modules/artic/minion/meta.yml b/modules/artic/minion/meta.yml index 5ef55673..c0f97a0c 100644 --- a/modules/artic/minion/meta.yml +++ b/modules/artic/minion/meta.yml @@ -42,11 +42,16 @@ input: bed files containing coordinates of each primer in the scheme, relative to the reference genome pattern: "*.{scheme.bed}" - - medaka_model: + - medaka_model_file: type: file description: | - Medaka model to use (if option --medaka is set) - pattern: "*.*" + Medaka model file to use (if option --medaka is set) + pattern: "*.hdf5" + - medaka_model_string: + type: value + description: | + Medaka model string to use (if option --medaka is set) + pattern: "*" - scheme: type: value description: Name of the primer scheme diff --git a/modules/ivar/variants/main.nf b/modules/ivar/variants/main.nf index 85c4cacd..b86042f0 100644 --- a/modules/ivar/variants/main.nf +++ b/modules/ivar/variants/main.nf @@ -10,6 +10,7 @@ process IVAR_VARIANTS { input: tuple val(meta), path(bam) path fasta + path fai path gff val save_mpileup diff --git a/modules/ivar/variants/meta.yml b/modules/ivar/variants/meta.yml index 6677ffb2..4d09e449 100644 --- a/modules/ivar/variants/meta.yml +++ b/modules/ivar/variants/meta.yml @@ -25,6 +25,10 @@ input: type: file description: The reference sequence used for mapping and generating the BAM file pattern: "*.fa" + - fai: + type: file + description: The index for the reference sequence used for mapping and generating the BAM file + pattern: "*.fai" - gff: type: file description: A GFF file in the GFF3 format can be supplied to specify coordinates of open reading frames (ORFs). In absence of GFF file, amino acid translation will not be done. diff --git a/tests/modules/artic/minion/main.nf b/tests/modules/artic/minion/main.nf index ca66ede0..3bda2ffc 100644 --- a/tests/modules/artic/minion/main.nf +++ b/tests/modules/artic/minion/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { UNTAR } from '../../../../modules/untar/main.nf' +include { UNTAR } from '../../../../modules/untar/main.nf' include { ARTIC_MINION } from '../../../../modules/artic/minion/main.nf' workflow test_artic_minion { @@ -15,9 +15,8 @@ workflow test_artic_minion { sequencing_summary = file(params.test_data['sarscov2']['nanopore']['test_sequencing_summary'], checkIfExists: true) fasta = file('https://github.com/artic-network/primer-schemes/raw/master/nCoV-2019/V3/nCoV-2019.reference.fasta', checkIfExists: true) bed = file('https://github.com/artic-network/primer-schemes/raw/master/nCoV-2019/V3/nCoV-2019.primer.bed', checkIfExists: true) - dummy_file = [] fast5_dir = UNTAR ( fast5_tar ).untar - ARTIC_MINION ( input, fast5_dir, sequencing_summary, fasta, bed, dummy_file, 'nCoV-2019', '3') + ARTIC_MINION ( input, fast5_dir, sequencing_summary, fasta, bed, [], '', 'nCoV-2019', '3') } diff --git a/tests/modules/ivar/variants/main.nf b/tests/modules/ivar/variants/main.nf index 96835c60..2d8e77c5 100644 --- a/tests/modules/ivar/variants/main.nf +++ b/tests/modules/ivar/variants/main.nf @@ -11,10 +11,11 @@ workflow test_ivar_variants_no_gff_no_mpileup { file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - gff = [] + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + gff = [] save_mpileup = false - IVAR_VARIANTS ( input, fasta, gff, save_mpileup ) + IVAR_VARIANTS ( input, fasta, fai, gff, save_mpileup ) } workflow test_ivar_variants_no_gff_with_mpileup { @@ -24,10 +25,11 @@ workflow test_ivar_variants_no_gff_with_mpileup { file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - gff = [] + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + gff = [] save_mpileup = true - IVAR_VARIANTS ( input, fasta, gff, save_mpileup ) + IVAR_VARIANTS ( input, fasta, fai, gff, save_mpileup ) } workflow test_ivar_variants_with_gff_with_mpileup { @@ -37,8 +39,9 @@ workflow test_ivar_variants_with_gff_with_mpileup { file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) save_mpileup = true - IVAR_VARIANTS ( input, fasta, gff, save_mpileup ) + IVAR_VARIANTS ( input, fasta, fai, gff, save_mpileup ) }