Skip to content

feat(cellranger/count): support SRA three-file FASTQ inputs (_1/_2/_3) in renaming logic - #532

Open
emrunali wants to merge 2 commits into
nf-core:devfrom
emrunali:fix-sra-3fastq-renaming
Open

feat(cellranger/count): support SRA three-file FASTQ inputs (_1/_2/_3) in renaming logic#532
emrunali wants to merge 2 commits into
nf-core:devfrom
emrunali:fix-sra-3fastq-renaming

Conversation

@emrunali

Copy link
Copy Markdown

Summary

This PR extends the cellranger count module’s FASTQ renaming logic to handle SRA / fasterq-dump outputs that produce three files per sample (*_1/_2/_3.fastq(.gz)), which is common for 10x chemistries when run with --split-files --include-technical.
Specifically:

  • Detect SRA-style suffixes _1, _2, _3 in filenames.
  • Group files by prefix and, when _2 and _3 are present, map:
    • _2R1 (barcode+UMI),
    • _3R2 (cDNA),
    • _1 (if present) → I1 (sample index).
  • Keep existing behaviour for bcl2fastq-style R1/R2 filenames unchanged.
  • Emit a clear error if neither pattern (bcl2fastq or SRA _1/_2/_3) can be recognised.
    No changes were required in modules/nf-core/cellranger/count/main.nf; all logic is contained within cellranger_count.py.

Motivation / use case

Many public 10x datasets are only available in SRA. When using:

prefetch SRR9304758
fasterq-dump --split-files --include-technical SRR9304758.sra

nictru and others added 2 commits October 30, 2025 20:50
Release version 4.1.0 of pipeline
Handle fasterq-dump --split-files --include-technical output by mapping _2/_3 to R1/R2 and optionally renaming _1 to I1.

Made-with: Cursor
@nf-core-bot

Copy link
Copy Markdown
Member

Warning

Newer version of the nf-core template is available.

Your pipeline is using an old version of the nf-core template: 3.4.1.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation.

@emrunali
emrunali requested review from fmalmeida and grst March 13, 2026 18:10
@emrunali emrunali added the enhancement New feature or request label Mar 13, 2026
@emrunali emrunali moved this to Ready for review in Hackathon March 2026 Mar 13, 2026
@emrunali emrunali linked an issue Mar 13, 2026 that may be closed by this pull request

@fmalmeida fmalmeida left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @emrunali ,
Many thanks for the work in it.

The cellranger module is a nf-core module, thus the work / changes cannot happen directly in the pipeline side.

They should happen first in the modules repo, and then, the pipeline will only be modified to fetch the latest version.

So, I will not be accepting this PR so we can review in the correct repo .

😄

@emrunali

Copy link
Copy Markdown
Author

Thanks @fmalmeida, will do as you suggested. 🙂

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

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

Support for 3-file FASTQ inputs from SRA downloads

4 participants