Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7ed29c9
Closed C# Stage 7 algorithmic gap + ported Rust v2 reconciliation env…
brendanx67 May 19, 2026
d2800d7
Fixed three C# in-memory vs HPC chain divergences in Stages 5/6/7
brendanx67 May 20, 2026
9982593
Bumped OspreySharp tracked Rust version to 26.6.1
brendanx67 May 20, 2026
43100b1
Bumped cal_match dump precision F10 -> F17 to match Rust f64 round-trip
brendanx67 May 20, 2026
af7088d
Bumped LDA scores dump precision F10 -> F17 to match Rust f64 round-trip
brendanx67 May 20, 2026
6c17c20
Switched HRAM XCorr preprocess to f64-internal / f32-storage cache
brendanx67 May 20, 2026
e64bb5a
Populated CalibrationMetadata NumConfidentPeptides + NumSampledPrecur…
brendanx67 May 20, 2026
edb159a
LOESS: ThenBy on y for deterministic sort at duplicate library RT
brendanx67 May 20, 2026
3ec9236
Fixed outer/inner sort mismatch in RTCalibration at duplicate library RT
brendanx67 May 21, 2026
11943b1
Cross-impl-safe f64 parsing + cal_scalars F17 -> G17 dump format
brendanx67 May 21, 2026
1b60a78
cal_match + lda_scores dumps: F17 -> G17 for round-trip-safe doubles
brendanx67 May 21, 2026
7b057b1
MzmlReader: use XmlConvert.ToDouble for cvParam values
brendanx67 May 21, 2026
9a72565
Cross-impl bit-equality: align Pearson + sorted parquet write
brendanx67 May 21, 2026
41c1df5
Stage 7 cross-impl parity: port missing first-pass protein FDR + 2nd-…
brendanx67 May 21, 2026
d85a3cb
Sort DeduplicatePairs by EntryId for cross-impl Percolator parity
brendanx67 May 21, 2026
c250ae3
Stage 6/7 cross-impl: pair decoys by base_id + sort Percolator input
brendanx67 May 21, 2026
fa9b2cb
Updated comment on direct-path Percolator best-per-precursor dedup
brendanx67 May 21, 2026
bfd52e0
Stage 6/7 cross-impl: 4-component psm_id + ParquetIndex sort tie-break
brendanx67 May 21, 2026
3b04664
Refreshed Osprey-workflow.html with 2026-05-21 Stellar 3-file perf
brendanx67 May 21, 2026
cb04e27
Added Welford running mean + MS2 cal errors dump to OspreySharp
brendanx67 May 22, 2026
7ed9cf7
Deterministic protein-FDR sort tiebreak (sorted-accessions string)
brendanx67 May 22, 2026
d99e20b
Diagnostics: dump cumulative-FDR winners + per-peptide best scores
brendanx67 May 23, 2026
45c98ea
Excluded decoys from reconciliation gap-fill
brendanx67 May 23, 2026
4576a46
Merge branch 'master' into Skyline/work/20260516_ospreysharp_wsl_parity
brendanx67 May 23, 2026
8da07fb
Refactored cross-impl diagnostic dumps into isolated module
brendanx67 May 23, 2026
89995c9
Fail fast on missing mzML isolation window cvParams
brendanx67 May 23, 2026
9dda719
Refreshed 8-cell perf table + WSL caveat in Osprey-workflow.html
brendanx67 May 24, 2026
f9d873e
Replaced Welford running mean with sum/n in MzCalibration
brendanx67 May 24, 2026
307fb61
Refreshed perf table with median-of-3 on C: SSD + WSL /home + /mnt/c
brendanx67 May 25, 2026
db5a54f
Corrected perf table medians (Get-Median bug + missing C# 2nd-pass-fdr)
brendanx67 May 25, 2026
953b27d
PerFileScoringTask: LOESS dump fires only when pass 2 is accepted
brendanx67 May 25, 2026
fa25950
Address Copilot: strip UTF-8 BOM + replace mojibake em-dashes with ASCII
brendanx67 May 26, 2026
bbb5b19
Addressed Copilot review: warn on 2nd-pass feature reload skips + dro…
brendanx67 May 26, 2026
7d6f871
Addressed self-review: validate v2 file_stems + warn on unmatched Mer…
brendanx67 May 27, 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
125 changes: 115 additions & 10 deletions pwiz_tools/OspreySharp/Osprey-workflow.html

Large diffs are not rendered by default.

49 changes: 45 additions & 4 deletions pwiz_tools/OspreySharp/OspreySharp.Core/OspreyConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,33 @@ internal static string EscapeForRustDebug(string s)
/// hash invariant to invocation order).
/// </summary>
public string ReconciliationParameterHash()
{
var stems = new List<string>(InputFiles?.Count ?? 0);
if (InputFiles != null)
{
foreach (var path in InputFiles)
{
string stem = Path.GetFileNameWithoutExtension(path);
if (!string.IsNullOrEmpty(stem))
stems.Add(stem);
}
}
return ReconciliationParameterHashForStems(stems);
}

/// <summary>
/// Compute the reconciliation parameter hash for an explicit set of
/// file stems. Used by per-file Stage 6 rescore workers, whose
/// <see cref="InputFiles"/> only carries this worker's single
/// parquet — the hash that the downstream <c>--join-at-pass=2</c>
/// merge node expects is computed over ALL files in the join, so
/// the worker must read the full set from the planner's
/// <c>reconciliation.json</c> envelope and pass it in here. The
/// stems are sorted + deduped internally so the hash is invariant
/// to caller ordering. Mirrors Rust
/// <c>OspreyConfig::reconciliation_parameter_hash_for_stems</c>.
/// </summary>
public string ReconciliationParameterHashForStems(IReadOnlyList<string> fileStems)
{
using (var sha256 = SHA256.Create())
{
Expand All @@ -401,17 +428,31 @@ public string ReconciliationParameterHash()
// Mirror Rust's `format!("file_stems:{:?}\n", stems)` output
// exactly. {:?} on Vec<String> yields ["a", "b"] with the
// brackets and double-quoted, comma-space-separated values.
var stems = new List<string>(InputFiles?.Count ?? 0);
if (InputFiles != null)
// Stems are sorted + deduped here so the hash matches the
// Rust side, which also sorts + dedups before hashing.
var stems = new List<string>(fileStems?.Count ?? 0);
if (fileStems != null)
{
foreach (var path in InputFiles)
foreach (var stem in fileStems)
{
string stem = Path.GetFileNameWithoutExtension(path);
if (!string.IsNullOrEmpty(stem))
stems.Add(stem);
}
}
stems.Sort(StringComparer.Ordinal);
// Dedup in place (stems is sorted, so duplicates are
// adjacent). Rust does `dedup()` on a sorted Vec; same here.
int write = 0;
for (int read = 0; read < stems.Count; read++)
{
if (read == 0 || !string.Equals(stems[read], stems[read - 1], StringComparison.Ordinal))
{
stems[write++] = stems[read];
}
}
if (write < stems.Count)
stems.RemoveRange(write, stems.Count - write);

var stemsList = new StringBuilder("[");
for (int i = 0; i < stems.Count; i++)
{
Expand Down
398 changes: 360 additions & 38 deletions pwiz_tools/OspreySharp/OspreySharp.FDR/PercolatorFdr.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pwiz_tools/OspreySharp/OspreySharp.IO/FileSaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public sealed class FileSaver : IDisposable
/// Resolves <paramref name="fileName"/> against the current
/// working directory so a bare-filename argument (no directory
/// component) lands the temp file alongside its destination
/// rather than failing inside <see cref="Path.GetDirectoryName(System.ReadOnlySpan{char})"/>
/// rather than failing inside <c>Path.GetDirectoryName</c>
/// downstream. Diverges from the SharedBatch original which
/// happens to never see relative paths.
/// </summary>
Expand Down
33 changes: 24 additions & 9 deletions pwiz_tools/OspreySharp/OspreySharp.IO/ReconciliationFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,43 @@ namespace pwiz.OspreySharp.IO
/// </summary>
public class ReconciliationFile
{
/// <summary>Current schema version. Bump on incompatible changes.</summary>
public const int CurrentFormatVersion = 1;
/// <summary>
/// Current schema version. Bump on incompatible changes.
///
/// v1: initial format.
/// v2: added <c>file_stems</c> so per-file Stage 6 rescore workers
/// can compute the reconciliation parameter hash that the
/// downstream <c>--join-at-pass=2</c> merge node expects (the
/// hash is computed over all files in the join, not the
/// worker's single parquet). Old v1 files deserialize with an
/// empty <see cref="FileStems"/> list; the worker falls back
/// to its <c>OspreyConfig.InputFiles</c> stems in that case,
/// preserving v1 behavior.
/// </summary>
public const int CurrentFormatVersion = 2;

[JsonProperty("file_stems", Order = 0)]
public List<string> FileStems { get; set; }

[JsonProperty("forced_integration_actions", Order = 0)]
[JsonProperty("forced_integration_actions", Order = 1)]
public List<ForcedIntegrationEntry> ForcedIntegrationActions { get; set; }

[JsonProperty("format_version", Order = 1)]
[JsonProperty("format_version", Order = 2)]
public int FormatVersion { get; set; }

[JsonProperty("gap_fill_targets", Order = 2)]
[JsonProperty("gap_fill_targets", Order = 3)]
public List<GapFillEntry> GapFillTargets { get; set; }

[JsonProperty("library_hash", Order = 3)]
[JsonProperty("library_hash", Order = 4)]
public string LibraryHash { get; set; }

[JsonProperty("refined_rt_calibration", Order = 4, NullValueHandling = NullValueHandling.Include)]
[JsonProperty("refined_rt_calibration", Order = 5, NullValueHandling = NullValueHandling.Include)]
public RefinedRtCalibrationJson RefinedRtCalibration { get; set; }

[JsonProperty("search_hash", Order = 5)]
[JsonProperty("search_hash", Order = 6)]
public string SearchHash { get; set; }

[JsonProperty("use_cwt_peak_actions", Order = 6)]
[JsonProperty("use_cwt_peak_actions", Order = 7)]
public List<UseCwtPeakEntry> UseCwtPeakActions { get; set; }

/// <summary>
Expand Down
Loading
Loading