Change intervals to be part of sample specific input (#1189)

* Change intervals to be part of sample specific input

* Fix some tests

* Update checksum

* Update intervals

* Update intervals

* Try out gavins idea for adding the file

* update test line

* update test line

* update test line

* revert contains line
This commit is contained in:
FriederikeHanssen 2021-12-23 12:58:20 +01:00 committed by GitHub
parent 5320ab7e6c
commit a6e0629e24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 89 additions and 77 deletions

View file

@ -8,20 +8,22 @@ process GATK4_APPLYBQSR {
'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }"
input: input:
tuple val(meta), path(input), path(input_index), path(bqsr_table) tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals)
path fasta path fasta
path fai path fai
path dict path dict
path intervals
output: output:
tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bam"), emit: bam, optional: true
path "versions.yml" , emit: versions tuple val(meta), path("*.cram"), emit: cram, optional: true
path "versions.yml" , emit: versions
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 interval = intervals ? "-L ${intervals}" : "" def interval = intervals ? "-L ${intervals}" : ""
def file_type = input.getExtension()
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {
log.info '[GATK ApplyBQSR] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' log.info '[GATK ApplyBQSR] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
@ -35,7 +37,7 @@ process GATK4_APPLYBQSR {
--bqsr-recal-file $bqsr_table \\ --bqsr-recal-file $bqsr_table \\
$interval \\ $interval \\
--tmp-dir . \\ --tmp-dir . \\
-O ${prefix}.bam \\ -O ${prefix}.${file_type} \\
$args $args
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml

View file

@ -31,6 +31,9 @@ input:
- bqsr_table: - bqsr_table:
type: file type: file
description: Recalibration table from gatk4_baserecalibrator description: Recalibration table from gatk4_baserecalibrator
- intervals:
type: file
description: Bed file with the genomic regions included in the library (optional)
- fasta: - fasta:
type: file type: file
description: The reference fasta file description: The reference fasta file
@ -43,9 +46,7 @@ input:
type: file type: file
description: GATK sequence dictionary description: GATK sequence dictionary
pattern: "*.dict" pattern: "*.dict"
- intervalsBed:
type: file
description: Bed file with the genomic regions included in the library (optional)
output: output:
- meta: - meta:

View file

@ -8,11 +8,10 @@ process GATK4_BASERECALIBRATOR {
'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }"
input: input:
tuple val(meta), path(input), path(input_index) tuple val(meta), path(input), path(input_index), path(intervals)
path fasta path fasta
path fai path fai
path dict path dict
path intervalsBed
path knownSites path knownSites
path knownSites_tbi path knownSites_tbi
@ -23,14 +22,16 @@ process GATK4_BASERECALIBRATOR {
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 intervalsCommand = intervalsBed ? "-L ${intervalsBed}" : "" def intervalsCommand = intervals ? "-L ${intervals}" : ""
def sitesCommand = knownSites.collect{"--known-sites ${it}"}.join(' ') def sitesCommand = knownSites.collect{"--known-sites ${it}"}.join(' ')
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {
log.info '[GATK BaseRecalibrator] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' log.info '[GATK BaseRecalibrator] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
} else { } else {
avail_mem = task.memory.giga avail_mem = task.memory.giga
} }
""" """
gatk --java-options "-Xmx${avail_mem}g" BaseRecalibrator \ gatk --java-options "-Xmx${avail_mem}g" BaseRecalibrator \
-R $fasta \ -R $fasta \

View file

@ -28,6 +28,9 @@ input:
type: file type: file
description: BAI/CRAI file from alignment description: BAI/CRAI file from alignment
pattern: "*.{bai,crai}" pattern: "*.{bai,crai}"
- intervals:
type: file
description: Bed file with the genomic regions included in the library (optional)
- fasta: - fasta:
type: file type: file
description: The reference fasta file description: The reference fasta file
@ -40,9 +43,6 @@ input:
type: file type: file
description: GATK sequence dictionary description: GATK sequence dictionary
pattern: "*.dict" pattern: "*.dict"
- intervalsBed:
type: file
description: Bed file with the genomic regions included in the library (optional)
- knownSites: - knownSites:
type: file type: file
description: Bed file with the genomic regions included in the library (optional) description: Bed file with the genomic regions included in the library (optional)

View file

@ -8,13 +8,12 @@ process GATK4_GENOTYPEGVCFS {
'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }"
input: input:
tuple val(meta), path(gvcf), path(gvcf_index) tuple val(meta), path(gvcf), path(gvcf_index), path(intervals)
path fasta path fasta
path fasta_index path fasta_index
path fasta_dict path fasta_dict
path dbsnp path dbsnp
path dbsnp_index path dbsnp_index
path intervals_bed
output: output:
tuple val(meta), path("*.vcf.gz"), emit: vcf tuple val(meta), path("*.vcf.gz"), emit: vcf
@ -25,7 +24,7 @@ process GATK4_GENOTYPEGVCFS {
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 dbsnp_options = dbsnp ? "-D ${dbsnp}" : "" def dbsnp_options = dbsnp ? "-D ${dbsnp}" : ""
def interval_options = intervals_bed ? "-L ${intervals_bed}" : "" def interval_options = intervals ? "-L ${intervals}" : ""
def gvcf_options = gvcf.name.endsWith(".vcf") || gvcf.name.endsWith(".vcf.gz") ? "$gvcf" : "gendb://$gvcf" def gvcf_options = gvcf.name.endsWith(".vcf") || gvcf.name.endsWith(".vcf.gz") ? "$gvcf" : "gendb://$gvcf"
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {

View file

@ -25,6 +25,9 @@ input:
description: | description: |
Tuple of gVCF(.gz) file (first) and its index (second) or the path to a GenomicsDB (and empty) Tuple of gVCF(.gz) file (first) and its index (second) or the path to a GenomicsDB (and empty)
pattern: ["*.{vcf,vcf.gz}", "*.{idx,tbi}"] pattern: ["*.{vcf,vcf.gz}", "*.{idx,tbi}"]
- intervals:
type: file
description: Bed file with the genomic regions included in the library (optional)
- fasta: - fasta:
type: file type: file
description: Reference fasta file description: Reference fasta file
@ -45,10 +48,6 @@ input:
type: tuple of files type: tuple of files
description: dbSNP VCF index file description: dbSNP VCF index file
pattern: "*.tbi" pattern: "*.tbi"
- intervals_bed:
type: file
description: An intevals BED file
pattern: "*.bed"
output: output:
- meta: - meta:

View file

@ -8,13 +8,12 @@ process GATK4_HAPLOTYPECALLER {
'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }" 'quay.io/biocontainers/gatk4:4.2.4.0--hdfd78af_0' }"
input: input:
tuple val(meta), path(input), path(input_index) tuple val(meta), path(input), path(input_index), path(intervals)
path fasta path fasta
path fai path fai
path dict path dict
path dbsnp path dbsnp
path dbsnp_tbi path dbsnp_tbi
path interval
output: output:
tuple val(meta), path("*.vcf.gz"), emit: vcf tuple val(meta), path("*.vcf.gz"), emit: vcf
@ -24,7 +23,7 @@ process GATK4_HAPLOTYPECALLER {
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 interval_option = interval ? "-L ${interval}" : "" def interval_option = intervals ? "-L ${intervals}" : ""
def dbsnp_option = dbsnp ? "-D ${dbsnp}" : "" def dbsnp_option = dbsnp ? "-D ${dbsnp}" : ""
def avail_mem = 3 def avail_mem = 3
if (!task.memory) { if (!task.memory) {

View file

@ -29,6 +29,9 @@ input:
type: file type: file
description: BAI/CRAI file from alignment description: BAI/CRAI file from alignment
pattern: "*.{bai,crai}" pattern: "*.{bai,crai}"
- intervals:
type: file
description: Bed file with the genomic regions included in the library (optional)
- fasta: - fasta:
type: file type: file
description: The reference fasta file description: The reference fasta file
@ -47,9 +50,6 @@ input:
- dbsnp_tbi: - dbsnp_tbi:
type: file type: file
description: VCF index of dbsnp (optional) description: VCF index of dbsnp (optional)
- interval:
type: file
description: Bed file with the genomic regions included in the library (optional)
output: output:
- meta: - meta:

View file

@ -8,39 +8,40 @@ workflow test_gatk4_applybqsr {
input = [ [ id:'test' ], // meta map 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'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true) file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true),
[]
] ]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], 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) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
GATK4_APPLYBQSR ( input, fasta, fai, dict, [] ) GATK4_APPLYBQSR ( input, fasta, fai, dict )
} }
workflow test_gatk4_applybqsr_intervals { workflow test_gatk4_applybqsr_intervals {
input = [ [ id:'test' ], // meta map 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'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true) file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true),
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
] ]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], 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) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
intervals = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
GATK4_APPLYBQSR ( input, fasta, fai, dict, intervals ) GATK4_APPLYBQSR ( input, fasta, fai, dict )
} }
workflow test_gatk4_applybqsr_cram { workflow test_gatk4_applybqsr_cram {
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_baserecalibrator_table'], checkIfExists: true) file(params.test_data['homo_sapiens']['illumina']['test_baserecalibrator_table'], checkIfExists: true),
file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
] ]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
intervals = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
GATK4_APPLYBQSR ( input, fasta, fai, dict, intervals ) GATK4_APPLYBQSR ( input, fasta, fai, dict )
} }

View file

@ -26,7 +26,7 @@
- gatk4 - gatk4
- gatk4/applybqsr - gatk4/applybqsr
files: files:
- path: output/gatk4/test.bam - path: output/gatk4/test.cram
md5sum: a333f80284a89a8daab28d3686a0b365 md5sum: b7659b3b2adaabbe73658dc059dbfdf6
- path: output/gatk4/versions.yml - path: output/gatk4/versions.yml
md5sum: 57933f27b3a31b05af3f7c248d365396 md5sum: 57933f27b3a31b05af3f7c248d365396

View file

@ -7,7 +7,8 @@ include { GATK4_BASERECALIBRATOR } from '../../../../modules/gatk4/baserecalibra
workflow test_gatk4_baserecalibrator { workflow test_gatk4_baserecalibrator {
input = [ [ id:'test' ], // meta map 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'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], 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) fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
@ -15,14 +16,14 @@ workflow test_gatk4_baserecalibrator {
sites = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) sites = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true)
sites_tbi = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) sites_tbi = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)
GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, [], sites, sites_tbi ) GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, sites, sites_tbi )
} }
workflow test_gatk4_baserecalibrator_cram { workflow test_gatk4_baserecalibrator_cram {
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_baserecalibrator_table'], checkIfExists: true) []
] ]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
@ -30,28 +31,29 @@ workflow test_gatk4_baserecalibrator_cram {
sites = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) sites = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true)
sites_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) sites_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true)
GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, [], sites, sites_tbi ) GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, sites, sites_tbi )
} }
workflow test_gatk4_baserecalibrator_intervals { workflow test_gatk4_baserecalibrator_intervals {
input = [ [ id:'test' ], // meta map 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'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true),
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
] ]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], 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) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
intervals = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
sites = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) sites = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true)
sites_tbi = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) sites_tbi = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)
GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, intervals, sites, sites_tbi ) GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, sites, sites_tbi )
} }
workflow test_gatk4_baserecalibrator_multiple_sites { workflow test_gatk4_baserecalibrator_multiple_sites {
input = [ [ id:'test' ], // meta map 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'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], 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) fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
@ -63,5 +65,5 @@ workflow test_gatk4_baserecalibrator_multiple_sites {
file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true) file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true)
] ]
GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, [], sites, sites_tbi ) GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, sites, sites_tbi )
} }

View file

@ -10,13 +10,15 @@ workflow test_gatk4_genotypegvcfs_vcf_input {
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_idx'], checkIfExists: true) ] file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_idx'], checkIfExists: true),
[]
]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [], [] ) GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [])
} }
// Basic parameters with compressed VCF input // Basic parameters with compressed VCF input
@ -24,13 +26,15 @@ workflow test_gatk4_genotypegvcfs_gz_input {
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true) ] file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true),
[]
]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [], [] ) GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [])
} }
// Basic parameters + optional dbSNP // Basic parameters + optional dbSNP
@ -38,7 +42,9 @@ workflow test_gatk4_genotypegvcfs_gz_input_dbsnp {
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true) ] file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true),
[]
]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
@ -47,7 +53,7 @@ workflow test_gatk4_genotypegvcfs_gz_input_dbsnp {
dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true)
dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true)
GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex, [] ) GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex)
} }
// Basic parameters + optional intervals // Basic parameters + optional intervals
@ -55,15 +61,14 @@ workflow test_gatk4_genotypegvcfs_gz_input_intervals {
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true) ] file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true),
file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) ]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
intervalsBed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [])
GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [], intervalsBed )
} }
// Basic parameters + optional dbSNP + optional intervals // Basic parameters + optional dbSNP + optional intervals
@ -71,7 +76,9 @@ workflow test_gatk4_genotypegvcfs_gz_input_dbsnp_intervals {
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true) ] file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true),
file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
@ -80,9 +87,7 @@ workflow test_gatk4_genotypegvcfs_gz_input_dbsnp_intervals {
dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true)
dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true)
intervalsBed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex )
GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex, intervalsBed )
} }
// Basic parameters with GenomicsDB input // Basic parameters with GenomicsDB input
@ -97,9 +102,11 @@ workflow test_gatk4_genotypegvcfs_gendb_input {
UNTAR ( test_genomicsdb ) UNTAR ( test_genomicsdb )
gendb = UNTAR.out.untar.collect() gendb = UNTAR.out.untar.collect()
gendb.add([]) gendb.add([])
gendb.add([])
input = Channel.of([ id:'test' ]).combine(gendb) input = Channel.of([ id:'test' ]).combine(gendb)
GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [], [] ) GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [])
} }
// Basic parameters with GenomicsDB + optional dbSNP // Basic parameters with GenomicsDB + optional dbSNP
@ -117,9 +124,10 @@ workflow test_gatk4_genotypegvcfs_gendb_input_dbsnp {
UNTAR ( test_genomicsdb ) UNTAR ( test_genomicsdb )
gendb = UNTAR.out.untar.collect() gendb = UNTAR.out.untar.collect()
gendb.add([]) gendb.add([])
gendb.add([])
input = Channel.of([ id:'test' ]).combine(gendb) input = Channel.of([ id:'test' ]).combine(gendb)
GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex, [] ) GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex)
} }
// Basic parameters with GenomicsDB + optional intervals // Basic parameters with GenomicsDB + optional intervals
@ -129,16 +137,15 @@ workflow test_gatk4_genotypegvcfs_gendb_input_intervals {
fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) fastaIndex = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) fastaDict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
intervalsBed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
test_genomicsdb = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) test_genomicsdb = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true)
UNTAR ( test_genomicsdb ) UNTAR ( test_genomicsdb )
gendb = UNTAR.out.untar.collect() gendb = UNTAR.out.untar.collect()
gendb.add([]) gendb.add([])
gendb.add([file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)])
input = Channel.of([ id:'test' ]).combine(gendb) input = Channel.of([ id:'test' ]).combine(gendb)
GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [], intervalsBed ) GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, [], [] )
} }
// Basic parameters with GenomicsDB + optional dbSNP + optional intervals // Basic parameters with GenomicsDB + optional dbSNP + optional intervals
@ -151,14 +158,13 @@ workflow test_gatk4_genotypegvcfs_gendb_input_dbsnp_intervals {
dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true)
dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) dbsnpIndex = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true)
intervalsBed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
test_genomicsdb = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true) test_genomicsdb = file(params.test_data['homo_sapiens']['illumina']['test_genomicsdb_tar_gz'], checkIfExists: true)
UNTAR ( test_genomicsdb ) UNTAR ( test_genomicsdb )
gendb = UNTAR.out.untar.collect() gendb = UNTAR.out.untar.collect()
gendb.add([]) gendb.add([])
gendb.add([file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)])
input = Channel.of([ id:'test' ]).combine(gendb) input = Channel.of([ id:'test' ]).combine(gendb)
GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex, intervalsBed ) GATK4_GENOTYPEGVCFS ( input, fasta, fastaIndex, fastaDict, dbsnp, dbsnpIndex )
} }

View file

@ -7,31 +7,34 @@ include { GATK4_HAPLOTYPECALLER } from '../../../../modules/gatk4/haplotypecalle
workflow test_gatk4_haplotypecaller { workflow test_gatk4_haplotypecaller {
input = [ [ id:'test' ], // meta map 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'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], 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) fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], 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) dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
GATK4_HAPLOTYPECALLER ( input, fasta, fai, dict, [], [], [] ) GATK4_HAPLOTYPECALLER ( input, fasta, fai, dict, [], [])
} }
workflow test_gatk4_haplotypecaller_cram { workflow test_gatk4_haplotypecaller_cram {
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true) file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true),
[]
] ]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
GATK4_HAPLOTYPECALLER ( input, fasta, fai, dict, [], [], [] ) GATK4_HAPLOTYPECALLER ( input, fasta, fai, dict, [], [])
} }
workflow test_gatk4_haplotypecaller_intervals_dbsnp { workflow test_gatk4_haplotypecaller_intervals_dbsnp {
input = [ [ id:'test' ], // meta map input = [ [ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true) file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram_crai'], checkIfExists: true),
file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
] ]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
@ -39,7 +42,6 @@ workflow test_gatk4_haplotypecaller_intervals_dbsnp {
dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
sites = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) sites = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true)
sites_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) sites_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true)
intervals = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)
GATK4_HAPLOTYPECALLER ( input, fasta, fai, dict, sites, sites_tbi, intervals ) GATK4_HAPLOTYPECALLER ( input, fasta, fai, dict, sites, sites_tbi )
} }