Patch fix artic/minion and ivar/variants modules (#1326)

This commit is contained in:
Harshil Patel 2022-02-18 17:36:09 +00:00 committed by GitHub
parent d0a1cbb703
commit cab399507b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 14 deletions

View file

@ -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"
"""

View file

@ -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

View file

@ -10,6 +10,7 @@ process IVAR_VARIANTS {
input:
tuple val(meta), path(bam)
path fasta
path fai
path gff
val save_mpileup

View file

@ -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.

View file

@ -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')
}

View file

@ -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)
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)
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)
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 )
}