Standardise parameters (no tests yet until realigntarget creator ready)

This commit is contained in:
James Fellows Yates 2022-06-02 20:35:34 +02:00
parent 599b264280
commit de88adc926
2 changed files with 15 additions and 6 deletions

View file

@ -9,20 +9,20 @@ process GATK_INDELREALIGNER {
input: input:
tuple val(meta), path(input), path(index), path(intervals) tuple val(meta), path(input), path(index), path(intervals)
path path(fasta) path(fasta)
path(fai) path(fai)
path(dict) path(dict)
path(known_vcf) path(known_vcf)
output: output:
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bam"), path("*.bai"), emit: bam
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
when: when:
task.ext.when == null || task.ext.when task.ext.when == null || task.ext.when
script: script:
if ("$bam" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!" if ("$input" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!"
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 known = known_vcf ? "-known ${known_vcf}" : "" def known = known_vcf ? "-known ${known_vcf}" : ""
@ -36,10 +36,11 @@ process GATK_INDELREALIGNER {
""" """
gatk3 \\ gatk3 \\
-Xmx${avail_mem}g \\
-T IndelRealigner \\ -T IndelRealigner \\
-R ${fasta} \\ -R ${fasta} \\
-nt ${task.cpus} -nt ${task.cpus}
-I ${bam} \\ -I ${input} \\
-targetIntervals ${intervals} \\ -targetIntervals ${intervals} \\
${known} \\ ${known} \\
-o ${prefix}.bam \\ -o ${prefix}.bam \\

View file

@ -19,11 +19,11 @@ input:
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 ]
- bam: - input:
type: file type: file
description: Sorted and indexed BAM/CRAM/SAM file description: Sorted and indexed BAM/CRAM/SAM file
pattern: "*.bam" pattern: "*.bam"
- bai: - index:
type: file type: file
description: BAM index file description: BAM index file
pattern: "*.bai" pattern: "*.bai"
@ -35,6 +35,14 @@ input:
type: file type: file
description: Reference file used to generate BAM file description: Reference file used to generate BAM file
pattern: ".{fasta,fa,fna}" 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: - known_vcf:
type: file type: file
description: Optional input VCF file(s) with known indels description: Optional input VCF file(s) with known indels