mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Remove params call in ivar variants module (#1203)
* Remove params call in ivar variants module * Update main.nf
This commit is contained in:
parent
598d7abdb2
commit
b4c6b430d0
3 changed files with 31 additions and 27 deletions
|
@ -11,6 +11,7 @@ process IVAR_VARIANTS {
|
|||
tuple val(meta), path(bam)
|
||||
path fasta
|
||||
path gff
|
||||
val save_mpileup
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.tsv") , emit: tsv
|
||||
|
@ -21,14 +22,14 @@ process IVAR_VARIANTS {
|
|||
def args = task.ext.args ?: ''
|
||||
def args2 = task.ext.args2 ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : ""
|
||||
def features = params.gff ? "-g $gff" : ""
|
||||
def features = gff ? "-g $gff" : ""
|
||||
def mpileup = save_mpileup ? "tee ${prefix}.mpileup |" : ""
|
||||
"""
|
||||
samtools mpileup \\
|
||||
$args2 \\
|
||||
--reference $fasta \\
|
||||
$bam | \\
|
||||
$save_mpileup \\
|
||||
$mpileup \\
|
||||
ivar variants \\
|
||||
$args \\
|
||||
$features \\
|
||||
|
|
|
@ -29,6 +29,9 @@ input:
|
|||
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.
|
||||
patter: "*.gff"
|
||||
- save_mpileup:
|
||||
type: boolean
|
||||
description: Save mpileup file generated by ivar variants
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
|
|
|
@ -5,40 +5,40 @@ nextflow.enable.dsl = 2
|
|||
include { IVAR_VARIANTS } from '../../../../modules/ivar/variants/main.nf'
|
||||
|
||||
workflow test_ivar_variants_no_gff_no_mpileup {
|
||||
params.gff = false
|
||||
params.save_mpileup = false
|
||||
|
||||
input = [ [ id:'test'],
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
input = [
|
||||
[ id:'test'],
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
dummy = file("dummy_file.txt")
|
||||
gff = []
|
||||
save_mpileup = false
|
||||
|
||||
IVAR_VARIANTS ( input, fasta, dummy )
|
||||
IVAR_VARIANTS ( input, fasta, gff, save_mpileup )
|
||||
}
|
||||
|
||||
workflow test_ivar_variants_no_gff_with_mpileup {
|
||||
params.gff = false
|
||||
params.save_mpileup = true
|
||||
|
||||
input = [ [ id:'test'],
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
input = [
|
||||
[ id:'test'],
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
dummy = file("dummy_file.txt")
|
||||
gff = []
|
||||
save_mpileup = true
|
||||
|
||||
IVAR_VARIANTS ( input, fasta, dummy )
|
||||
IVAR_VARIANTS ( input, fasta, gff, save_mpileup )
|
||||
}
|
||||
|
||||
workflow test_ivar_variants_with_gff_with_mpileup {
|
||||
params.gff = true
|
||||
params.save_mpileup = true
|
||||
|
||||
input = [ [ id:'test'],
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
input = [
|
||||
[ id:'test'],
|
||||
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)
|
||||
gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true)
|
||||
save_mpileup = true
|
||||
|
||||
IVAR_VARIANTS ( input, fasta, gff )
|
||||
IVAR_VARIANTS ( input, fasta, gff, save_mpileup )
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue