Skip to content

Commit

Permalink
Integrate stubs into the germline caller subworkflow
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi18av committed Jul 7, 2021
1 parent 0fa42ea commit f038a67
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
18 changes: 8 additions & 10 deletions modules/local/deepvariant/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ process DEEPVARIANT {
// MUST be provided as an input via a Groovy Map called "meta".
// This information may not be required in some instances e.g. indexing reference genome files:
// https://github.com/nf-core/modules/blob/master/software/bwa/index/main.nf
tuple val(meta), path(fasta), path(fai)
tuple val(meta), path(bam), path(bai)
path fasta
path fai

output:
// TODO nf-core: Named file extensions MUST be emitted for ALL output channels
tuple val(meta), path("*.vcf*"), emit: vcf
tuple val(meta), path("*.vcf*"), emit: vcf
tuple val(meta), path("*.g.vcf*"), emit: gvcf
path "*.version.txt" , emit: version

script:
Expand Down Expand Up @@ -76,24 +77,21 @@ process DEEPVARIANT {
echo \$(/opt/deepvariant/bin/run_deepvariant --version) > ${software}.version.txt
"""


}


workflow test {

fasta_ch = Channel.of([[id: "GRCh38_no_alt_analysis_set"],
"${launchDir}/data/GRCh38_no_alt_analysis_set.fasta",
"${launchDir}/data/GRCh38_no_alt_analysis_set.fasta.fai"]
)

bam_ch = Channel.of([[id: "HG003.novaseq.pcr-free.35x.dedup.grch38_no_alt.chr20"],
"${launchDir}/data/HG003.novaseq.pcr-free.35x.dedup.grch38_no_alt.chr20.bam",
"${launchDir}/data/HG003.novaseq.pcr-free.35x.dedup.grch38_no_alt.chr20.bam.bai"]
)

fasta_ch = Channel.of("${launchDir}/data/GRCh38_no_alt_analysis_set.fasta")

fai_ch = Channel.of("${launchDir}/data/GRCh38_no_alt_analysis_set.fasta.fai")

DEEPVARIANT(fasta_ch, bam_ch)
DEEPVARIANT(bam_ch, fasta_ch, fai_ch )


}
13 changes: 13 additions & 0 deletions subworkflows/local/germline_variant_calling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
*/

params.haplotypecaller_options = [:]
params.deepvariant_options = [:]
params.genotypegvcf_options = [:]
params.concat_gvcf_options = [:]
params.concat_haplotypecaller_options = [:]
params.strelka_options = [:]

include { GATK4_HAPLOTYPECALLER as HAPLOTYPECALLER } from '../../modules/nf-core/software/gatk4/haplotypecaller/main' addParams(options: params.haplotypecaller_options)
include { DEEPVARIANT } from '../../modules/local/deepvariant/main' addParams(options: params.deepvariant_options)
include { GATK4_GENOTYPEGVCF as GENOTYPEGVCF } from '../../modules/nf-core/software/gatk4/genotypegvcf/main' addParams(options: params.genotypegvcf_options)
include { CONCAT_VCF as CONCAT_GVCF } from '../../modules/local/concat_vcf/main' addParams(options: params.concat_gvcf_options)
include { CONCAT_VCF as CONCAT_HAPLOTYPECALLER } from '../../modules/local/concat_vcf/main' addParams(options: params.concat_haplotypecaller_options)
Expand Down Expand Up @@ -94,6 +96,17 @@ workflow GERMLINE_VARIANT_CALLING {
haplotypecaller_vcf = CONCAT_HAPLOTYPECALLER.out.vcf
}

if ('deepvariant' in params.tools.toLowerCase()) {

DEEPVARIANT(
bam,
fasta,
fai)

deepvariant_vcf = DEEPVARIANT.out.vcf
deepvariant_gvcf = DEEPVARIANT.out.gvcf
}

if ('strelka' in params.tools.toLowerCase()) {
STRELKA(
bam,
Expand Down
2 changes: 1 addition & 1 deletion workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ workflow SAREK {
msisensorpro_scan = BUILD_INDICES.out.msisensorpro_scan
target_bed_gz_tbi = BUILD_INDICES.out.target_bed_gz_tbi

// PREPREOCESSING
// PREPROCESSING

bam_mapped = Channel.empty()
bam_mapped_qc = Channel.empty()
Expand Down

0 comments on commit f038a67

Please sign in to comment.