test(solo): a fixture the CellRanger flags can fail (#172) - #243
Open
BenjaminDEMAILLE wants to merge 1 commit into
Open
test(solo): a fixture the CellRanger flags can fail (#172)#243BenjaminDEMAILLE wants to merge 1 commit into
BenjaminDEMAILLE wants to merge 1 commit into
Conversation
#172 measured --soloUMIfiltering MultiGeneUMI_CR and --soloCBmatchWLtype 1MM_multi_Nbase_pseudocounts changing nothing while still being accepted, and noted that the existing differential could not see it: three non-zero matrix entries, every barcode an exact hit, every UMI unique. These two tests plant exactly the populations those flags act on. One UMI is shared between two genes with tied read support, which MultiGeneUMI_CR gives to nobody; half the reads carry a barcode with an N one substitution from the whitelist, which only the 1MM match types can place. Both flags are live on current main: the tied UMI's two molecules disappear under MultiGeneUMI_CR, and the N-barcode half contributes a molecule under 1MM_multi_Nbase_pseudocounts that Exact does not (1 -> 2). Getting there took two fixture corrections worth recording, because both would have produced a test that passes for the wrong reason: the N-barcode groups first shared their UMIs, so a rescued read folded into the molecule the clean read already contributed and the totals agreed either way; and the assertion was >= rather than >, which the equal totals satisfied.
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.
Addresses the fourth item of #172, and answers the first two.
What #172 asked for
The existing CellRanger test has three non-zero matrix entries, every barcode an exact whitelist hit and every UMI unique, so none of the populations the CellRanger flags act on is present and the test passes whatever those flags do.
What this adds
Two tests, each planting exactly the population its flag decides:
multi_gene_umi_cr_removes_a_tied_umi_from_the_matrix: one UMI shared between two genes with tied read support, which STAR gives to nobody, plus a clean UMI per gene so the matrix is not empty afterwards. The assertion is exact: the total drops by precisely 2, the tied UMI's molecule in each gene.an_n_containing_barcode_is_decided_by_the_cb_match_type: half the reads carry a barcode with anNone substitution from the whitelist entry.Exactcannot place them,1MM_multi_Nbase_pseudocountscan.What they say about the two "inert" flags
Both are live on current main. The tied UMI's two molecules disappear under
MultiGeneUMI_CR, and the N-barcode half contributes a molecule under1MM_multi_Nbase_pseudocountsthatExactdoes not (1 → 2). So items 1 and 2 of #172 were fixed by work merged since it was filed; these tests are what keeps them fixed. Item 3, STAR's validation pairing ofMultiGeneUMI_CRwith--soloUMIdedup 1MM_CR, is also on main already.Two fixture corrections worth recording
Both would have produced a test that passes for the wrong reason, which is the failure mode this issue is about:
>=rather than>, which those equal totals satisfied.With distinct UMIs and a strict comparison, the numbers separate: 1 against 2.
This is the small-fixture version. The 20 000-read fixture in #172 with the real
3M-february-2018whitelist stays the right tool for measuring the residual against STAR; it needs a 26 MB whitelist that should not be vendored, so it belongs behind a skip-if-absent guard rather than in the default suite.cargo test,cargo clippy --all-targets -- -D warningson a cold cache, andcargo fmt --checkare green.🤖 Generated with Claude Code