From 128b18333c22ac2f5cad61d36d203b93a1312814 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Sat, 2 Nov 2024 15:23:22 +0000 Subject: [PATCH 1/7] Add pre-built cellranger, cellranger-arc simpleaf --- workflows/scrnaseq.nf | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index 120a19d5..f41752ec 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -37,9 +37,14 @@ workflow SCRNASEQ { error "Only cellranger supports `protocol = 'auto'`. Please specify the protocol manually!" } - params.fasta = getGenomeAttribute('fasta') - params.gtf = getGenomeAttribute('gtf') - params.star_index = getGenomeAttribute('star') + // collecting paths from genome attributes (optional) + params.fasta = getGenomeAttribute('fasta') + params.gtf = getGenomeAttribute('gtf') + params.star_index = getGenomeAttribute('star') + params.salmon_index = getGenomeAttribute('simpleaf') + params.txp2gene = getGenomeAttribute('simpleaf_tx2pgene') + params.cellranger_index = getGenomeAttribute('cellranger') + params.cellranger_index = getGenomeAttribute('cellrangerarc') ch_genome_fasta = params.fasta ? file(params.fasta, checkIfExists: true) : [] ch_gtf = params.gtf ? file(params.gtf, checkIfExists: true) : [] From dd566c96819f7c2123665d0cb4dc46a967ec2b27 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Sat, 2 Nov 2024 15:39:17 +0000 Subject: [PATCH 2/7] Added pre-build iundex support to Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e6450ec..888e8852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Added support for pre-built indexes in `genomes.config` file for `cellranger`, `cellranger-arc`, `simpleaf` and `simpleaf txp2gene` ([#371](https://github.com/nf-core/scrnaseq/issues/371)) + ## v2.7.1 - 2024-08-13 - Fix that tests have not been executed with nf-test v0.9 ([#359](https://github.com/nf-core/scrnaseq/pull/359)) From 952a24c038d016d364833abe629a15bc457bda80 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Sat, 2 Nov 2024 15:40:56 +0000 Subject: [PATCH 3/7] better comment --- workflows/scrnaseq.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index f41752ec..12f6e3b8 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -37,7 +37,7 @@ workflow SCRNASEQ { error "Only cellranger supports `protocol = 'auto'`. Please specify the protocol manually!" } - // collecting paths from genome attributes (optional) + // collect paths from genome attributes file (e.g. iGenomes.config; optional) params.fasta = getGenomeAttribute('fasta') params.gtf = getGenomeAttribute('gtf') params.star_index = getGenomeAttribute('star') From d2478c1cf45dd03850ab245763e5c445e865c9f4 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Mon, 4 Nov 2024 20:21:09 +0000 Subject: [PATCH 4/7] make cellranger arc index conditional --- workflows/scrnaseq.nf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index 12f6e3b8..1e30b890 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -44,7 +44,10 @@ workflow SCRNASEQ { params.salmon_index = getGenomeAttribute('simpleaf') params.txp2gene = getGenomeAttribute('simpleaf_tx2pgene') params.cellranger_index = getGenomeAttribute('cellranger') - params.cellranger_index = getGenomeAttribute('cellrangerarc') + // Make cellranger-arc index overwriting conditional + if (params.aligner == "cellrangerarc") { + params.cellranger_index = getGenomeAttribute('cellrangerarc') + } ch_genome_fasta = params.fasta ? file(params.fasta, checkIfExists: true) : [] ch_gtf = params.gtf ? file(params.gtf, checkIfExists: true) : [] From 613a4c5ebbc3eb1c4f187fb202af49c460ca168b Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Tue, 5 Nov 2024 09:28:57 +0000 Subject: [PATCH 5/7] cleaner cellranger index declaration --- workflows/scrnaseq.nf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index 1e30b890..ceb60b7e 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -43,11 +43,14 @@ workflow SCRNASEQ { params.star_index = getGenomeAttribute('star') params.salmon_index = getGenomeAttribute('simpleaf') params.txp2gene = getGenomeAttribute('simpleaf_tx2pgene') - params.cellranger_index = getGenomeAttribute('cellranger') - // Make cellranger-arc index overwriting conditional - if (params.aligner == "cellrangerarc") { - params.cellranger_index = getGenomeAttribute('cellrangerarc') + + // Make cellranger or cellranger-arc index conditional + if (params.aligner in ["cellranger", "cellrangermulti"]){ + params.cellranger_index = getGenomeAttribute('cellranger') } + else if (params.aligner == "cellrangerarc") { + params.cellranger_index = getGenomeAttribute('cellrangerarc') + } ch_genome_fasta = params.fasta ? file(params.fasta, checkIfExists: true) : [] ch_gtf = params.gtf ? file(params.gtf, checkIfExists: true) : [] From 8c439095ee12c2f04f13aaaa277514954da56eca Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Tue, 5 Nov 2024 16:26:22 +0000 Subject: [PATCH 6/7] removed trailing whitespace --- workflows/scrnaseq.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index ceb60b7e..8e83d8ff 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -50,7 +50,7 @@ workflow SCRNASEQ { } else if (params.aligner == "cellrangerarc") { params.cellranger_index = getGenomeAttribute('cellrangerarc') - } + } ch_genome_fasta = params.fasta ? file(params.fasta, checkIfExists: true) : [] ch_gtf = params.gtf ? file(params.gtf, checkIfExists: true) : [] From d68c88337b86c4ce1ba13df9fda9cd8804e78fdc Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Tue, 5 Nov 2024 19:39:07 +0000 Subject: [PATCH 7/7] fixed space --- workflows/scrnaseq.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index 8e83d8ff..ae2249c7 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -43,7 +43,7 @@ workflow SCRNASEQ { params.star_index = getGenomeAttribute('star') params.salmon_index = getGenomeAttribute('simpleaf') params.txp2gene = getGenomeAttribute('simpleaf_tx2pgene') - + // Make cellranger or cellranger-arc index conditional if (params.aligner in ["cellranger", "cellrangermulti"]){ params.cellranger_index = getGenomeAttribute('cellranger')