Repository navigation
A numbering gap in the experimental design is quantified with a warning; only a duplicate is refused - #3
Draft
trishorts wants to merge 1 commit into
Draft
A numbering gap in the experimental design is quantified with a warning; only a duplicate is refused#3trishorts wants to merge 1 commit into
trishorts wants to merge 1 commit into
Conversation
…plicate is refused
A gap in a condition's bioreps, a biorep's fractions or a fraction's techreps
was refused ("Condition "X" sample N is missing!"). It is now quantified as
numbered, and the command line and the GUI's notifications say where each gap
is, in the words MetaMorpheus uses for the same rule. A duplicate is still
refused, now worded as MetaMorpheus words it.
Needs the mzLib release carrying smith-chem-wisc/mzLib#1422: before it, biorep
normalization silently does nothing when the first condition has no biorep 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 2026
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.
What
A gap in the experimental design's numbering is now quantified with a warning instead of refused. This covers a condition's biological replicates, a biorep's fractions and a fraction's technical replicates. A duplicate (two files at one condition, biorep, fraction and techrep) is still refused.
Before, any gap stopped the run:
Condition "X" sample N is missing!(also... fraction N is missing!and... replicate N is missing!).Numbers are never closed up:
One rule, here, in MetaMorpheus and in mzLib
This is the third copy of the rule, and the last place the old one lives. It says what the others say:
--sdrfDesignreport)Condition 'FA': biological replicates 3, 4, kept as the SDRF numbers them. ...Condition "FA": biological replicates 3, 4, quantified as numbered; biological replicates 1, 2 are not in the design. ...Condition 'A' biorep 1: fractions 1, 3, kept as the SDRF numbers them. ...Condition "A" biorep 1: fractions 1, 3, quantified as numbered; fraction 2 is not in the design. ...Condition 'A' biorep 1 fraction 1: technical replicates 1, 3, kept as ...Condition "A" biorep 1 fraction 1: technical replicates 1, 3, quantified as numbered; ...Duplicates are not allowed:\nCondition "A" biorep 3 fraction 2 techrep 1The MetaMorpheus and FlashLFQ warnings each end with "A missing number may be a sample or file that was lost or not searched."
FlashLfqSettings.GetWarningsInExperimentalDesignis a copy of MetaMorpheus'sExperimentalDesign.GetWarningsInExperimentalDesign, line for line. FlashLFQ does not reference MetaMorpheus, so there is no shared method to call. If the rule moves into mzLib later, both copies can be deleted.Behaviour
... is missing!, nothing quantifiedDuplicates are not allowed: Condition "A" sample 3 fraction 2 replicate 1... Condition "A" biorep 3 fraction 2 techrep 1(reworded to match MetaMorpheus)FlashLfqSettings.ValidateExperimentalDesignnow refuses only duplicates, after the existing blank and below-1 checks. It still throws, so both callers (the command line and the GUI's Run button) behave as before.FlashLfqSettings.GetWarningsInExperimentalDesignreturns one line per gap.--sil.results.txtthere is no file copy of the warning.Fractions carry meaning, and a gap keeps it. Match-between-runs transfers only between fractions at most one apart (mzLib
FlashLfqEngine.cs:832). Fractions numbered 1 and 3 therefore exchange no transfers, which is what the numbers say (read, not run).Why this needs mzLib #1422
FlashLFQ's normalization and Bayesian step walked replicates
0..max. #1422 makes them walk the numbers that exist. Measured with the new end-to-end tests, which copy one mzML with intensities scaled ×1/×2(/×3), so normalization has a difference to remove:1262189.7,2524379.4forAAAHSSLK); test failsSo the fraction and techrep fixtures show no dependency on #1422. They do not build the cases #1422 fixes in fraction normalization (a lost biorep across fractions), so that is not evidence the dependency is absent. #1422's description lists the other failures:
Sequence contains no elementsin fraction normalization, andKeyNotFoundExceptionin the Bayesian step.Tested
New, in
Test/ExperimentalDesignGapTests.cs:ABiorepGapIsAWarningNotAnError: bioreps 1, 2, 4 → no error, exactly one warning, naming 3.StudyWideBiorepNumbersWarnOnlyForTheConditionThatDoesNotStartAtOne: control 1, 2 / treated 3, 4 → one warning, fortreated.FractionAndTechrepGapsAreWarningsNamingTheirBiorepAndFraction: exactly the two expected warnings.ContiguousNumbersGiveNoWarning.ADuplicateIsStillRefused: the exact message.TheCommandLineQuantifies{ABiorep,AFraction,ATechrep}GapAsNumberedAndSaysSo: each runsFlashLfqExecutable.Mainwith--northree times (gapped; contiguous; contiguous without normalization), then checks:An earlier draft of this test passed trivially. Its two sample files share no peptides, and
--nor falseturns normalization on (it is a bare switch). The fixture and the helper were changed so this third check would catch it.Falsified: each of five mutations turned tests red, and the restored source passed again (8 passed, 0 failed):
Full Test project against
9.9.1247: 37 passed, 0 failed, 2 skipped. The whole solution, GUI included, builds.Not covered: the GUI's notification lines have no test (
Test.csprojdoes not referenceGUI).Not in this PR
🤖 Generated with Claude Code