diff --git a/README.md b/README.md index b25e45a..82c6bb2 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,6 @@ The pipeline has 6 main steps: Indel calling using platypus, basic annotations, Reliability and confidation annotations: It is an optional ste for mapability, hiseq, selfchain and repeat regions checks for reliability and confidence of those scores. - 3. Deep Annotation (--runIndelDeepAnnotation True): If basic annotations are applied, an extra optional step for number of extra indel annotations like enhancer, cosmic, mirBASE, encode databases can be applied too. @@ -207,7 +206,6 @@ We thank the following people for their extensive assistance in the development - Nagarajan Paramasivam (@NagaComBio) n.paramasivam@dkfz.de - **TODO** diff --git a/modules/local/annotate_vcf.nf b/modules/local/annotate_vcf.nf index 9309c57..da3f2cb 100644 --- a/modules/local/annotate_vcf.nf +++ b/modules/local/annotate_vcf.nf @@ -9,7 +9,14 @@ process ANNOTATE_VCF { input: tuple val(meta), path(vcf), path(vcf_tbi) - tuple val(meta2),path(kgenome),path(kgenome_i),path(dbsnpindel),path(dbsnpindel_i),path(exac),path(evs),path(evs_i),path(exac_i),path(localcontrolwgs),path(localcontrolwgs_i),path(localcontrolwes),path(localcontrolwes_i),path(gnomadgenomes),path(gnomadgenomes_i),path(gnomadexomes),path(gnomadexomes_i) + tuple path(kgenome),path(kgenome_i) + tuple path(dbsnpindel),path(dbsnpindel_i) + tuple path(exac),path(exac_i) + tuple path(evs),path(evs_i) + tuple path(localcontrolwgs),path(localcontrolwgs_i) + tuple path(localcontrolwes),path(localcontrolwes_i) + tuple path(gnomadgenomes),path(gnomadgenomes_i) + tuple path(gnomadexomes),path(gnomadexomes_i) val (chrprefix) output: diff --git a/modules/local/annotation_pipes.nf b/modules/local/annotation_pipes.nf index 8d08d90..73294f3 100644 --- a/modules/local/annotation_pipes.nf +++ b/modules/local/annotation_pipes.nf @@ -9,7 +9,18 @@ process ANNOTATION_PIPES { input: tuple val(meta), path(vcf), path(vcf_tbi) - tuple val(meta2),path(enchangers),path(enchangers_i),path(cpgislands),path(cpgislands_i),path(tfbscons),path(tfbscons_i),path(encode_dnase),path(encode_dnase_i),path(mirnas_snornas),path(mirnas_snornas_i),path(cosmic),file(cosmic_i),path(mirbase),path(mirbase_i),path(mir_targets),path(mir_targets_i),path(cgi_mountains),path(cgi_mountains_i),path(phastconselem),path(phastconselem_i),path(encode_tfbs),path(encode_tfbs_i),path(mirnas_sncrnas),path(mirnas_sncrnas_i) + tuple path(enchangers),path(enchangers_i) + tuple path(cpgislands),path(cpgislands_i) + tuple path(tfbscons),path(tfbscons_i) + tuple path(encode_dnase),path(encode_dnase_i) + tuple path(mirnas_snornas),path(mirnas_snornas_i) + tuple path(cosmic),file(cosmic_i) + tuple path(mirbase),path(mirbase_i) + tuple path(mir_targets),path(mir_targets_i) + tuple path(cgi_mountains),path(cgi_mountains_i) + tuple path(phastconselem),path(phastconselem_i) + tuple path(encode_tfbs),path(encode_tfbs_i) + tuple path(mirnas_sncrnas),path(mirnas_sncrnas_i) output: tuple val(meta), path('*.deepanno.vcf.gz'), path('*.deepanno.vcf.gz.tbi') , emit: vcf diff --git a/modules/local/annovar.nf b/modules/local/annovar.nf index 99c8a75..d75354c 100644 --- a/modules/local/annovar.nf +++ b/modules/local/annovar.nf @@ -1,6 +1,5 @@ //# Gene annotation with annovar // PROCESS ANNOVAR table_annovar -// working database is annovar_Feb2016 process ANNOVAR { tag "$meta.id" @@ -11,8 +10,8 @@ process ANNOVAR { 'docker://kubran/odcf_platypusindelcalling:v1' :'kubran/odcf_platypusindelcalling:v1' }" input: - tuple val(meta) , path(ch_vcf), path(annovar_bed) - each file(annovar_table) + tuple val(meta) , path(ch_vcf), path(annovar_bed) + path(annovar_table) val(chrprefix) output: diff --git a/modules/local/indel_reliability_pipe.nf b/modules/local/indel_reliability_pipe.nf index 0311f2c..a225f09 100644 --- a/modules/local/indel_reliability_pipe.nf +++ b/modules/local/indel_reliability_pipe.nf @@ -10,7 +10,13 @@ process INDEL_RELIABILITY_PIPE { input: tuple val(meta),path(ch_vcf),path(ch_vcf_i) - tuple val(meta2),path(repeatmasker),path(repeatmasker_i),path(dacblacklist),path(dacblacklist_i),path(dukeexcluded),path(dukeexcluded_i),path(hiseqdepth),path(hiseqdepth_i),path(selfchain),path(selfchain_i),path(mapability),path(mapability_i),path(simpletandemrepeats),path(simpletandemrepeats_i) + tuple path(repeatmasker),path(repeatmasker_i) + tuple path(dacblacklist),path(dacblacklist_i) + tuple path(dukeexcluded),path(dukeexcluded_i) + tuple path(hiseqdepth),path(hiseqdepth_i) + tuple path(selfchain),path(selfchain_i) + tuple path(mapability),path(mapability_i) + tuple path(simpletandemrepeats),path(simpletandemrepeats_i) output: tuple val(meta), path('*.annotated.vcf.gz'), path('*.annotated.vcf.gz.tbi') , emit: vcf diff --git a/modules/local/sample_swap.nf b/modules/local/sample_swap.nf index a01612a..3072baa 100644 --- a/modules/local/sample_swap.nf +++ b/modules/local/sample_swap.nf @@ -10,9 +10,12 @@ process SAMPLE_SWAP { input: tuple val(meta) , path(ch_vcf), path(ch_vcf_i), val(tumorname), val(controlname) tuple path(ref) , path(ref_fai) - each path(chrlength_file) - each path(genemodel) - tuple val(meta2),path(localcontroltindawgs), path(localcontroltindawgs_tbi),path(localcontroltindawes),path(localcontroltindawes_tbi),path(gnomadgenomes),path(gnomadgenomes_tbi),path(gnomadexomes),path(gnomadexomes_tbi) + path(chrlength_file) + path(genemodel) + tuple path(localcontroltindawgs), path(localcontroltindawgs_tbi) + tuple path(localcontroltindawes),path(localcontroltindawes_tbi) + tuple path(gnomadgenomes),path(gnomadgenomes_tbi) + tuple path(gnomadexomes),path(gnomadexomes_tbi) val chrprefix output: diff --git a/modules/local/visualize.nf b/modules/local/visualize.nf index a682eea..4dbeeb3 100644 --- a/modules/local/visualize.nf +++ b/modules/local/visualize.nf @@ -10,7 +10,7 @@ process VISUALIZE { input: tuple val(meta) ,path(vcf) tuple path(ref) ,path(ref_fai) - tuple val(meta2),path(repeatmasker) ,path(repeatmasker_tbi) + tuple path(repeatmasker) ,path(repeatmasker_tbi) output: tuple val(meta) , path('*.indel_somatic_functional_combined.pdf') , emit: pdf, optional: true diff --git a/nextflow.config b/nextflow.config index bb99567..32e4347 100644 --- a/nextflow.config +++ b/nextflow.config @@ -35,6 +35,7 @@ params { crit_evs_maxmaf = 0 // default value: 1.0 crit_1kgenomes_maxmaf = 0 // default value: 0.01 crit_localcontrol_maxmaf = 0 // default value: 0.05 + filter_non_clinic = false // default value: false // screenshot options max_var_screenshots = 100 // default value diff --git a/nextflow_schema.json b/nextflow_schema.json index 9d062a3..d0c96d0 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -475,6 +475,12 @@ "default": "", "fa_icon": "fas fa-annotation", "description": "Max MAF for Local Control filtration. Only apply if annotation is done" + }, + "filter_non_clinic": { + "type": "boolean", + "default": "", + "fa_icon": "fas fa-annotation", + "description": "If true, dbSNP filtration will be applied. Only apply if annotation is done" } } }, diff --git a/run_pipeline.sh b/run_pipeline.sh index 16aaef9..41f472f 100644 --- a/run_pipeline.sh +++ b/run_pipeline.sh @@ -1,3 +1,3 @@ #!/bin/bash module load nextflow/22.07.1-edge -nextflow run main.nf -profile test,singularity --input testdata/samplesheet_test.csv \ No newline at end of file +nextflow run main.nf -profile dkfz_cluster_38,singularity --input testdata/samplesheet_test.csv -resume \ No newline at end of file diff --git a/subworkflows/local/indel_annotation.nf b/subworkflows/local/indel_annotation.nf index 29d800f..6333a29 100644 --- a/subworkflows/local/indel_annotation.nf +++ b/subworkflows/local/indel_annotation.nf @@ -16,9 +16,33 @@ include { ENSEMBLVEP_DOWNLOAD } from '../../modules/nf-core/modules/ensemblve workflow INDEL_ANNOTATION { take: vcf_ch // channel: [val(meta), vcf.gz, vcf.gz.tbi ,val(tumorname), val(controlname) ] - annotate_vcf_ref // channel: [val(meta2),file(kgenome),file(kgenome_i),file(dbsnpindel),file(dbsnpindel_i),file(exac),file(exac_i),file(evs),file(evs_i),file(localcontrolwgs),file(localcontrolwgs_i),file(localcontrolwes),file(localcontrolwes_i),file(gnomadgenomes),file(gnomadgenomes_i),file(gnomadexomes),file(gnomadexomes_i)] - realibility_ref // channel: [val(meta2),file(repeatmasker),file(repeatmasker_i),file(dacblacklist),file(dacblacklist_i),file(dukeexcluded),file(dukeexcluded_i),file(hiseqdepth),file(hiseqdepth_i),file(selfchain),file(selfchain_i),file(mapability),file(mapability_i),file(simpletandemrepeats),file(simpletandemrepeats_i)] - deepanno_ref // channel: [val(meta2),file(enchangers),file(enchangers_i),file(cpgislands),file(cpgislands_i),file(tfbscons),file(tfbscons_i),tuple file(encode_dnase),file(encode_dnase_i),file(mirnas_snornas),file(mirnas_snornas_i),file(cosmic),file(cosmic_i),file(mirbase),file(mirbase_i),file(mir_targets),file(mir_targets_i),file(cgi_mountains),file(cgi_mountains_i),file(phastconselem),file(phastconselem_i),file(encode_tfbs),file(encode_tfbs_i),file(mirnas_sncrnas),file(mirnas_sncrnas_i)] + kgenome // channel: [file,index] + dbsnpindel // channel: [file,index] + exac // channel: [file,index] + evs // channel: [file,index] + localcontrolwgs // channel: [file,index] + localcontrolwes // channel: [file,index] + gnomadgenomes // channel: [file,index] + gnomadexomes // channel: [file,index] + repeatmasker // channel: [file,index] + dacblacklist // channel: [file,index] + dukeexcluded // channel: [file,index] + hiseqdepth // channel: [file,index] + selfchain // channel: [file,index] + mapability // channel: [file,index] + simpletandemrepeats // channel: [file,index] + enchangers // channel: [file,index] + cpgislands // channel: [file,index] + tfbscons // channel: [file,index] + encode_dnase // channel: [file,index] + mirnas_snornas // channel: [file,index] + cosmic // channel: [file,index] + mirbase // channel: [file,index] + mir_targets // channel: [file,index] + cgi_mountains // channel: [file,index] + phastconselem // channel: [file,index] + encode_tfbs // channel: [file,index] + mirnas_sncrnas // channel: [file,index] chr_prefix // val channel: [prefix] ref // channel [fasta,fai] annodb // channel: [table_annovar_dir] @@ -35,7 +59,7 @@ workflow INDEL_ANNOTATION { input_ch = vcf_ch.map{ it -> tuple( it[0], it[1], it[2])} ANNOTATE_VCF ( input_ch, - annotate_vcf_ref, + kgenome,dbsnpindel,exac,evs,localcontrolwgs,localcontrolwes,gnomadgenomes,gnomadexomes, chr_prefix ) versions = versions.mix(ANNOTATE_VCF.out.versions) @@ -84,7 +108,7 @@ workflow INDEL_ANNOTATION { // RUN annotate_vcf.pl : BED files are used to annotate variants INDEL_RELIABILITY_PIPE( annotated_vcf, - realibility_ref + repeatmasker,dacblacklist,dukeexcluded,hiseqdepth,selfchain,mapability,simpletandemrepeats ) versions = versions.mix(INDEL_RELIABILITY_PIPE.out.versions) @@ -101,7 +125,8 @@ workflow INDEL_ANNOTATION { input_ch = vcf_ch.join(INDEL_RELIABILITY_PIPE.out.vcf) input_ch = input_ch.map{ it -> tuple( it[0], it[3], it[4], it[5], it[6])} CONFIDENCE_ANNOTATION( - input_ch, ref_type + input_ch, + ref_type ) ann_vcf_ch = CONFIDENCE_ANNOTATION.out.vcf_ann versions = versions.mix(CONFIDENCE_ANNOTATION.out.versions) @@ -114,7 +139,7 @@ workflow INDEL_ANNOTATION { // ANNOTATION_PIPES ( ann_vcf_ch, - deepanno_ref + enchangers, cpgislands,tfbscons,encode_dnase,mirnas_snornas,cosmic,mirbase,mir_targets,cgi_mountains,phastconselem,encode_tfbs,mirnas_sncrnas ) ann_vcf_ch = ANNOTATION_PIPES.out.vcf versions = versions.mix(ANNOTATION_PIPES.out.versions) diff --git a/testdata/samplesheet_test.csv b/testdata/samplesheet_test.csv index 452648c..90febf3 100644 --- a/testdata/samplesheet_test.csv +++ b/testdata/samplesheet_test.csv @@ -1,2 +1,4 @@ sample,tumor,tumor_index,control,control_index -test_withcontrol,testdata/WES_LL_T_1_test.bam,testdata/WES_LL_T_1_test.bam.bai,testdata/WES_LL_N_1_test.bam,testdata/WES_LL_N_1_test.bam.bai \ No newline at end of file +test,testdata/WES_LL_T_1_test.bam,testdata/WES_LL_T_1_test.bam.bai,testdata/WES_LL_N_1_test.bam,testdata/WES_LL_N_1_test.bam.bai +test_2,testdata/WES_LL_T_1_test.bam,testdata/WES_LL_T_1_test.bam.bai,testdata/WES_LL_N_1_test.bam,testdata/WES_LL_N_1_test.bam.bai +test_3,testdata/WES_LL_T_1_test.bam,testdata/WES_LL_T_1_test.bam.bai,testdata/WES_LL_N_1_test.bam,testdata/WES_LL_N_1_test.bam.bai \ No newline at end of file diff --git a/workflows/platypusindelcalling.nf b/workflows/platypusindelcalling.nf index 6fd5a96..d4508ed 100644 --- a/workflows/platypusindelcalling.nf +++ b/workflows/platypusindelcalling.nf @@ -55,117 +55,88 @@ if (params.annotation_tool.contains("annovar")){ // Reference genome ref = Channel.fromPath([params.fasta,params.fasta_fai], checkIfExists: true).collect() chr_prefix = Channel.value(params.chr_prefix) -chrlength = params.chrom_sizes ? Channel.fromPath(params.chrom_sizes, checkIfExists: true) : Channel.empty() +chrlength = params.chrom_sizes ? Channel.fromPath(params.chrom_sizes, checkIfExists: true).collect() : Channel.empty() // Input samplesheet if (params.input) { ch_input = file(params.input) } else { exit 1, 'Input samplesheet not specified!' } // Annotation databases -kgenome = params.k_genome ? Channel.fromPath([params.k_genome,params.k_genome +'.tbi'], checkIfExists: true).collect().map{[[id: "annotate_vcf_ref"], it[0],it[1]]} - : Channel.of([[id: "annotate_vcf_ref"],[],[]]) -dbsnpindel = params.dbsnp_indel ? Channel.fromPath([params.dbsnp_indel, params.dbsnp_indel + '.tbi'], checkIfExists: true).collect().map{[[id: "annotate_vcf_ref"], it[0],it[1]]} - : Channel.of([[id: "annotate_vcf_ref"],[],[]]) -exac = params.exac_file ? Channel.fromPath([params.exac_file, params.exac_file + '.tbi'], checkIfExists: true).collect().map{[[id: "annotate_vcf_ref"], it[0],it[1]]} - : Channel.of([[id: "annotate_vcf_ref"],[],[]]) -evs = params.evs_file ? Channel.fromPath([params.evs_file, params.evs_file + '.tbi'], checkIfExists: true).collect().map{[[id: "annotate_vcf_ref"], it[0],it[1]]} - : Channel.of([[id: "annotate_vcf_ref"],[],[]]) -localcontrolwgs = params.local_control_wgs ? Channel.fromPath([params.local_control_wgs,params.local_control_wgs + '.tbi' ], checkIfExists: true).collect().map{[[id: "annotate_vcf_ref"], it[0],it[1]]} - : Channel.of([[id: "annotate_vcf_ref"],[],[]]) -localcontrolwes = params.local_control_wes ? Channel.fromPath([params.local_control_wes,params.local_control_wes + '.tbi' ], checkIfExists: true).collect().map{[[id: "annotate_vcf_ref"], it[0],it[1]]} - : Channel.of([[id: "annotate_vcf_ref"],[],[]]) -gnomadgenomes = params.gnomad_genomes ? Channel.fromPath([params.gnomad_genomes, params.gnomad_genomes + '.tbi'], checkIfExists: true).collect().map{[[id: "annotate_vcf_ref"], it[0],it[1]]} - : Channel.of([[id: "annotate_vcf_ref"],[],[]]) -gnomadexomes = params.gnomad_exomes ? Channel.fromPath([params.gnomad_exomes, params.gnomad_exomes + '.tbi'], checkIfExists: true).collect().map{[[id: "annotate_vcf_ref"], it[0],it[1]]} - : Channel.of([[id: "annotate_vcf_ref"],[],[]]) - -annotate_vcf_ref = kgenome.join(dbsnpindel) - .join(exac) - .join(evs) - .join(localcontrolwgs) - .join(localcontrolwes) - .join(gnomadgenomes) - .join(gnomadexomes) +kgenome = params.k_genome ? Channel.fromPath([params.k_genome,params.k_genome +'.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +dbsnpindel = params.dbsnp_indel ? Channel.fromPath([params.dbsnp_indel, params.dbsnp_indel + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +exac = params.exac_file ? Channel.fromPath([params.exac_file, params.exac_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +evs = params.evs_file ? Channel.fromPath([params.evs_file, params.evs_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +localcontrolwgs = params.local_control_wgs ? Channel.fromPath([params.local_control_wgs,params.local_control_wgs + '.tbi' ], checkIfExists: true).collect() + : Channel.value([[],[]]) +localcontrolwes = params.local_control_wes ? Channel.fromPath([params.local_control_wes,params.local_control_wes + '.tbi' ], checkIfExists: true).collect() + : Channel.value([[],[]]) +gnomadgenomes = params.gnomad_genomes ? Channel.fromPath([params.gnomad_genomes, params.gnomad_genomes + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +gnomadexomes = params.gnomad_exomes ? Channel.fromPath([params.gnomad_exomes, params.gnomad_exomes + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) // Annovar table folder -annodb = params.annovar_path ? Channel.fromPath(params.annovar_path + '/humandb/') +annodb = params.annovar_path ? Channel.fromPath(params.annovar_path + '/humandb/').collect() : Channel.empty() // VEP cache -vep_cache_db = params.vep_cache ? Channel.fromPath(params.vep_cache).collect() : [] +vep_cache_db = params.vep_cache ? Channel.fromPath(params.vep_cache).collect() : [] // Realiability files -repeatmasker = params.repeat_masker ? Channel.fromPath([params.repeat_masker, params.repeat_masker + '.tbi'], checkIfExists: true).collect().map{[[id: "realibility_ref"], it[0],it[1]]} - : Channel.of([[id: "realibility_ref"],[],[]]) -dacblacklist = params.dac_blacklist ? Channel.fromPath([params.dac_blacklist, params.dac_blacklist + '.tbi'], checkIfExists: true).collect().map{[[id: "realibility_ref"], it[0],it[1]]} - : Channel.of([[id: "realibility_ref"],[],[]]) -dukeexcluded = params.duke_excluded ? Channel.fromPath([params.duke_excluded, params.duke_excluded + '.tbi'], checkIfExists: true).collect().map{[[id: "realibility_ref"], it[0],it[1]]} - : Channel.of([[id: "realibility_ref"],[],[]]) -hiseqdepth = params.hiseq_depth ? Channel.fromPath([params.hiseq_depth, params.hiseq_depth + '.tbi'], checkIfExists: true).collect().map{[[id: "realibility_ref"], it[0],it[1]]} - : Channel.of([[id: "realibility_ref"],[],[]]) -selfchain = params.self_chain ? Channel.fromPath([params.self_chain, params.self_chain + '.tbi'], checkIfExists: true).collect().map{[[id: "realibility_ref"], it[0],it[1]]} - : Channel.of([[id: "realibility_ref"],[],[]]) -mapability = params.mapability_file ? Channel.fromPath([params.mapability_file, params.mapability_file + '.tbi'], checkIfExists: true).collect().map{[[id: "realibility_ref"], it[0],it[1]]} - : Channel.of([[id: "realibility_ref"],[],[]]) -simpletandemrepeats = params.simple_tandemrepeats ? Channel.fromPath([params.simple_tandemrepeats, params.simple_tandemrepeats + '.tbi'], checkIfExists: true).collect().map{[[id: "realibility_ref"], it[0],it[1]]} - : Channel.of([[id: "realibility_ref"],[],[]]) - -realibility_ref = repeatmasker.join(dacblacklist) - .join(dukeexcluded) - .join(hiseqdepth) - .join(selfchain) - .join(mapability) - .join(simpletandemrepeats) +repeatmasker = params.repeat_masker ? Channel.fromPath([params.repeat_masker, params.repeat_masker + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +dacblacklist = params.dac_blacklist ? Channel.fromPath([params.dac_blacklist, params.dac_blacklist + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +dukeexcluded = params.duke_excluded ? Channel.fromPath([params.duke_excluded, params.duke_excluded + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +hiseqdepth = params.hiseq_depth ? Channel.fromPath([params.hiseq_depth, params.hiseq_depth + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +selfchain = params.self_chain ? Channel.fromPath([params.self_chain, params.self_chain + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +mapability = params.mapability_file ? Channel.fromPath([params.mapability_file, params.mapability_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +simpletandemrepeats = params.simple_tandemrepeats ? Channel.fromPath([params.simple_tandemrepeats, params.simple_tandemrepeats + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) // Indel Deep Annotation files -enchangers = params.enchancer_file ? Channel.fromPath([params.enchancer_file, params.enchancer_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -cpgislands = params.cpgislands_file ? Channel.fromPath([params.cpgislands_file, params.cpgislands_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -tfbscons = params.tfbscons_file ? Channel.fromPath([params.tfbscons_file, params.tfbscons_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -encode_dnase = params.encode_dnase_file ? Channel.fromPath([params.encode_dnase_file, params.encode_dnase_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -mirnas_snornas = params.mirnas_snornas_file ? Channel.fromPath([params.mirnas_snornas_file, params.mirnas_snornas_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -mirnas_sncrnas = params.mirna_sncrnas_file ? Channel.fromPath([params.mirna_sncrnas_file, params.mirna_sncrnas_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -cosmic = params.cosmic_file ? Channel.fromPath([params.cosmic_file, params.cosmic_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -mirbase = params.mirbase_file ? Channel.fromPath([params.mirbase_file, params.mirbase_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -mir_targets = params.mir_targets_file ? Channel.fromPath([params.mir_targets_file, params.mir_targets_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -cgi_mountains = params.cgi_mountains_file ? Channel.fromPath([params.cgi_mountains_file, params.cgi_mountains_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -phastconselem = params.phastconselem_file ? Channel.fromPath([params.phastconselem_file, params.phastconselem_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -encode_tfbs = params.encode_tfbs_file ? Channel.fromPath([params.encode_tfbs_file, params.encode_tfbs_file + '.tbi'], checkIfExists: true).collect().map{[[id: "deepanno_ref"], it[0],it[1]]} - : Channel.of([[id: "deepanno_ref"],[],[]]) -deepanno_ref = enchangers.join(cpgislands) - .join(tfbscons) - .join(encode_dnase) - .join(mirnas_snornas) - .join(cosmic) - .join(mirbase) - .join(mir_targets) - .join(cgi_mountains) - .join(phastconselem) - .join(encode_tfbs) - .join(mirnas_sncrnas) +enchangers = params.enchancer_file ? Channel.fromPath([params.enchancer_file, params.enchancer_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +cpgislands = params.cpgislands_file ? Channel.fromPath([params.cpgislands_file, params.cpgislands_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +tfbscons = params.tfbscons_file ? Channel.fromPath([params.tfbscons_file, params.tfbscons_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +encode_dnase = params.encode_dnase_file ? Channel.fromPath([params.encode_dnase_file, params.encode_dnase_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +mirnas_snornas = params.mirnas_snornas_file ? Channel.fromPath([params.mirnas_snornas_file, params.mirnas_snornas_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +mirnas_sncrnas = params.mirna_sncrnas_file ? Channel.fromPath([params.mirna_sncrnas_file, params.mirna_sncrnas_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +cosmic = params.cosmic_file ? Channel.fromPath([params.cosmic_file, params.cosmic_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +mirbase = params.mirbase_file ? Channel.fromPath([params.mirbase_file, params.mirbase_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +mir_targets = params.mir_targets_file ? Channel.fromPath([params.mir_targets_file, params.mir_targets_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +cgi_mountains = params.cgi_mountains_file ? Channel.fromPath([params.cgi_mountains_file, params.cgi_mountains_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +phastconselem = params.phastconselem_file ? Channel.fromPath([params.phastconselem_file, params.phastconselem_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +encode_tfbs = params.encode_tfbs_file ? Channel.fromPath([params.encode_tfbs_file, params.encode_tfbs_file + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) // Tinda files genemodel = params.genemodel_bed ? Channel.fromPath(params.genemodel_bed, checkIfExists: true).collect() : Channel.empty() -localcontroltindawgs = params.local_control_tinda_wgs ? Channel.fromPath([params.local_control_tinda_wgs,params.local_control_tinda_wgs + '.tbi' ], checkIfExists: true).collect().map{[[id: "tinda_ref"], it[0],it[1]]} - : Channel.of([[id: "tinda_ref"],[],[]]) -localcontroltindawes = params.local_control_tinda_wes ? Channel.fromPath([params.local_control_tinda_wes, params.local_control_tinda_wes + '.tbi'], checkIfExists: true).collect().map{[[id: "tinda_ref"], it[0],it[1]]} - : Channel.of([[id: "tinda_ref"],[],[]]) -gnomadgenomes_tinda = params.gnomad_genomes_tinda ? Channel.fromPath([params.gnomad_genomes_tinda, params.gnomad_genomes_tinda + '.tbi'], checkIfExists: true).collect().map{[[id: "tinda_ref"], it[0],it[1]]} - : Channel.of([[id: "tinda_ref"],[],[]]) -gnomadexomes_tinda = params.gnomad_exomes_tinda ? Channel.fromPath([params.gnomad_exomes_tinda, params.gnomad_exomes_tinda + '.tbi'], checkIfExists: true).collect().map{[[id: "tinda_ref"], it[0],it[1]]} - : Channel.of([[id: "tinda_ref"],[],[]]) -tinda_ref = localcontroltindawgs.join(localcontroltindawes) - .join(gnomadgenomes_tinda) - .join(gnomadexomes_tinda) +localcontroltindawgs = params.local_control_tinda_wgs ? Channel.fromPath([params.local_control_tinda_wgs,params.local_control_tinda_wgs + '.tbi' ], checkIfExists: true).collect() + : Channel.value([[],[]]) +localcontroltindawes = params.local_control_tinda_wes ? Channel.fromPath([params.local_control_tinda_wes, params.local_control_tinda_wes + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +gnomadgenomes_tinda = params.gnomad_genomes_tinda ? Channel.fromPath([params.gnomad_genomes_tinda, params.gnomad_genomes_tinda + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) +gnomadexomes_tinda = params.gnomad_exomes_tinda ? Channel.fromPath([params.gnomad_exomes_tinda, params.gnomad_exomes_tinda + '.tbi'], checkIfExists: true).collect() + : Channel.value([[],[]]) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -274,9 +245,9 @@ workflow PLATYPUSINDELCALLING { if (params.runIndelAnnotation) { INDEL_ANNOTATION( ch_vcf, - annotate_vcf_ref, - realibility_ref, - deepanno_ref, + kgenome,dbsnpindel,exac,evs,localcontrolwgs,localcontrolwes,gnomadgenomes,gnomadexomes, + repeatmasker,dacblacklist,dukeexcluded,hiseqdepth,selfchain,mapability,simpletandemrepeats, + enchangers, cpgislands,tfbscons,encode_dnase,mirnas_snornas,cosmic,mirbase,mir_targets,cgi_mountains,phastconselem,encode_tfbs,mirnas_sncrnas, chr_prefix, ref, annodb, @@ -317,7 +288,7 @@ workflow PLATYPUSINDELCALLING { ref, chrlength, genemodel, - tinda_ref, + localcontroltindawgs,localcontroltindawes,gnomadgenomes_tinda,gnomadexomes_tinda, chr_prefix ) ch_versions = ch_versions.mix(SAMPLE_SWAP.out.versions)