Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d9c3c00
Added opt-in peak co-assignment panel to --model-diagnostics
brendanx67 Aug 9, 2026
078baac
Removed the --model-diagnostics opt-in tokens and fixed panel defects
brendanx67 Aug 10, 2026
9498c83
Added the co-assignment HTML panel and reworked decoy inclusion
brendanx67 Aug 10, 2026
4ab0732
Persisted the experiment aggregate score in the FDR sidecar (v3 to v4)
brendanx67 Aug 10, 2026
c7cdabe
Fixed the co-assignment decoy class and collapsed two panel implement…
brendanx67 Aug 10, 2026
14d66b4
Seeded ExperimentAggregateScore and taught the sidecar gate the v4 re…
brendanx67 Aug 10, 2026
aab9f63
Fixed eight code-review findings in the co-assignment panel
brendanx67 Aug 10, 2026
8cdc09d
Rebaselined the diagnostics golden for the co-assignment metrics
brendanx67 Aug 10, 2026
7a0c9d0
Wrote the experiment aggregate score on the default pass-2 path
brendanx67 Aug 11, 2026
0df2627
Corrected the pass1 to pass2 direction claim with a second dataset
brendanx67 Aug 11, 2026
5efdb05
Removed the O(files x entries) map from the co-assignment builder
brendanx67 Aug 11, 2026
ebcee57
Addressed the Copilot review of #4558
brendanx67 Aug 11, 2026
1268809
Reported the spectra cache write instead of writing it silently
brendanx67 Aug 12, 2026
113fe13
Made a deleted --model-diagnostics report regenerate on its own
brendanx67 Aug 12, 2026
2704cc2
Stopped a target inheriting its paired decoy's experiment q-value
brendanx67 Aug 12, 2026
7211398
Reported the co-assignment apex-RT join instead of running it silent
brendanx67 Aug 12, 2026
891bd58
Reported the pass-2 survivor scan instead of running it silent
brendanx67 Aug 12, 2026
37af75b
Counted only decoys that won their own target-decoy competition
brendanx67 Aug 12, 2026
ccd628e
Re-keyed the last two experiment-q lookups onto the winner entry_id
brendanx67 Aug 12, 2026
54796e5
Rebaselined the goldens for the experiment q-value fixes
brendanx67 Aug 12, 2026
86adfaa
Re-indented the pass-2 survivor merge under its progress block
brendanx67 Aug 12, 2026
67975e6
Fixed four verified findings from the code review of #4558
brendanx67 Aug 12, 2026
5605b98
Merge branch 'master' into Skyline/work/20260808_peak_coassignment_di…
brendanx67 Aug 13, 2026
0d4dd42
Fixed the co-assignment and sidecar findings from the review
brendanx67 Aug 13, 2026
02a2db0
Reported the composite acceptance score and the score each pass needs
brendanx67 Aug 13, 2026
57858bb
Stopped declaring an unwritable diagnostics report, dropped dead state
brendanx67 Aug 13, 2026
8d0d7ed
Took the deepest score within the FDR as the crossing, not the first …
brendanx67 Aug 13, 2026
1ac5b33
Rebaselined the goldens for the acceptance-score metrics
brendanx67 Aug 13, 2026
6b7a98f
Refused the co-assignment panel on a partially read sidecar
brendanx67 Aug 13, 2026
bb367e2
Reported the co-assignment sidecar scan instead of running it silent
brendanx67 Aug 13, 2026
b53c35b
Fixed defects the second review found in this branch's own new code
brendanx67 Aug 13, 2026
42f9d12
Completed the version-fence and partial-read fixes at their last sites
brendanx67 Aug 13, 2026
e740ddf
Left RunSimpleFdr's Score unassigned, as it was
brendanx67 Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pwiz_tools/Osprey/Documentation/Help/en/CommandLine.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h1>Osprey command-line usage</h1>
<table>
<tr><th>Argument</th><th>Description</th></tr>
<tr><td><nobr>-d</nobr>,&nbsp;<nobr>--diagnostics</nobr></td><td>Write <nobr>cross-impl</nobr> bisection dumps (OSPREY_DUMP_* bundle)</td></tr>
<tr><td><nobr>--model-diagnostics</nobr></td><td>Write a <nobr>self-contained</nobr> interactive HTML report of the trained scoring model and FDR calibration</td></tr>
<tr><td><nobr>--model-diagnostics</nobr></td><td>Write a <nobr>self-contained</nobr> interactive HTML report of the trained scoring model, FDR calibration, and <nobr>single-peak</nobr> <nobr>multiple-ID</nobr> <nobr>co-assignment</nobr></td></tr>
<tr><td><nobr>-h</nobr>,&nbsp;<nobr>--help</nobr></td><td>Show this help message ([ascii|unicode|sections|html|&lt;Section&gt;])</td></tr>
<tr><td><nobr>-v</nobr>,&nbsp;<nobr>--version</nobr></td><td>Show version</td></tr>
</table>
Expand Down
19 changes: 16 additions & 3 deletions pwiz_tools/Osprey/Osprey.Core/FdrEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ public class FdrEntry
public double Pep { get; set; }
public string ModifiedSequence { get; set; }

