From f2b2f32567de2038e9bba9db7d578c17ca552341 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Wed, 3 Nov 2021 13:05:46 +0100 Subject: [PATCH] Gets GATK3 UG working, not sure why can't test by manually installing --- modules/gatk3/unifiedgenotyper/main.nf | 23 +++++++++++------- ...t_versions_yml.cpython-39-pytest-6.2.5.pyc | Bin 3558 -> 3556 bytes tests/modules/gatk3/unifiedgenotyper/main.nf | 13 +++++++--- tests/modules/gatk3/unifiedgenotyper/test.yml | 3 +-- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/modules/gatk3/unifiedgenotyper/main.nf b/modules/gatk3/unifiedgenotyper/main.nf index e4b79524..3ad580a7 100644 --- a/modules/gatk3/unifiedgenotyper/main.nf +++ b/modules/gatk3/unifiedgenotyper/main.nf @@ -5,7 +5,7 @@ params.options = [:] options = initOptions(params.options) process GATK3_UNIFIEDGENOTYPER { - tag '$bam' + tag "$meta.id" label 'process_low' publishDir "${params.outdir}", mode: params.publish_dir_mode, @@ -15,32 +15,37 @@ process GATK3_UNIFIEDGENOTYPER { // Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). // For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. - conda (params.enable_conda ? "YOUR-TOOL-HERE" : null) + conda (params.enable_conda ? "bioconda::gatk=3.5" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE" + container "https://depot.galaxyproject.org/singularity/gatk:3.5--hdfd78af_11" } else { - container "quay.io/biocontainers/YOUR-TOOL-HERE" + container "quay.io/biocontainers/gatk:3.5--hdfd78af_11" } input: - path bam + tuple val(meta), path(bam), path(bai) path ref + path fai + path dict output: - path "*.vcf", emit: vcf + path "*.vcf.gz", emit: vcf path "versions.yml", emit: versions script: + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" """ - gatk -T UnifiedGenotyper \\ + gatk3 -T UnifiedGenotyper \\ -R $ref \\ -I $bam \\ - -o $vcf \\ + -o ${prefix}.vcf \\ $options.args + gzip --no-name ${prefix}.vcf + cat <<-END_VERSIONS > versions.yml ${getProcessName(task.process)}: - ${getSoftwareName(task.process)}: \$( samtools --version 2>&1 | sed 's/^.*samtools //; s/Using.*\$//' ) + ${getSoftwareName(task.process)}: \$( gatk3 --version ) END_VERSIONS """ } diff --git a/tests/__pycache__/test_versions_yml.cpython-39-pytest-6.2.5.pyc b/tests/__pycache__/test_versions_yml.cpython-39-pytest-6.2.5.pyc index 33acb8369a1bc62b5e66e1ed80e2247dd0e2759f..3d88e5f06747712ca8c564787aa3ed9a731e303f 100644 GIT binary patch delta 55 zcmaDR{Y08Ok(ZZ?0SMAEsy1?GG0D2?XXNLm>Sv{;=H%p;7wfy^Czs}?=9Ludr)QRI Jp28Hw4FJl;5zGJp delta 57 zcmaDN{Y;uWk(ZZ?0SIRG=5FN9Vv_gN&&bbB)h|vj&8$i+O3@F`FUr<;NiEY)&n(F( LP1-z(DTo^Y`Rfv! diff --git a/tests/modules/gatk3/unifiedgenotyper/main.nf b/tests/modules/gatk3/unifiedgenotyper/main.nf index 7ea71cc3..9de53c5f 100644 --- a/tests/modules/gatk3/unifiedgenotyper/main.nf +++ b/tests/modules/gatk3/unifiedgenotyper/main.nf @@ -5,9 +5,14 @@ nextflow.enable.dsl = 2 include { GATK3_UNIFIEDGENOTYPER } from '../../../../modules/gatk3/unifiedgenotyper/main.nf' addParams( options: [:] ) workflow test_gatk3_unifiedgenotyper { - - input = file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) - ref = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - GATK3_UNIFIEDGENOTYPER ( input, ref ) + 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) + ] + ref = 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) + + GATK3_UNIFIEDGENOTYPER ( input, ref, fai, dict ) } diff --git a/tests/modules/gatk3/unifiedgenotyper/test.yml b/tests/modules/gatk3/unifiedgenotyper/test.yml index 0ca98e0f..f1f534a3 100644 --- a/tests/modules/gatk3/unifiedgenotyper/test.yml +++ b/tests/modules/gatk3/unifiedgenotyper/test.yml @@ -6,5 +6,4 @@ - gatk3 - gatk3/unifiedgenotyper files: - - path: output/gatk3/test.bam - md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/gatk3/test.vcf.gz