Start meta

This commit is contained in:
James Fellows Yates 2022-06-02 21:22:21 +02:00
parent 544b62df45
commit a14855dbe8
2 changed files with 51 additions and 24 deletions

View file

@ -13,9 +13,13 @@ process GATK_UNIFIEDGENOTYPER {
path(fai) path(fai)
path(dict) path(dict)
path(known_vcf) path(known_vcf)
path(intervals)
path(contamination)
path(dbsnps)
path(comp)
output: output:
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.vcf.gz"), emit: vcf
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when: when:
@ -24,6 +28,10 @@ process GATK_UNIFIEDGENOTYPER {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" 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 def avail_mem = 3
if (!task.memory) { if (!task.memory) {
@ -39,9 +47,15 @@ process GATK_UNIFIEDGENOTYPER {
-T UnifiedGenotyper \\ -T UnifiedGenotyper \\
-I ${input} \\ -I ${input} \\
-R ${fasta} \\ -R ${fasta} \\
${contamination_file} \\
${dbsnps_file} \\
${comp_file} \\
${intervals_file}
-o ${prefix}.vcf \\ -o ${prefix}.vcf \\
$args $args
gzip -n *.vcf
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
gatk: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )) gatk: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' ))

View file

@ -1,51 +1,64 @@
name: "gatk_unifiedgenotyper" name: "gatk_unifiedgenotyper"
## TODO nf-core: Add a description of the module and list keywords
description: write your description here
keywords: keywords:
- sort - bam
- vcf
- variant calling
- indel
- realignment
- targets
tools: tools:
- "gatk": - "gatk":
## TODO nf-core: Add a description and other details for the software below
description: "The full Genome Analysis Toolkit (GATK) framework, license restricted." description: "The full Genome Analysis Toolkit (GATK) framework, license restricted."
homepage: "None" homepage: "https://gatk.broadinstitute.org/hc/en-us"
documentation: "None" documentation: "https://github.com/broadinstitute/gatk-docs"
tool_dev_url: "None" licence: "['https://software.broadinstitute.org/gatk/download/licensing', 'BSD', 'https://www.broadinstitute.org/gatk/about/#licensing']"
doi: ""
licence: "['BSD', 'https://www.broadinstitute.org/gatk/about/#licensing', 'https://software.broadinstitute.org/gatk/download/licensing']"
## TODO nf-core: Add a description of all of the variables used as input
input: input:
# Only when we have meta
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
# - input:
## TODO nf-core: Delete / customise this example input
- bam:
type: file type: file
description: BAM/CRAM/SAM file description: Sorted and indexed BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}" 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: output:
#Only when we have meta
- meta: - meta:
type: map type: map
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
#
- versions: - versions:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
## TODO nf-core: Delete / customise this example output - vcf:
- bam:
type: file type: file
description: Sorted BAM/CRAM/SAM file description: VCF file containing called variants
pattern: "*.{bam,cram,sam}" pattern: "*.vcf.gz"
authors: authors:
- "@ilight1542"
- "@jfy133" - "@jfy133"