fqtk
fqtk copied to clipboard
feat: Add support for CellularBarcode operator
Closes #66
๐ Walkthrough
Walkthrough
The PR adds cellular barcode (C) support across the demux pipeline and upgrades read-structure. Added ReadSet::cellular_barcode_segments(). SampleWriters gains cellular_barcode_writers: Option<Vec<W>> and into_parts() now returns five components. Demux wiring, writer-pool construction, write/close loops, header/write logic, output naming, and metrics/docs were updated to include cellular barcode handling and file suffixes. Public API changes expose the new field and into_parts shape. Tests, examples, and test data were extended to cover cellular barcode extraction and end-to-end flows.
Pre-merge checks and finishing touches
โ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | โ Passed | Title clearly and specifically describes the main change: adding support for the CellularBarcode operator. |
| Description check | โ Passed | Description references issue #66, which maps directly to the PR's objective of adding CellularBarcode operator support. |
| Linked Issues check | โ Passed | PR fully implements support for the C operator: ReadSet now has cellular_barcode_segments(), SampleWriters includes cellular_barcode_writers, demuxing logic processes cellular barcode reads, and tests verify the functionality [#66]. |
| Out of Scope Changes check | โ Passed | Changes are scoped to cellular barcode support: dependency update (read-structure 0.1.0โ0.2.0), demux.rs modifications for C operator handling, README updates, and related tests. All changes align with issue #66 objectives. |
| Docstring Coverage | โ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
โจ Finishing touches
๐งช Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
ms_66_c-operator
๐ Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
๐ฅ Commits
Reviewing files that changed from the base of the PR and between 20b1a3b03b64eb7a4ae4c8bbb7531048025796ac and 05a84de902f7eb9ae438c3f57ea4921ca5de5a2b.
๐ Files selected for processing (1)
README.md(5 hunks)
๐ Additional comments (1)
README.md (1)
52-107: Documentation updates for C operator look good. Changes correctly add cellular barcode (C) support throughout: operator definitions, extraction descriptions, output file naming conventions, and help text. All references are consistent and accurate.Also applies to: 136-136
[!TIP]
๐ Customizable high-level summaries are now available in beta!
You can now customize how CodeRabbit generates the high-level summary in your pull requests โ including its content, structure, tone, and formatting.
- Provide your own instructions using the
high_level_summary_instructionssetting.- Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
- Use
high_level_summary_in_walkthroughto move the summary from the description to the walkthrough section.Example instruction:
"Divide the high-level summary into five sections:
- ๐ Description โ Summarize the main change in 50โ60 words, explaining what was done.
- ๐ References โ List relevant issues, discussions, documentation, or related PRs.
- ๐ฆ Dependencies & Requirements โ Mention any new/updated dependencies, environment variable changes, or configuration updates.
- ๐ Contributor Summary โ Include a Markdown table showing contributions:
| Contributor | Lines Added | Lines Removed | Files Changed |- โ๏ธ Additional Notes โ Add any extra reviewer context. Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
@clintval AFAICT the README is autogenerated from the tool help doc. I've updated the tool docs accordingly.
I did run into one new question - the help mentions storing the sample and molecular barcodes in SAM tags. Is that just a helpful guide for downstream usage, or is there related functionality in this repo to update?
I did run into one new question - the help mentions storing the sample and molecular barcodes in SAM tags. Is that just a helpful guide for downstream usage, or is there related functionality in this repo to update?
I actually think that's a bug in the docs when they were copy-pasted from the Scala implementation of this tool. This tool (fqtk demux) merely writes out a bunch of FASTQs and not a SAM/BAM file. So the last two sentences of this paragraph should probably be deleted entirely:
https://github.com/fulcrumgenomics/fqtk/blob/f74eb6c4939c2db123067e50c7e76c07777ebdc2/src/bin/commands/demux.rs#L514-L519