diff --git a/CHANGELOG.md b/CHANGELOG.md index a23056fa..576a7389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#132](https://github.com/nf-core/rnavar/pull/132) - Added missing variantcaller key to meta map, to fix null value in publishDir - [#136](https://github.com/nf-core/rnavar/pull/136) - Replaced unzip module with gunzip, removed unzip module - [#138](https://github.com/nf-core/rnavar/pull/138) - Proper usage of GVCF +- [#142](https://github.com/nf-core/rnavar/pull/142) - Fix dbsnp channels ### Dependencies diff --git a/workflows/rnavar/main.nf b/workflows/rnavar/main.nf index bf06bb1c..ee776519 100755 --- a/workflows/rnavar/main.nf +++ b/workflows/rnavar/main.nf @@ -253,8 +253,11 @@ workflow RNAVAR { interval_flag = params.no_intervals // Run haplotyper even in the absence of dbSNP files if (!params.dbsnp){ - ch_dbsnp = [] - ch_dbsnp_tbi = [] + ch_dbsnp_for_haplotypecaller = [[id:'null'], []] + ch_dbsnp_for_haplotypecaller_tbi = [[id:'null'], []] + } else { + ch_dbsnp_for_haplotypecaller = ch_dbsnp.map{ vcf -> [[id:'dbsnp'], vcf] } + ch_dbsnp_for_haplotypecaller_tbi = ch_dbsnp_tbi.map{ tbi -> [[id:'dbsnp'], tbi] } } ch_haplotypecaller_vcf = Channel.empty() @@ -273,8 +276,8 @@ workflow RNAVAR { ch_fasta, ch_fasta_fai.map{ it -> [[id:it.baseName], it] }, ch_dict, - ch_dbsnp.map{ it -> [[id:it.baseName], it] }, - ch_dbsnp_tbi.map{ it -> [[id:it.baseName], it] } + ch_dbsnp_for_haplotypecaller, + ch_dbsnp_for_haplotypecaller_tbi ) ch_haplotypecaller_raw = GATK4_HAPLOTYPECALLER.out.vcf.map{ meta, vcf -> [ meta + [id:meta.sample] - meta.subMap('sample'), vcf ] }.groupTuple()