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)) diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index 120a19d5..ae2249c7 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -37,9 +37,20 @@ 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') + // collect paths from genome attributes file (e.g. iGenomes.config; optional) + params.fasta = getGenomeAttribute('fasta') + params.gtf = getGenomeAttribute('gtf') + 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') + } + 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) : []