mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
a0443e2c54
* Update main.nf * Update meta.yml * Re-add logos as not staged in a way that works with MultiQC config files * Update main.nf * Remove now unnecessary input channel * Remove unused channel from tests * Update hAMRonization to 1.1.1 and add hAMRonization farGene * Fix hamronizatio ntests * Prettier * Fix fargene linting * Correct file * Fix fargene output * Apply suggestions from code review Co-authored-by: Jasmin F <73216762+jasmezz@users.noreply.github.com> * Fix summarise tests * Prettier * Fix incorrect quotes in tags Co-authored-by: Jasmin F <73216762+jasmezz@users.noreply.github.com>
72 lines
2.7 KiB
Text
72 lines
2.7 KiB
Text
process MULTIVCFANALYZER {
|
|
tag "$fasta"
|
|
label 'process_single'
|
|
|
|
conda (params.enable_conda ? "bioconda::multivcfanalyzer=0.85.2" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/multivcfanalyzer:0.85.2--hdfd78af_1':
|
|
'quay.io/biocontainers/multivcfanalyzer:0.85.2--hdfd78af_1' }"
|
|
|
|
input:
|
|
path vcfs
|
|
path fasta
|
|
path snpeff_results
|
|
path gff
|
|
val allele_freqs
|
|
val genotype_quality
|
|
val coverage
|
|
val homozygous_freq
|
|
val heterozygous_freq
|
|
path gff_exclude
|
|
|
|
|
|
output:
|
|
path('fullAlignment.fasta.gz') , emit: full_alignment
|
|
path('info.txt') , emit: info_txt
|
|
path('snpAlignment.fasta.gz') , emit: snp_alignment
|
|
path('snpAlignmentIncludingRefGenome.fasta.gz') , emit: snp_genome_alignment
|
|
path('snpStatistics.tsv') , emit: snpstatistics
|
|
path('snpTable.tsv') , emit: snptable
|
|
path('snpTableForSnpEff.tsv') , emit: snptable_snpeff
|
|
path('snpTableWithUncertaintyCalls.tsv') , emit: snptable_uncertainty
|
|
path('structureGenotypes.tsv') , emit: structure_genotypes
|
|
path('structureGenotypes_noMissingData-Columns.tsv') , emit: structure_genotypes_nomissing
|
|
path('MultiVCFAnalyzer.json') , emit: json
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
// def args = task.ext.args ?: '' // MultiVCFAnalyzer has strict and input ordering and all are mandatory. Deactivating $args to prevent breakage of input
|
|
def args2 = task.ext.args2 ?: ''
|
|
|
|
def cmd_snpeff_results = snpeff_results ? "${snpeff_results}" : "NA"
|
|
def cmd_gff = gff ? "${gff}" : "NA"
|
|
def cmd_allele_freqs = allele_freqs ? "T" : "F"
|
|
def cmd_gff_exclude = gff_exclude ? "${gff}" : "NA"
|
|
|
|
"""
|
|
multivcfanalyzer \\
|
|
${cmd_snpeff_results} \\
|
|
${fasta} \\
|
|
${cmd_gff} \\
|
|
. \
|
|
${cmd_allele_freqs} \\
|
|
${genotype_quality} \\
|
|
${coverage} \\
|
|
${homozygous_freq} \\
|
|
${heterozygous_freq} \\
|
|
${cmd_gff_exclude} \\
|
|
${vcfs.join(" ")}
|
|
|
|
gzip \\
|
|
$args2 \\
|
|
fullAlignment.fasta snpAlignment.fasta snpAlignmentIncludingRefGenome.fasta
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
multivcfanalyzer: \$(echo \$(multivcfanalyzer --help | head -n 1) | cut -f 3 -d ' ' )
|
|
END_VERSIONS
|
|
"""
|
|
}
|