mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Replace remaining task.ext.suffix with task.ext.prefix (#1117)
* Replace remaining task.ext.suffix with task.ext.prefix
This commit is contained in:
parent
3b366c7c6a
commit
d473a247d2
31 changed files with 60 additions and 61 deletions
|
@ -32,8 +32,8 @@ process ARTIC_MINION {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def version = scheme_version.toString().toLowerCase().replaceAll('v','')
|
||||
def fast5 = fast5_dir ? "--fast5-directory $fast5_dir" : ""
|
||||
def summary = sequencing_summary ? "--sequencing-summary $sequencing_summary" : ""
|
||||
|
|
|
@ -26,8 +26,8 @@ process BAKTA {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def proteins_opt = proteins ? "--proteins ${proteins[0]}" : ""
|
||||
def prodigal_opt = prodigal_tf ? "--prodigal-tf ${prodigal_tf[0]}" : ""
|
||||
"""
|
||||
|
@ -47,7 +47,7 @@ process BAKTA {
|
|||
"""
|
||||
|
||||
stub:
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
touch ${prefix}.embl
|
||||
touch ${prefix}.faa
|
||||
|
|
|
@ -15,8 +15,8 @@ process BCFTOOLS_CONCAT {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
bcftools concat \\
|
||||
--output ${prefix}.vcf.gz \\
|
||||
|
|
|
@ -15,8 +15,8 @@ process BCFTOOLS_ISEC {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
bcftools isec \\
|
||||
$args \\
|
||||
|
|
|
@ -15,8 +15,8 @@ process BCFTOOLS_MERGE {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
bcftools merge -Oz \\
|
||||
--output ${prefix}.vcf.gz \\
|
||||
|
|
|
@ -16,8 +16,8 @@ process BEDTOOLS_GETFASTA {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.suffix ? "${bed.baseName}${task.ext.suffix}" : "${bed.baseName}"
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${bed.baseName}"
|
||||
"""
|
||||
bedtools \\
|
||||
getfasta \\
|
||||
|
|
|
@ -17,8 +17,8 @@ process CHECKM_LINEAGEWF {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
checkm \\
|
||||
lineage_wf \\
|
||||
|
|
|
@ -17,8 +17,8 @@ process CSVTK_CONCAT {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def delimiter = in_format == "tsv" ? "\t" : (in_format == "csv" ? "," : in_format)
|
||||
def out_delimiter = out_format == "tsv" ? "\t" : (out_format == "csv" ? "," : out_format)
|
||||
out_extension = out_format == "tsv" ? 'tsv' : 'csv'
|
||||
|
|
|
@ -18,8 +18,8 @@ process DAMAGEPROFILER {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def reference = fasta ? "-r $fasta" : ""
|
||||
def species_list = specieslist ? "-sf $specieslist" : ""
|
||||
"""
|
||||
|
|
|
@ -18,8 +18,8 @@ process DEDUP {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
"""
|
||||
dedup \\
|
||||
|
|
|
@ -32,8 +32,8 @@ process FARGENE {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
fargene \\
|
||||
$args \\
|
||||
|
|
|
@ -20,8 +20,8 @@ process GATK4_GENOMICSDBIMPORT {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
// settings for running default create gendb mode
|
||||
inputs_command = input_map ? "--sample-name-map ${vcf[0]}" : "${'-V ' + vcf.join(' -V ')}"
|
||||
|
|
|
@ -15,8 +15,8 @@ process GFFREAD {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.suffix ? "${gff.baseName}${task.ext.suffix}" : "${gff.baseName}"
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${gff.baseName}"
|
||||
"""
|
||||
gffread \\
|
||||
$gff \\
|
||||
|
|
|
@ -24,8 +24,8 @@ process LEEHOM {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
if (reads.toString().endsWith('.bam')) {
|
||||
"""
|
||||
|
|
|
@ -18,8 +18,8 @@ process MSISENSOR_MSI {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
msisensor \\
|
||||
msi \\
|
||||
|
|
|
@ -19,8 +19,8 @@ process NEXTCLADE {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
nextclade \\
|
||||
$args \\
|
||||
|
|
|
@ -15,9 +15,9 @@ process OPTITYPE {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def args2 = task.ext.args2 ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
def args2 = task.ext.args2 ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
"""
|
||||
# Create a config for OptiType on a per sample basis with task.ext.args2
|
||||
|
|
|
@ -23,8 +23,8 @@ process PLASMIDID {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
plasmidID \\
|
||||
-d $fasta \\
|
||||
|
|
|
@ -19,8 +19,8 @@ process PRODIGAL {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
"""
|
||||
prodigal -i "${genome}" \\
|
||||
$args \\
|
||||
|
|
|
@ -28,8 +28,8 @@ process PROKKA {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def proteins_opt = proteins ? "--proteins ${proteins[0]}" : ""
|
||||
def prodigal_opt = prodigal_tf ? "--prodigaltf ${prodigal_tf[0]}" : ""
|
||||
"""
|
||||
|
|
|
@ -17,8 +17,8 @@ process QUALIMAP_BAMQC {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
def collect_pairs = meta.single_end ? '' : '--collect-overlap-pairs'
|
||||
def memory = task.memory.toGiga() + "G"
|
||||
|
|
|
@ -16,8 +16,8 @@ process QUALIMAP_RNASEQ {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def paired_end = meta.single_end ? '' : '-pe'
|
||||
def memory = task.memory.toGiga() + "G"
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ process QUAST {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ?: 'quast'
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: 'quast'
|
||||
def features = use_gff ? "--features $gff" : ''
|
||||
def reference = use_fasta ? "-r $fasta" : ''
|
||||
"""
|
||||
|
|
|
@ -23,8 +23,8 @@ process RSEM_CALCULATEEXPRESSION {
|
|||
tuple val(meta), path("${prefix}.transcript.bam"), optional:true, emit: bam_transcript
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
def strandedness = ''
|
||||
if (meta.strandedness == 'forward') {
|
||||
|
|
|
@ -20,8 +20,8 @@ process SALMON_QUANT {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
def reference = "--index $index"
|
||||
def input_reads = meta.single_end ? "-r $reads" : "-1 ${reads[0]} -2 ${reads[1]}"
|
||||
|
|
|
@ -17,8 +17,8 @@ process SAMTOOLS_MERGE {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def file_type = input_files[0].getExtension()
|
||||
def reference = fasta ? "--reference ${fasta}" : ""
|
||||
"""
|
||||
|
|
|
@ -17,7 +17,6 @@ process SEQKIT_SPLIT2 {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
if(meta.single_end){
|
||||
"""
|
||||
seqkit \\
|
||||
|
|
|
@ -16,8 +16,8 @@ process SEQTK_SUBSEQ {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.suffix ?: ''
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: ''
|
||||
def ext = "fa"
|
||||
if ("$sequences" ==~ /.+\.fq|.+\.fq.gz|.+\.fastq|.+\.fastq.gz/) {
|
||||
ext = "fq"
|
||||
|
|
|
@ -19,8 +19,8 @@ process TBPROFILER_PROFILE {
|
|||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def input_reads = meta.single_end ? "--read1 $reads" : "--read1 ${reads[0]} --read2 ${reads[1]}"
|
||||
"""
|
||||
tb-profiler \\
|
||||
|
|
|
@ -3,7 +3,7 @@ process {
|
|||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName: GFFREAD {
|
||||
ext.prefix = { "${meta.id}.out" }
|
||||
ext.prefix = { "${gff.baseName}.out" }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ process {
|
|||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName: SEQTK_SUBSEQ {
|
||||
ext.prefix = { "${meta.id}.filtered" }
|
||||
ext.prefix = { ".filtered" }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue