diff --git a/modules/gatk/unifiedgenotyper/main.nf b/modules/gatk/unifiedgenotyper/main.nf index 896a347e..47d83def 100644 --- a/modules/gatk/unifiedgenotyper/main.nf +++ b/modules/gatk/unifiedgenotyper/main.nf @@ -12,15 +12,14 @@ process GATK_UNIFIEDGENOTYPER { path(fasta) path(fai) path(dict) - path(known_vcf) path(intervals) path(contamination) - path(dbsnps) + path(dbsnp) path(comp) output: tuple val(meta), path("*.vcf.gz"), emit: vcf - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -29,7 +28,7 @@ process GATK_UNIFIEDGENOTYPER { 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 dbsnp_file = dbsnp ? "--dbsnp ${dbsnp}" : "" def comp_file = comp ? "--comp ${comp}" : "" def intervals_file = intervals ? "--intervals ${intervals}" : "" @@ -48,9 +47,9 @@ process GATK_UNIFIEDGENOTYPER { -I ${input} \\ -R ${fasta} \\ ${contamination_file} \\ - ${dbsnps_file} \\ + ${dbsnp_file} \\ ${comp_file} \\ - ${intervals_file} + ${intervals_file} \\ -o ${prefix}.vcf \\ $args @@ -58,7 +57,7 @@ process GATK_UNIFIEDGENOTYPER { cat <<-END_VERSIONS > versions.yml "${task.process}": - gatk: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )) + gatk: \$(echo \$(gatk3 --version)) END_VERSIONS """ } diff --git a/modules/gatk/unifiedgenotyper/meta.yml b/modules/gatk/unifiedgenotyper/meta.yml index 5f85c451..e414d146 100644 --- a/modules/gatk/unifiedgenotyper/meta.yml +++ b/modules/gatk/unifiedgenotyper/meta.yml @@ -3,9 +3,6 @@ keywords: - bam - vcf - variant calling - - indel - - realignment - - targets tools: - "gatk": description: "The full Genome Analysis Toolkit (GATK) framework, license restricted." @@ -39,10 +36,22 @@ input: type: file description: GATK dict file for reference pattern: ".dict" - - known_vcf: + - intervals: type: file - description: Optional input VCF file(s) with known indels - pattern: ".vcf" + description: Bed file with the genomic regions included in the library (optional) + pattern: "*.intervals" + - contamination: + type: file + description: Tab-separated file containing fraction of contamination in sequencing data (per sample) to aggressively remove + pattern: "*" + - dbsnps: + type: file + description: VCF file containing known sites (optional) + pattern: "*" + - comp: + type: file + description: Comparison VCF file (optional) + pattern: "*" output: - meta: diff --git a/tests/modules/gatk/unifiedgenotyper/main.nf b/tests/modules/gatk/unifiedgenotyper/main.nf index 86a23790..6d145e76 100644 --- a/tests/modules/gatk/unifiedgenotyper/main.nf +++ b/tests/modules/gatk/unifiedgenotyper/main.nf @@ -5,11 +5,14 @@ nextflow.enable.dsl = 2 include { GATK_UNIFIEDGENOTYPER } from '../../../../modules/gatk/unifiedgenotyper/main.nf' workflow test_gatk_unifiedgenotyper { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) - ] - GATK_UNIFIEDGENOTYPER ( input ) + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + + GATK_UNIFIEDGENOTYPER ( input, fasta, fai, dict, [], [], [], []) } diff --git a/tests/modules/gatk/unifiedgenotyper/test.yml b/tests/modules/gatk/unifiedgenotyper/test.yml index aad9aec9..498e7991 100644 --- a/tests/modules/gatk/unifiedgenotyper/test.yml +++ b/tests/modules/gatk/unifiedgenotyper/test.yml @@ -1,14 +1,9 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml gatk/unifiedgenotyper -- name: "gatk unifiedgenotyper" - command: nextflow run ./tests/modules/gatk/unifiedgenotyper -entry test_gatk_unifiedgenotyper -c ./tests/config/nextflow.config -c ./tests/modules/gatk/unifiedgenotyper/nextflow.config +- name: gatk unifiedgenotyper test_gatk_unifiedgenotyper + command: nextflow run ./tests/modules/gatk/unifiedgenotyper -entry test_gatk_unifiedgenotyper -c ./tests/config/nextflow.config -c ./tests/modules/gatk/unifiedgenotyper/nextflow.config tags: - - "gatk" - # - - "gatk/unifiedgenotyper" - # + - gatk + - gatk/unifiedgenotyper files: - - path: "output/gatk/test.bam" - md5sum: e667c7caad0bc4b7ac383fd023c654fc - - path: output/gatk/versions.yml - md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b + - path: output/gatk/test.vcf.gz + contains: + - "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT test"