Skip to content

Commit

Permalink
Merge pull request #390 from nf-core/use_indices
Browse files Browse the repository at this point in the history
Add pre-built indexes for Cellranger, Cellranger-arc, simpleaf and simpleaf txp2gene
  • Loading branch information
grst authored Nov 6, 2024
2 parents eaa74dd + d68c883 commit b5b061e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
17 changes: 14 additions & 3 deletions workflows/scrnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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) : []
Expand Down

0 comments on commit b5b061e

Please sign in to comment.