From d5d3b98b428e45a87b0ec1a6049bc2f1075df5cd Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Thu, 8 Aug 2024 11:07:06 +0200 Subject: [PATCH 1/2] Update CHANGELOG --- CHANGELOG.md | 1 + workflows/scrnaseq.nf | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63d5b532..401c15c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - Add support for 10XV4 chemistry ([#348](https://github.com/nf-core/scrnaseq/pull/348)) +- Fix issues with predefined STAR index ([#350](https://github.com/nf-core/scrnaseq/pull/350)) ## v2.7.0 - 2024-06-03 diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index 5c789c57..e09341e5 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -67,7 +67,13 @@ workflow SCRNASEQ { ch_salmon_index = params.salmon_index ? file(params.salmon_index) : [] //star params - ch_star_index = params.star_index ? file(params.star_index) : [] + if (params.star_index) { + ch_star_index = Channel.fromPath(params.star_index).map{f -> [[id:f.baseName], f] } + } else if (params.genome ) { + ch_star_index = Channel.fromPath(params.genomes[params.genome]["star"]).map{ f -> [[id:f.baseName], f] } + } else { + ch_star_index = [] + } star_feature = params.star_feature //cellranger params From ed25fd5be8c161961d7e62d205e53f865dd06f92 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Mon, 12 Aug 2024 11:54:18 +0200 Subject: [PATCH 2/2] Update retrieving star index' --- workflows/scrnaseq.nf | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index e09341e5..3ccab9ec 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -67,13 +67,8 @@ workflow SCRNASEQ { ch_salmon_index = params.salmon_index ? file(params.salmon_index) : [] //star params - if (params.star_index) { - ch_star_index = Channel.fromPath(params.star_index).map{f -> [[id:f.baseName], f] } - } else if (params.genome ) { - ch_star_index = Channel.fromPath(params.genomes[params.genome]["star"]).map{ f -> [[id:f.baseName], f] } - } else { - ch_star_index = [] - } + star_index = params.star ? file(params.star_index, checkIfExists: true) : ( params.genome ? file( getGenomeAttribute('star'), checkIfExists: true ) : [] ) + ch_star_index = [[id: star_index.baseName], star_index] star_feature = params.star_feature //cellranger params