Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--cellranger_index only appears to work if --validate_params false provided #340

Closed
nick-youngblut opened this issue Jun 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@nick-youngblut
Copy link
Contributor

Description of the bug

The CellRanger index is a directory of files, and not just one. So, one should provide a directory via --cellranger_index; however, this throws the following error:

ERROR ~ ERROR: Validation of pipeline parameters failed!

 -- Check '.nextflow.log' file for details
The following invalid input values have been detected:

* --cellranger_index: '/large_experiments/multiomics/references/cellranger/refdata-gex-GRCh38-2024-A/' is not a file, but a directory (/large_experiments/multiomics/references/cellranger/refdata-gex-GRCh38-2024-A/)

It appears that the parameter validation is checking that the --cellranger_index is a file and not a directory. If I skip the validation via --validate_params false, then the pipeline will complete the CellRanger Count step.

Command used and terminal output

nextflow run main.nf \
   -profile test_full,singularity \
   -process.executor slurm \
   -process.queue cpu_batch \
   --aligner cellranger \
   --cellranger_index /large_experiments/multiomics/references/cellranger/refdata-gex-GRCh38-2024-A/ \
   --outdir test_run_output \
   --validate_params false

Relevant files

No response

System information

Nextflow version: 23.10.1.5891
Hardware: HPC
Executor: SLURM
Container engine: Apptainer
OS: Ubuntu
Version of nf-core/scrnaseq: 2.6.0

@nick-youngblut nick-youngblut added the bug Something isn't working label Jun 22, 2024
@nick-youngblut
Copy link
Contributor Author

Along these same lines:

In subworkflows/local/align_cellranger.nf, the code is:

        assert cellranger_index || (fasta && gtf):
            "Must provide either a cellranger index or both a fasta file ('--fasta') and a gtf file ('--gtf')."

        if (!cellranger_index) {
            // Filter GTF based on gene biotypes passed in params.modules
            CELLRANGER_MKGTF( gtf )
            ch_versions = ch_versions.mix(CELLRANGER_MKGTF.out.versions)

            // Make reference genome
            CELLRANGER_MKREF( fasta, CELLRANGER_MKGTF.out.gtf, "cellranger_reference" )
            ch_versions = ch_versions.mix(CELLRANGER_MKREF.out.versions)
            cellranger_index = CELLRANGER_MKREF.out.reference
        }

...so based on "Must provide either a cellranger index or both a fasta file ('--fasta') and a gtf file ('--gtf').", one can assume that if --cellranger_index is provided, then --gtf and --fasta do not need to be provided.

However, if one does not not provide --gtf and --fasta, then warnings are generated:

WARN: Access to undefined parameter `gtf` -- Initialise it to a default value eg. `params.gtf = some_value`
WARN: Access to undefined parameter `fasta` -- Initialise it to a default value eg. `params.fasta = some_value`

These warnings seem to be an unnecessary distraction (possibly leading to confusion), if the user provides --cellranger_index instead of --gtf and --fasta.

@grst
Copy link
Member

grst commented Aug 12, 2024

First problem should already be fixed in v2.7.
Second problem will be fixed in #354.

@grst grst mentioned this issue Aug 12, 2024
11 tasks
@grst
Copy link
Member

grst commented Aug 12, 2024

Fixed in dev

@grst grst closed this as completed Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants