From f26f49bccf784db202ebe20b54612aa734e89417 Mon Sep 17 00:00:00 2001 From: maxulysse Date: Thu, 25 May 2023 17:26:07 +0200 Subject: [PATCH] fix dict channel issue when using --dict --- CHANGELOG.md | 1 + workflows/sarek.nf | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ba3500644..ec0cf45810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1014](https://github.com/nf-core/sarek/pull/1014) - Fix calls to `ensemblvep` and `snpeff` containers - [#1022](https://github.com/nf-core/sarek/pull/1022) - Fix call to variantrecalibrator. (Making sure that dbsnp_vqsr, known_indels_vqsr and known_snps_vqsr are channels, and not strings.) - [#1039](https://github.com/nf-core/sarek/pull/1039) - Remove concatenate_vcfs tests with singularity, as they are failing due to not enough space on GHA runners +- [#1040](https://github.com/nf-core/sarek/pull/1040) - Fix dict channel issue due to [#1032](https://github.com/nf-core/sarek/pull/1032) ### Deprecated diff --git a/workflows/sarek.nf b/workflows/sarek.nf index d054a9f757..08f2fe74a2 100644 --- a/workflows/sarek.nf +++ b/workflows/sarek.nf @@ -329,12 +329,17 @@ workflow SAREK { // Gather built indices or get them from the params // Built from the fasta file: - dict = params.dict ? Channel.fromPath(params.dict).collect() : PREPARE_GENOME.out.dict - fasta_fai = params.fasta_fai ? Channel.fromPath(params.fasta_fai).collect() : PREPARE_GENOME.out.fasta_fai - - bwa = params.bwa ? Channel.fromPath(params.bwa).collect() : PREPARE_GENOME.out.bwa - bwamem2 = params.bwamem2 ? Channel.fromPath(params.bwamem2).collect() : PREPARE_GENOME.out.bwamem2 - dragmap = params.dragmap ? Channel.fromPath(params.dragmap).collect() : PREPARE_GENOME.out.hashtable + dict = params.dict ? Channel.fromPath(params.dict).map{ it -> [ [id:'dict'], it ] }.collect() + : PREPARE_GENOME.out.dict + fasta_fai = params.fasta_fai ? Channel.fromPath(params.fasta_fai).collect() + : PREPARE_GENOME.out.fasta_fai + + bwa = params.bwa ? Channel.fromPath(params.bwa).collect() + : PREPARE_GENOME.out.bwa + bwamem2 = params.bwamem2 ? Channel.fromPath(params.bwamem2).collect() + : PREPARE_GENOME.out.bwamem2 + dragmap = params.dragmap ? Channel.fromPath(params.dragmap).collect() + : PREPARE_GENOME.out.hashtable // Gather index for mapping given the chosen aligner index_alignement = params.aligner == "bwa-mem" ? bwa : params.aligner == "bwa-mem2" ? bwamem2 :