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

Fix: Support for --aligner cellrangerarc #441

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

matbonfanti
Copy link

@matbonfanti matbonfanti commented Mar 5, 2025

This PR introduces two changes to ensure the pipeline functions correctly when using --aligner cellrangerarc:

  • A dedicated parsing section structures the samplesheet channel to be compatible with the cellrangerarc module.
  • The raw and filtered gene expression matrices are now extracted from the cellrangerarc module output for further processing in the pipeline.

See issues #389 and #374

Testing

I have tested these changes locally subsampling FASTQ files from 10x Genomics, and the pipeline runs successfully. For reference, here is the samplesheet used in testing:

sample,fastq_1,fastq_2,fastq_barcode,sample_type
10k_PBMC,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_atac_S2_L001_R1_001.fastq.gz,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_atac_S2_L001_R2_001.fastq.gz,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_atac_S2_L001_R3_001.fastq.gz,atac
10k_PBMC,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_atac_S2_L002_R1_001.fastq.gz,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_atac_S2_L002_R2_001.fastq.gz,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_atac_S2_L002_R3_001.fastq.gz,atac
10k_PBMC,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_gex_S2_L001_R1_001.fastq.gz,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_gex_S2_L001_R2_001.fastq.gz,,gex
10k_PBMC,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_gex_S2_L002_R1_001.fastq.gz,/scratch/matteo.bonfanti/test_scrnaseq/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_gex_S2_L002_R2_001.fastq.gz,,gex

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/scrnaseq branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@matbonfanti matbonfanti self-assigned this Mar 5, 2025
@grst
Copy link
Member

grst commented Mar 6, 2025

Hi @matbonfanti,

thanks for working on this!
Would you by any chance also have time to implement a test-case for cellrangerarc? It is currently not covered by CI at all which is one of the reasons the bug you are fixing exists in the first case. See also #290.

@matbonfanti
Copy link
Author

Hi @grst, that was indeed the plan!

I have seen that on the test-dataset repo there is already a dataset for atac-seq (https://github.com/nf-core/test-datasets/tree/modules/data/genomics/homo_sapiens/10xgenomics/cellranger-atac) which I think would be a good test, for starters. In the long term I could make a new test using multiome data (atac+gex) that would be probably more appropriate, but it will definitely take much more time to implement.

If you agree, I will start including the atac-only test in this PR, so that atac alignment will be fixed soon in the dev branch. Then maybe I can make a new PR for the other test dataset.

@apeltzer apeltzer added this to the 4.1.0 milestone Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

Successfully merging this pull request may close these issues.

3 participants