From a14855dbe8648ca445759f57a1a2805ec4812615 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Thu, 2 Jun 2022 21:22:21 +0200 Subject: [PATCH] Start meta --- modules/gatk/unifiedgenotyper/main.nf | 16 ++++++- modules/gatk/unifiedgenotyper/meta.yml | 59 ++++++++++++++++---------- 2 files changed, 51 insertions(+), 24 deletions(-) diff --git a/modules/gatk/unifiedgenotyper/main.nf b/modules/gatk/unifiedgenotyper/main.nf index 4dd6e408..896a347e 100644 --- a/modules/gatk/unifiedgenotyper/main.nf +++ b/modules/gatk/unifiedgenotyper/main.nf @@ -13,9 +13,13 @@ process GATK_UNIFIEDGENOTYPER { path(fai) path(dict) path(known_vcf) + path(intervals) + path(contamination) + path(dbsnps) + path(comp) output: - tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.vcf.gz"), emit: vcf path "versions.yml" , emit: versions when: @@ -24,6 +28,10 @@ process GATK_UNIFIEDGENOTYPER { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def contamination_file = contamination ? "-contaminationFile ${contamination}" : "" + def dbsnps_file = dbsnps ? "--dbsnp ${dbsnps}" : "" + def comp_file = comp ? "--comp ${comp}" : "" + def intervals_file = intervals ? "--intervals ${intervals}" : "" def avail_mem = 3 if (!task.memory) { @@ -39,9 +47,15 @@ process GATK_UNIFIEDGENOTYPER { -T UnifiedGenotyper \\ -I ${input} \\ -R ${fasta} \\ + ${contamination_file} \\ + ${dbsnps_file} \\ + ${comp_file} \\ + ${intervals_file} -o ${prefix}.vcf \\ $args + gzip -n *.vcf + cat <<-END_VERSIONS > versions.yml "${task.process}": gatk: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )) diff --git a/modules/gatk/unifiedgenotyper/meta.yml b/modules/gatk/unifiedgenotyper/meta.yml index 7a992591..5f85c451 100644 --- a/modules/gatk/unifiedgenotyper/meta.yml +++ b/modules/gatk/unifiedgenotyper/meta.yml @@ -1,51 +1,64 @@ name: "gatk_unifiedgenotyper" -## TODO nf-core: Add a description of the module and list keywords -description: write your description here keywords: - - sort + - bam + - vcf + - variant calling + - indel + - realignment + - targets tools: - "gatk": - ## TODO nf-core: Add a description and other details for the software below description: "The full Genome Analysis Toolkit (GATK) framework, license restricted." - homepage: "None" - documentation: "None" - tool_dev_url: "None" - doi: "" - licence: "['BSD', 'https://www.broadinstitute.org/gatk/about/#licensing', 'https://software.broadinstitute.org/gatk/download/licensing']" + homepage: "https://gatk.broadinstitute.org/hc/en-us" + documentation: "https://github.com/broadinstitute/gatk-docs" + licence: "['https://software.broadinstitute.org/gatk/download/licensing', 'BSD', 'https://www.broadinstitute.org/gatk/about/#licensing']" -## TODO nf-core: Add a description of all of the variables used as input input: - # Only when we have meta - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - # - ## TODO nf-core: Delete / customise this example input - - bam: + - input: type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: Sorted and indexed BAM/CRAM/SAM file + pattern: "*.bam" + - index: + type: file + description: BAM index file + pattern: "*.bai" + - fasta: + type: file + description: Reference file used to generate BAM file + pattern: ".{fasta,fa,fna}" + - fai: + type: file + description: Index of reference file used to generate BAM file + pattern: ".fai" + - dict: + type: file + description: GATK dict file for reference + pattern: ".dict" + - known_vcf: + type: file + description: Optional input VCF file(s) with known indels + pattern: ".vcf" -## TODO nf-core: Add a description of all of the variables used as output output: - #Only when we have meta - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - # - versions: type: file description: File containing software versions pattern: "versions.yml" - ## TODO nf-core: Delete / customise this example output - - bam: + - vcf: type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: VCF file containing called variants + pattern: "*.vcf.gz" authors: + - "@ilight1542" - "@jfy133"