fqtk icon indicating copy to clipboard operation
fqtk copied to clipboard

feat: Add support for CellularBarcode operator

Open msto opened this issue 1 month ago โ€ข 3 comments

Closes #66

msto avatar Nov 05 '25 21:11 msto

๐Ÿ“ 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_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. ๐Ÿ“ Description โ€” Summarize the main change in 50โ€“60 words, explaining what was done.
  2. ๐Ÿ““ References โ€” List relevant issues, discussions, documentation, or related PRs.
  3. ๐Ÿ“ฆ Dependencies & Requirements โ€” Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. ๐Ÿ“Š Contributor Summary โ€” Include a Markdown table showing contributions: | Contributor | Lines Added | Lines Removed | Files Changed |
  5. โœ”๏ธ 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.

โค๏ธ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 05 '25 21:11 coderabbitai[bot]

@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?

msto avatar Nov 05 '25 22:11 msto

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

clintval avatar Nov 05 '25 23:11 clintval