Repository navigation
Conversation
…ing it A condition whose biological replicates are not numbered 1..N (a lost sample, or study-wide numbering such as control 1-2 / treated 3-4) was refused as "biorep N is missing!", and the search skipped quantification. mzLib smith-chem-wisc#1426 keeps the SDRF's numbers as written, so --sdrfDesign now writes such designs. GetErrorsInExperimentalDesign now checks fractions and techreps within each biorep present; the new GetWarningsInExperimentalDesign names a condition's missing biorep numbers. The search and glyco tasks, the CLI design check and the GUI design window report it. The --sdrfDesign help text no longer says replicates are renumbered. Needs the mzLib release carrying smith-chem-wisc#1422 (normalization and the Bayesian step walk the bioreps that exist) and smith-chem-wisc#1426; the pin bump follows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sults.txt, and give the TMT window's rules to EngineLayer Label-free: GetErrorsInExperimentalDesign now refuses only a duplicate (two files at one condition, biorep, fraction and techrep); a gap in fractions or techreps is a warning, like a gap in bioreps. TMT (smith-chem-wisc#2793): the TMT design window's ValidateDesign rules move into TmtExperimentalDesign.GetErrorsInDesign / GetWarningsInDesign, so a test reaches them; a gap in a plex's fractions or techreps is a warning there and, for the first time, at search time. Every gap warning is written with Warn and into results.txt (AddTaskSummaryText), in the search, glyco and TMT paths, and is worded as mzLib's SdrfLabelFreeDesign notes the same gap (smith-chem-wisc#1426): "Condition "A" biorep 1: fractions 1, 3, quantified as numbered; fraction 2 is not in the design." GlycoTestWithBadExperimentalDesignFile's bad design is now a duplicate, since its techrep gap is valid. 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 an experimental design's numbering is now quantified with a warning instead of refused. This covers a condition's biological replicates, a biorep's fractions, a fraction's technical replicates, and, for TMT, a plex's fractions and technical replicates. The warning goes to the log and into
results.txt. A duplicate (two files at one condition, biorep, fraction and techrep, or at one fraction and techrep of a plex) is still refused.Before, a label-free design with any gap was refused (
Condition "X" biorep N is missing!), and the search skipped quantification with one warning. The TMT design window refused fraction and techrep gaps. The TMT parser never checked them, so a run quantified them silently.Numbers are never closed up:
One rule, here and in mzLib smith-chem-wisc#1426
smith-chem-wisc#1426 makes mzLib's
SdrfLabelFreeDesign(--sdrfDesign) keep the SDRF's numbers. It refuses the same thing this PR refuses (a duplicate) and notes the same gaps in the same words: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; ...TestSdrfDesignWritesAFractionGapAndBothSidesSaySoruns one fraction-gap SDRF through both sides and checks both messages. Each repository keeps its own quoting: mzLib quotes a condition with', and MetaMorpheus's existing design messages use".Behaviour
results.txtresults.txtExperimentalDesign):GetErrorsInExperimentalDesignnow refuses only duplicates. The message is unchanged.GetWarningsInExperimentalDesignreturns one line per gap.TmtExperimentalDesign, Replicate-structure validation is implemented twice, and the untestable copy is the one with the extra rules smith-chem-wisc/MetaMorpheus#2793): the window's privateValidateDesignrules move into EngineLayer asGetErrorsInDesignandGetWarningsInDesign, so a test can reach them. The window calls them. This answers Replicate-structure validation is implemented twice, and the untestable copy is the one with the extra rules smith-chem-wisc/MetaMorpheus#2793's "only the untestable copy has the rules". Its third copy,AnnotatePlexWindow.ValidateAll, is not moved.Warn, plusAddTaskSummaryText, so it is inresults.txt(asSkipPredictedSpectralAnglesalready does);Program.ResolveExperimentalDesign, both design types), when reporting to the console;--sdrfDesignhelp text said replicates are renumbered within each condition. It now says they are copied as the SDRF numbers them, and that added numbers and gaps are printed.Calibration and averaging (
CalibrationTask,SpectralAveragingTask) copy the design under the new file names, carrying the numbers through unchanged. Before, a design with a gap was an error there too: they warned and wrote no new design, so the search after them would quantify without one (read from the code, not run). Now they write it.Fractions carry meaning, and a gap keeps it. FlashLFQ's match-between-runs transfers only between fractions at most one apart (
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 smith-chem-wisc#1422 in the same release
FlashLFQ's normalization and Bayesian step walked replicates
0..max. smith-chem-wisc#1422 makes them walk the numbers that exist. Measured against 1.0.594 (no smith-chem-wisc#1422):TestSearchQuantifiesADesignWithABiorepGapruns, but biorep normalization silently does nothing. The four files keep their 2 : 3 : 4 : 5 intensity ratio (max/min 2.5), because the first condition has no biorep 1, which 1.0.594 uses as the reference. With Unit Tests for Serialization and Deserialization Possibly Needed smith-chem-wisc/MetaMorpheus#1422 the four intensities agree within 1%.TestSearchQuantifiesFractionAndTechrepGapsAsNumbered) and TMT (TmtFractionGap_IsQuantifiedAsNumberedAndWarned) pass on 1.0.594 as well. These fixtures do not build the cases Unit Tests for Serialization and Deserialization Possibly Needed smith-chem-wisc/MetaMorpheus#1422 fixes in fraction normalization (a lost biorep across fractions), so they show no dependency, not its absence.smith-chem-wisc#1422's description lists the other failures:
Sequence contains no elementsin fraction normalization, andKeyNotFoundExceptionin the Bayesian step (smith-chem-wisc#2886).Tested
New:
TestBiorepGapIsAWarningNotAnError:treated;TestSearchQuantifiesADesignWithABiorepGap: a search with normalization on, A = 2, 3 and B = 4, 5.results.txt.Intensity_A_2,_A_3,_B_4,_B_5.TestSearchQuantifiesFractionAndTechrepGapsAsNumbered: the same five files numbered with fraction and techrep gaps (1, 3), and without them. Both are quantified with normalization on, the gaps are warned about in the log andresults.txt, and every file's normalized intensity is identical in the two.TmtDesignErrorsAreTheWindowRulesandTmtDesignGapsAreWarningsNotErrors:TmtFractionGap_IsQuantifiedAsNumberedAndWarned: two files of one plex as fractions 1, 3 and as 1, 2. The gap is warned about in the log andresults.txt, and the peptide and protein quantification tables are identical.TestSdrfDesignWritesAFractionGapAndBothSidesSaySo: see above.Changed:
TestExperimentalDesignErrors: its non-consecutive biorep, fraction and techrep cases now expect no error and one warning each. Its duplicate, missing-file and non-integer cases are unchanged.TestSdrfDesignRenumbersStudyWideReplicatesAndSaysSois nowTestSdrfDesignKeepsStudyWideReplicatesAndSaysSo: treated 3, 4 is written as 3, 4, read back with no error, and the pre-run check exits 0 and prints the warning.TestSdrfDesignRefusesAFractionGapAndWritesNothingis nowTestSdrfDesignRefusesADuplicateAndWritesNothing. A fraction gap is no longer refused, so the refusal it pins is now the one that is left.GlycoTestWithBadExperimentalDesignFile: its bad design was a techrep gap, which is now valid. It is now a duplicate, so the test still checks that a bad design skips quantification and the search runs.Falsified: each of ten mutations turned tests red, on the final code, and the restored source passed again (116 passed, 0 failed):
results.txtline (2);Not covered: the glyco task's warning lines and both GUI windows' messages have no test (
Test.csprojdoes not referenceGUI).Against master's code: with smith-chem-wisc#1426 and smith-chem-wisc#1422, master's
TestSdrfDesignRenumbersStudyWideReplicatesAndSaysSofails (it expectsrenumbered 3 -> 1, 4 -> 2). That is why smith-chem-wisc#1426 is labelled Breaks Integration Tests.Full Test project against
9.9.1247: 2918 passed, 0 failed, 1 skipped (fd4742c15).Not in this PR
Sample1_TmtFracA_126,Sample1_TmtFracB_126for one sample), and the fraction number is not read. That is unchanged here, and why a TMT fraction gap changes no number.SdrfIsobaricDesignnever refused a gap, so it already follows the rule, but its report does not note one.🤖 Generated with Claude Code