feat(multiplex-quant): expose --sample-bc-ori as a CLI override#199
Open
an-altosian wants to merge 2 commits into
Open
feat(multiplex-quant): expose --sample-bc-ori as a CLI override#199an-altosian wants to merge 2 commits into
an-altosian wants to merge 2 commits into
Conversation
Add `--sample-bc-ori {fw,rev}` to `simpleaf multiplex-quant` so users can
override the chemistry preset's sample barcode orientation without forking
the preset. Useful for cycle-plan variants (e.g. 10x Flex Configuration B)
where the sample BC is read from the opposite strand vs the canonical preset.
Precedence (matches existing `--expected-ori` / `--geometry` patterns):
1. user-supplied `--sample-bc-ori` CLI value
2. chemistry preset's declared `sample_bc_ori` field
3. omit the flag (alevin-fry default = forward)
The CLI uses `fw`/`rev` shorthand mirroring `--expected-ori`; these are
translated to alevin-fry's `forward`/`reverse` vocabulary before forwarding.
Preset JSON values pass through untouched, so chemistries.json is unaffected.
Refs: COMBINE-lab#198
2 tasks
an-altosian
added a commit
to an-altosian/simpleaf
that referenced
this pull request
May 29, 2026
The published RTD docs were stuck at 0.19.0 in the page title. Bumps conf.py:release to match Cargo.toml (0.25.0). While in the file, address several long-standing gaps in flex-quant-command.rst's `-h` snippet (and its surrounding prose) that accumulated between 0.19.0 and 0.25.0: - Add missing CLI flags to the help snippet: --geometry, --dict, --sample-correction-mode. - Move --sample-bc-list from "Probe Set Options" to "Reference Options" to match the actual help_heading in the source. - Carve --resolution out into a dedicated "Quantification Options" section, matching its help_heading. - Soften the Overview "needs" list to reflect that --chemistry is now optional when --geometry + --cell-bc-list are supplied (cycle-plan variants like 10x Flex Configuration B). - Rewrite the intro paragraph to call out the chemistry-vs-manual-override modes explicitly. Refs: COMBINE-lab#199 (--sample-bc-ori companion code PR)
Per design discussion: keep the CLI vocabulary consistent with the chemistry preset JSON (`sample_bc_ori: "forward" | "reverse"`) and with alevin-fry's own `--sample-bc-ori` flag (also `forward` / `reverse`). Drop the `fw`/`rev` shorthand and the in-process translation layer.
an-altosian
added a commit
to an-altosian/simpleaf
that referenced
this pull request
May 29, 2026
…here Per design discussion on PR COMBINE-lab#199: keep the CLI vocabulary consistent with the chemistry preset JSON and with alevin-fry's --sample-bc-ori. Update the -h snippet, "Chemistry preset structure" bullet, "Sample barcode orientation" prose, and both example commands.
Contributor
|
The CI failure is strange. It suggests an illegal instruction on the CI runner (which is pulling alevin-fry from bioconda). I'm not sure what to do about that. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
--sample-bc-ori {forward,reverse}tosimpleaf multiplex-quant, completing the precedence pattern that--expected-oriand--geometryalready follow:sample_bc_oriforward)Resolves the use case in #198: cycle-plan variants like 10x Flex Configuration B (R1=28 / R2=90) where the sample BC is read from the opposite strand. Users can now run such variants with
--chemistry 10x-flexv2-gex-3p --geometry '...' --sample-bc-ori forwardwithout adding a new preset entry.Implementation notes
forward/reverse— matches the chemistry preset JSON ("sample_bc_ori": "forward" | "reverse") and alevin-fry's own--sample-bc-oriflag (verified in alevin-fry main.rs).generate-permit-list --sample-bc-ori.Option<String>field, it passes through verbatim. No breaking change to existingchemistries.json.both: alevin-fry's--sample-bc-orionly acceptsforward/reverse. No current preset declaresbotheither. Addingbothwould mean inventing semantics that don't exist downstream.Validation
End-to-end verified by running the same internal Config B Flex library two ways and confirming byte-identical results:
--chemistry 10x-flexv2-gex-3p-config-b(from the companion preset PR feat(chemistries): add 10x-flexv2-gex-3p-config-b preset #201, which declaressample_bc_ori: "forward").--chemistry 10x-flexv2-gex-3p(which declaressample_bc_ori: "reverse"in its JSON) +--sample-bc-ori forward+ matching--geometryoverride at the CLI.Both runs produced identical per-sample-well cell counts and read counts, identical wall-clock time, and
sample_bc_ori: Forwardin the resultingsample_info.json. That demonstrates:alevin-fry generate-permit-listcorrectly (the demultiplexing wells light up, instead of producing the noise-floor result the preset's declaredreversewould yield on Config B reads).CI status note
The
check_formattingjob fails on this PR with aSIGILLfromalevin-fry --versionduringtest_simpleaf.sh. This is a pre-existing failure on upstreammainsince commit52ccc73(the 0.25.0 release): the bioconda alevin-fry 0.15.0 binary appears to use CPU instructions not supported by the GHA runner. My PR does not touch any code path involved in the failure (set-pathsruns before any--sample-bc-oricode is exercised). Suggested fixes (cargo installfrom source in CI, or a bioconda rebuild) are out of scope for this PR; happy to send them separately if desired.Test plan
cargo checkpasses locally on the patched source.cargo build --releaseproduces a working binary that runs throughmultiplex-quant.--sample-bc-ori forwardon a real Config B Flex library yields realistic per-sample-well cell counts (matches cellranger multi ground truth at the well level).sample_bc_oriis recorded insample_info.jsonas the value passed at the CLI, confirming it flowed through toalevin-fry generate-permit-list.check_formattingCI job (pre-existing SIGILL on upstream main; see CI status note above).Refs
10x-flexv2-gex-3p-config-bchemistry preset that exercises the samesample_bc_orifield via the preset path)