Gets GATK3 UG working, not sure why can't test by manually installing

This commit is contained in:
James Fellows Yates 2021-11-03 13:05:46 +01:00
parent 025e214cd6
commit f2b2f32567
4 changed files with 24 additions and 15 deletions

View file

@ -5,7 +5,7 @@ params.options = [:]
options = initOptions(params.options) options = initOptions(params.options)
process GATK3_UNIFIEDGENOTYPER { process GATK3_UNIFIEDGENOTYPER {
tag '$bam' tag "$meta.id"
label 'process_low' label 'process_low'
publishDir "${params.outdir}", publishDir "${params.outdir}",
mode: params.publish_dir_mode, 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"). // 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. // 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. // 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) { 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 { } else {
container "quay.io/biocontainers/YOUR-TOOL-HERE" container "quay.io/biocontainers/gatk:3.5--hdfd78af_11"
} }
input: input:
path bam tuple val(meta), path(bam), path(bai)
path ref path ref
path fai
path dict
output: output:
path "*.vcf", emit: vcf path "*.vcf.gz", emit: vcf
path "versions.yml", emit: versions path "versions.yml", emit: versions
script: script:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
""" """
gatk -T UnifiedGenotyper \\ gatk3 -T UnifiedGenotyper \\
-R $ref \\ -R $ref \\
-I $bam \\ -I $bam \\
-o $vcf \\ -o ${prefix}.vcf \\
$options.args $options.args
gzip --no-name ${prefix}.vcf
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}: ${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$( samtools --version 2>&1 | sed 's/^.*samtools //; s/Using.*\$//' ) ${getSoftwareName(task.process)}: \$( gatk3 --version )
END_VERSIONS END_VERSIONS
""" """
} }

View file

@ -5,9 +5,14 @@ nextflow.enable.dsl = 2
include { GATK3_UNIFIEDGENOTYPER } from '../../../../modules/gatk3/unifiedgenotyper/main.nf' addParams( options: [:] ) include { GATK3_UNIFIEDGENOTYPER } from '../../../../modules/gatk3/unifiedgenotyper/main.nf' addParams( options: [:] )
workflow test_gatk3_unifiedgenotyper { 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 )
} }

View file

@ -6,5 +6,4 @@
- gatk3 - gatk3
- gatk3/unifiedgenotyper - gatk3/unifiedgenotyper
files: files:
- path: output/gatk3/test.bam - path: output/gatk3/test.vcf.gz
md5sum: e667c7caad0bc4b7ac383fd023c654fc