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

Option to use cellranger pre-built reference #399

Closed
svigneau opened this issue Dec 4, 2024 · 4 comments
Closed

Option to use cellranger pre-built reference #399

svigneau opened this issue Dec 4, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@svigneau
Copy link

svigneau commented Dec 4, 2024

Description of feature

It would save time and computing resources if the pipeline could take cellranger pre-built references (downloadable here) instead of rebuilding them from FASTA and GTF files when using the cellranger or cellrangermulti aligner parameter.

@svigneau svigneau added the enhancement New feature or request label Dec 4, 2024
@grst
Copy link
Member

grst commented Dec 5, 2024

This should be fixed on dev, could you give it a try?

@svigneau
Copy link
Author

svigneau commented Dec 7, 2024

Thanks for pointing this out!

I tried the following, which worked out fine:

  1. Download a pre-built cellranger reference from this page using:
curl -O "https://cf.10xgenomics.com/supp/cell-exp/refdata-gex-GRCh38-2024-A.tar.gz"
tar -xzf refdata-gex-GRCh38-2024-A.tar.gz
  1. Modify the conf/igenomes.config file by adding the following genome:
'GRCh38-2024-A' {
     cellranger = '/path/to/refdata-gex-GRCh38-2024-A/'
 }
  1. Add the following line to my params.yaml file:
genome: 'GRCh38-2024-A'
  1. Run with:
nextflow run /path/to/scrnaseq/main.nf -params-file params.yaml -c nextflow.config

It feels a bit odd having to modify the pre-defined igenomes.config file, though, instead of being able to pass a custom genomes.config file. What do you think about adding this functionality?

@grst
Copy link
Member

grst commented Dec 9, 2024

Hi @svigneau,

the intended way to provide cellranger references would be via the --cellranger_index parameter.
It should also already be possible to override the genomes configuration in a custom config file and specify it with -c. Did you try that?

@svigneau
Copy link
Author

Thanks for the follow-up!

I tried both options and both worked :)

Here is what I did for reference:

  • Using the cellranger_index parameter:
    • Add cellranger_index: '/path/to/refdata-gex-GRCh38-2024-A/' to theparams.yaml file
    • Run locally with nextflow run /path/to/nf-core/scrnaseq/main.nf -params-file params.yaml -c nextflow.config
  • Using a cellranger-genomes.config file:
    • Create a cellranger-genomes.config file containing:
      params {
          genomes {
              'GRCh38-2024-A' {
                  cellranger = 'gs://svigneau-b2/references/refdata-gex-GRCh38-2024-A/'
              }
          }
      }
      
    • Add genome: 'GRCh38-2024-A' to the params.yaml file
    • Run locally with nextflow run /path/to/nf-core/scrnaseq/main.nf -params-file params.yaml -c nextflow.config -c cellranger-genomes.config

@grst grst closed this as completed Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants