Skip to content

solo: --soloUMIfiltering MultiGeneUMI_All (closes #144) - #152

Open
BenjaminDEMAILLE wants to merge 3 commits into
scverse:mainfrom
BenjaminDEMAILLE:bd/solo-umi-filter
Open

solo: --soloUMIfiltering MultiGeneUMI_All (closes #144)#152
BenjaminDEMAILLE wants to merge 3 commits into
scverse:mainfrom
BenjaminDEMAILLE:bd/solo-umi-filter

Conversation

@BenjaminDEMAILLE

@BenjaminDEMAILLE BenjaminDEMAILLE commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

--soloUMIfiltering MultiGeneUMI_All does what it is documented to do. Closes #144.

What changed

UmiFiltering::MultiGeneUmiAll becomes its own variant instead of an alias, and removes a UMI seen in more than one gene from all of them.

behaviour
STAR 2.7.11b no-op — parsed and stored, but the consumption site tests only the MultiGeneUMI flag, so selecting it leaves the filter off
STAR's documentation remove a UMI seen in more than one gene from all of them
this codebase, before same as MultiGeneUMI: keep the deepest-read gene

Why

Reproducing the no-op ships a flag that silently does nothing to anyone who read STAR's documentation. #144 records the choice, and it was raised there before any code changed, because "be faithful to STAR" and "do what the flag says" genuinely point in opposite directions here.

Divergence

DIVERGENCE.md §1.2, with the STAR source checked (SoloFeature_collapseUMIall.cpp, ParametersSolo.cpp). Needs maintainer sign-off per CONTRIBUTING. Inverting it is a one-line change, since the test asserts the behaviour rather than the direction.

Verification

  • multigene_umi_all_drops_the_umi_from_every_gene — a UMI seen in two genes disappears from both, where MultiGeneUMI keeps the deeper one
  • multigene_umi_all_parses_to_its_own_variant — it is no longer an alias
  • single-gene UMIs are asserted untouched across every filtering mode, which is the property most at risk from a filter written in a hurry

Gate: 562 lib + 26 integration tests, cargo clippy --all-targets -- -D warnings, cargo fmt --check, MSRV 1.89 — all green.

This is a counting change on the MultiGeneUMI_All path only. The default (-) and the other modes produce identical output, so no existing run changes.

Not run: test/solo_diff_docker.sh. Since the default is unaffected, the harness would compare an unchanged path; the changed path has no STAR behaviour to compare against, because in STAR it does nothing. Sign-off on the divergence is what this needs rather than an oracle run.

This PR was previously bundled with four other solo themes; those are now #156 (EmptyDrops_CR statistics), #157 (CellReads.stats), #158 (Transcript3p) and #159 (soloCellFiltering), per the one-theme rule in CONTRIBUTING.md.

@BenjaminDEMAILLE BenjaminDEMAILLE changed the title solo: implement MultiGeneUMI_All rather than aliasing it (closes #144) solo: MultiGeneUMI_All (closes #144), and bit-exact libc++ RNG for EmptyDrops Jul 28, 2026
@BenjaminDEMAILLE BenjaminDEMAILLE changed the title solo: MultiGeneUMI_All (closes #144), and bit-exact libc++ RNG for EmptyDrops solo: MultiGeneUMI_All (closes #144), and EmptyDrops_CR on CellRanger's actual statistics Jul 29, 2026
@BenjaminDEMAILLE BenjaminDEMAILLE changed the title solo: MultiGeneUMI_All (closes #144), and EmptyDrops_CR on CellRanger's actual statistics solo: EmptyDrops_CR on CellRanger's actual statistics, CellReads.stats, MultiGeneUMI_All (closes #144) Jul 29, 2026
@BenjaminDEMAILLE BenjaminDEMAILLE changed the title solo: EmptyDrops_CR on CellRanger's actual statistics, CellReads.stats, MultiGeneUMI_All (closes #144) solo: EmptyDrops_CR on CellRanger's statistics, Transcript3p, CellReads.stats, MultiGeneUMI_All (closes #144) Jul 29, 2026
BenjaminDEMAILLE added a commit to BenjaminDEMAILLE/rustar-aligner that referenced this pull request Jul 29, 2026
CONTRIBUTING.md requires the description to match the code; the entries for the
other themes split out of scverse#152 belong to their own PRs.
BenjaminDEMAILLE added a commit to BenjaminDEMAILLE/rustar-aligner that referenced this pull request Jul 29, 2026
CONTRIBUTING.md requires the description to match the code; the entries for the
other themes split out of scverse#152 belong to their own PRs.
…GeneUMI

`--soloUMIfiltering MultiGeneUMI_All` resolved to the same variant as
`MultiGeneUMI`, which is neither what STAR does nor what the option is
documented to do. Of the three available behaviours it was the only one nobody
had asked for.

In STAR the option is a no-op: it is parsed and stored, but its consumption site
tests only the `MultiGeneUMI` flag, so selecting it leaves the filter entirely
off. Documented, it removes a UMI seen in more than one gene from *all* of them,
rather than from the losers only.

`UmiFiltering::MultiGeneUmiAll` now exists and does the documented thing: a UMI
appearing in several genes is evidence of a collision or of chimeric
amplification, so it is discarded outright rather than attributed to whichever
gene happened to read deepest. Single-gene UMIs are untouched, which the test
checks across every mode.

Raised upstream as scverse#144 before changing it, since "be faithful to STAR" and "do
what the flag says" genuinely point in opposite directions here.

Also adds `docs-old/dev/divergences.md`, recording this and the homopolymer-UMI
rule, so deliberate differences are written down rather than rediscovered as
surprises in a differential run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@BenjaminDEMAILLE BenjaminDEMAILLE changed the title solo: EmptyDrops_CR on CellRanger's statistics, Transcript3p, CellReads.stats, MultiGeneUMI_All (closes #144) solo: --soloUMIfiltering MultiGeneUMI_All (closes #144) Jul 29, 2026
BenjaminDEMAILLE and others added 2 commits July 29, 2026 11:46
The homopolymer-UMI rule describes behaviour already on main, not something this
diff changes, and its locking test does not exist yet. It belongs in its own
change rather than riding along here.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--soloUMIfiltering MultiGeneUMI_All is aliased to MultiGeneUMI (matches neither STAR nor the docs)

1 participant