From 57764c0647a3aa86752e40ca9b509d9cf79f8f58 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Tue, 5 Apr 2022 20:46:18 +0200 Subject: [PATCH 1/2] Change auxilary files from queue to value channels --- CHANGELOG.md | 2 ++ main.nf | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c036a45b3..6e3c32c2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### `Fixed` +- Fixed some auxiliary files (adapater list, snpcapture/pileupcaller/sexdeterrmine BED files, and pileupCaller SNP file, PMD reference mask) in some cases only be used against one sample + ### `Dependencies` ### `Deprecated` diff --git a/main.nf b/main.nf index d6d8ff03a..f5d38fe45 100644 --- a/main.nf +++ b/main.nf @@ -238,45 +238,47 @@ if ( !params.clip_adapters_list ) { Channel .fromPath("$projectDir/assets/nf-core_eager_dummy2.txt", checkIfExists: true) .ifEmpty { exit 1, "[nf-core/eager] error: adapters list file not found. Please check input. Supplied: --clip_adapters_list '${params.clip_adapters_list}'." } + .collect() .set {ch_adapterlist} } else { Channel .fromPath("${params.clip_adapters_list}", checkIfExists: true) .ifEmpty { exit 1, "[nf-core/eager] error: adapters list file not found. Please check input. Supplied: --clip_adapters_list '${params.clip_adapters_list}'." } + .collect() .set {ch_adapterlist} } if ( params.snpcapture_bed ) { - Channel.fromPath(params.snpcapture_bed, checkIfExists: true).set { ch_snpcapture_bed } + ch_snpcapture_bed = Channel.fromPath(params.snpcapture_bed, checkIfExists: true).collect() } else { - Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt").set { ch_snpcapture_bed } + ch_snpcapture_bed = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt").collect() } // Set up channel with pmdtools reference mask bedfile if (!params.pmdtools_reference_mask) { - ch_bedfile_for_reference_masking = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt") + ch_bedfile_for_reference_masking = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt").collect() } else { - ch_bedfile_for_reference_masking = Channel.fromPath(params.pmdtools_reference_mask, checkIfExists: true) + ch_bedfile_for_reference_masking = Channel.fromPath(params.pmdtools_reference_mask, checkIfExists: true).collect() } // SexDetermination channel set up and bedfile validation if (!params.sexdeterrmine_bedfile) { - ch_bed_for_sexdeterrmine = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt") + ch_bed_for_sexdeterrmine = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt").collect() } else { - ch_bed_for_sexdeterrmine = Channel.fromPath(params.sexdeterrmine_bedfile, checkIfExists: true) + ch_bed_for_sexdeterrmine = Channel.fromPath(params.sexdeterrmine_bedfile, checkIfExists: true).collect() } // pileupCaller channel generation and input checks for 'random sampling' genotyping if (!params.pileupcaller_bedfile) { - ch_bed_for_pileupcaller = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt") + ch_bed_for_pileupcaller = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy.txt").collect() } else { - ch_bed_for_pileupcaller = Channel.fromPath(params.pileupcaller_bedfile, checkIfExists: true) + ch_bed_for_pileupcaller = Channel.fromPath(params.pileupcaller_bedfile, checkIfExists: true).collect() } if (!params.pileupcaller_snpfile) { - ch_snp_for_pileupcaller = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy2.txt") + ch_snp_for_pileupcaller = Channel.fromPath("$projectDir/assets/nf-core_eager_dummy2.txt").collect() } else { - ch_snp_for_pileupcaller = Channel.fromPath(params.pileupcaller_snpfile, checkIfExists: true) + ch_snp_for_pileupcaller = Channel.fromPath(params.pileupcaller_snpfile, checkIfExists: true).collect() } // Create input channel for MALT database directory, checking directory exists From 43db446b2f465f3b1503f0a6dfc16384c5c1b84c Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Tue, 5 Apr 2022 20:50:06 +0200 Subject: [PATCH 2/2] New style changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e3c32c2c..6c93ccc00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### `Fixed` -- Fixed some auxiliary files (adapater list, snpcapture/pileupcaller/sexdeterrmine BED files, and pileupCaller SNP file, PMD reference mask) in some cases only be used against one sample +- Fixed some auxiliary files (adapater list, snpcapture/pileupcaller/sexdeterrmine BED files, and pileupCaller SNP file, PMD reference mask) in some cases only be used against one sample (❤ to @meganemichel for reporting, fix by @jfy133) ### `Dependencies`