mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-03 04:52:09 -05:00
Make gff a param and not an optional input
This commit is contained in:
parent
4af7414419
commit
e8d1171b5d
1 changed files with 2 additions and 5 deletions
|
@ -22,7 +22,6 @@ process IVAR_VARIANTS {
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
path fasta
|
path fasta
|
||||||
path gff_file
|
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.tsv"), emit: variants
|
tuple val(meta), path("*.tsv"), emit: variants
|
||||||
|
@ -32,10 +31,8 @@ process IVAR_VARIANTS {
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||||
def save_mpileup = params.save_mpileup ? "tee ${prefix}.mpileup |" : ""
|
def save_mpileup = params.containsKey('save_mpileup') ? "tee ${prefix}.mpileup |" : ""
|
||||||
// the gff file is optional, so following the pattern suggested here:
|
def gff = params.containsKey('gff') ? "-g ${params.get('gff')}" : ""
|
||||||
//https://github.com/nextflow-io/patterns/blob/master/docs/optional-input.adoc
|
|
||||||
def gff = gff_file.name != 'NO_FILE' ? "-g $gff_file" : ""
|
|
||||||
"""
|
"""
|
||||||
samtools mpileup \\
|
samtools mpileup \\
|
||||||
$options.args2 \\
|
$options.args2 \\
|
||||||
|
|
Loading…
Reference in a new issue