scrnaseq
scrnaseq copied to clipboard
Crash when specifying existing --star_index using star aligner
Description of the bug
When specifying an existing STAR index using the --star_index parameter the pipeline crashes and gives the following error:
Missing process or function map([Script_396cc086$_runScript_closure1$_closure2$_closure5@20bc6f4d])
-- Check script '/hpc/ubec/tools/pipelines/nfcore/scrnaseq/./workflows/scrnaseq.nf' at line: 170 or see '.nextflow.log' file for more
details
This is because in this case the ch_star_index is defined as a file instead of a tuple which is expected by the starsolo subworkflow (and which is also returned by STAR_GENOMEGENERATE in case no existing star genome is specified).
scrnaseq.nf:
ch_star_index = params.star_index ? file(params.star_index) : []
This can be fixed by adjust the line above to:
ch_star_index = params.star_index ? Channel.fromPath(params.star_index).map{f -> [[id:f.baseName], f] } : []
Command used and terminal output
Command
nextflow run /path/to/nfcore/scrnaseq/main.nf \
--input /path/to/amplesheet.csv \
--star_index /path/to/reference/star \
--fasta /path/to/fasta.fna \
--gtf /path/to/reference.gtf \
--protocol 10XV3 \
--aligner star \
--outdir /path/to/output
Output:
N E X T F L O W ~ version 23.04.2
WARN: It appears you have never run this project before -- Option `-resume` is ignored
Launching `/hpc/ubec/tools/pipelines/nfcore/scrnaseq/main.nf` [mighty_pasteur] DSL2 - revision: bd078e3da5
[- ] process > NFCORE_SCRNASEQ:SCRNASEQ:INPUT_CHECK:SAMPLESHEET_CHECK -
Missing process or function map([Script_396cc086$_runScript_closure1$_closure2$_closure5@20bc6f4d])
-- Check script '/hpc/ubec/tools/pipelines/nfcore/scrnaseq/./workflows/scrnaseq.nf' at line: 170 or see '.nextflow.log' file for more details
### Relevant files
_No response_
### System information
* Nextflow version: 23.04.2
* Hardware: HPC
* Executor: Slurm
* Container engine: singularity
* OS: CentOS8 Rocky
* version of nf-core/scrnaseq: 2.4.1