/// <summary>
/// The per-entry score the EXPERIMENT-scope competitions ranked this entry on (sidecar
/// v4, issue #4522): max over the entry's rows across runs under the default
/// aggregation, <c>TargetDecoyCompetition.ComputeBaseIdMeanBestN</c>'s value under
/// mean-best-N. <see cref="Score"/> is the per-ROW discriminant the RUN-scope q-values
/// compete on; this is its experiment-scope counterpart, persisted beside the
/// experiment q-values so a consumer can re-gate at that scope without rebuilding the
/// roll-up and branching on <c>OSPREY_EXPERIMENT_AGG</c>.
/// </summary>
public double ExperimentAggregateScore { get; set; }

/// <summary>
/// Full PIN feature vector (21 features) computed during coelution scoring.
/// Used by Percolator FDR. Null if features have not been computed yet
Expand Down Expand Up @@ -157,9 +168,10 @@ public FdrEntry()
}

/// <summary>
/// Reset the discriminant fields to the Rust <c>to_fdr_entry</c> defaults: Score 0,
/// every q-value and Pep 1.0. This is the state a Stage 6 rescore target is left in
/// for the 2nd pass to fill, and the state a fresh gap-fill stub is appended in.
/// Reset the discriminant fields to the Rust <c>to_fdr_entry</c> defaults: Score and
/// <see cref="ExperimentAggregateScore"/> 0, every q-value and Pep 1.0. This is the
/// state a Stage 6 rescore target is left in for the 2nd pass to fill, and the state a
/// fresh gap-fill stub is appended in.
///
/// <para>One method because the same eight assignments had been written out five
/// times - the rescore overlay, both gap-fill passes, and the rebuild-from-disk - and
Expand All @@ -169,6 +181,7 @@ public FdrEntry()
public void ResetScores()
{
Score = 0.0;
ExperimentAggregateScore = 0.0;
RunPrecursorQvalue = 1.0;
RunPeptideQvalue = 1.0;
RunProteinQvalue = 1.0;
Expand Down
14 changes: 12 additions & 2 deletions pwiz_tools/Osprey/Osprey.FDR/FdrProjectionOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,26 @@ public interface IFdrOutputSink
/// Accept one scored row. <paramref name="fileIdx"/> / <paramref name="rowIdx"/>
/// locate the row within its per-file list; <paramref name="entryId"/> /
/// <paramref name="isDecoy"/> / <paramref name="charge"/> / <paramref name="peptide"/>
/// identify it; <paramref name="score"/> + <paramref name="q"/> are the freshly
/// identify it; <paramref name="score"/> +
/// <paramref name="experimentAggregateScore"/> + <paramref name="q"/> are the freshly
/// computed outputs. Called once per row, in nested (file, row) order == the flat
/// score-pass index order. <paramref name="charge"/> / <paramref name="peptide"/> are
/// passed in (not read off a resident row) so the sink's [COUNT] tally + streaming
/// --model-diagnostics accumulator work whether the caller holds a resident projection
/// (2nd pass) or streams the rows straight from parquet with no resident buffer at all
/// (1st-pass streaming, issue #4355 struct-shrink S3 Stage B).
///
/// <para><paramref name="experimentAggregateScore"/> is the per-entry score the
/// experiment-scope competitions ranked this row's entry on (sidecar v4, issue #4522)
/// - constant across every row of an entry, and equal to <paramref name="score"/> only
/// on a single-file run whose precursors carry one row each. It rides the sink rather
/// than <see cref="FdrQValues"/> because it is a score, not a q-value, and rather than
/// <see cref="FdrProjection"/> because that struct is deliberately lean (issue #4355
/// S0/S1) and guarded against regrowth.</para>
/// </summary>
void Accept(int fileIdx, int rowIdx, uint entryId, bool isDecoy,
byte charge, string peptide, double score, in FdrQValues q);
byte charge, string peptide, double score, double experimentAggregateScore,
in FdrQValues q);

/// <summary>
/// Finalize the pass: emit the tail <c>[COUNT]</c> lines (per-file pass counts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ public Accumulator(
_entExpSets = NewSets(_nFiles);
}

/// <summary>
/// The entrapment classification this accumulator was built with, so a sibling panel
/// computed outside the streamed fold - the pass-1 peak co-assignment source, which
/// reads apex RT off the FDR sidecars rather than the score pass - classifies rows
/// identically without rebuilding it. Worth exposing rather than recomputing:
/// classifying the searched library runs for minutes at 6.3M entries.
/// </summary>
public IReadOnlyDictionary<uint, EntrapmentClass> ClassByBaseId => _classByBaseId;

private static List<HashSet<string>> NewSets(int n)
{
var list = new List<HashSet<string>>(n);
Expand Down
Loading