Skip to content

Feature: Add Relative Standard Error to Calibration Metrics - #4130

Open
apsoras wants to merge 8 commits into
ProteoWizard:masterfrom
apsoras:Skyline/Calibration/relative-standard-error
Open

Feature: Add Relative Standard Error to Calibration Metrics#4130
apsoras wants to merge 8 commits into
ProteoWizard:masterfrom
apsoras:Skyline/Calibration/relative-standard-error

Conversation

@apsoras

@apsoras apsoras commented Apr 1, 2026

Copy link
Copy Markdown

Sorry if this is a little out of the blue but I am excited to contribute to Skyline - this is my first pull request to an outside project so I apologize if I have missed something.

Relative standard error is an important calibration metric for quantitation - there have been efforts to include it in newer EPA methods (e.g., 1633 section 10.3.3.3) and in the general scientific community (Restek blog post, NELAC guidance section 4.2) to promote its acceptance and use over metrics like R-Squared for calibration validation.

This pull request adds Relative Standard Error into the calibration metrics class, makes it available as a field in reports, and displays it in the calibration graph pane. I have checked the calculation for several test files in excel for correctness.

A FittedParameters field (used to calculate degrees of freedom) was also created to make this calculation possible - this could be made invisible to the document, but perhaps users would find it valuable to help keep track of it. It does correctly change when the quantitation type (Linear, Linear through 0, etc.) is changed in the document.

I am motivated to do further work on absolute quantitation for skyline, so if this is received favorably, I would be interested in working on per-molecule/peptide curve fit settings as a next step to making skyline more versatile for quantitation.

Thanks!

…mented calculation for each curve fit type. Added to calibration graph with a new label type.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds “Relative Standard Error (RSE)” as a new calibration curve metric in Skyline’s absolute quantification pipeline, exposing it through calibration metrics/reporting and displaying it on the calibration graph.

Changes:

  • Added RelativeStandardError (and supporting FittedParameters) to calibration curve metrics and graph display.
  • Implemented RSE calculation in CalibrationCurve.GetMetrics().
  • Updated unit tests to ensure the new metrics are populated.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pwiz_tools/Skyline/Test/Quantification/CalibrationCurveFitterTest.cs Adds assertions for new calibration metrics.
pwiz_tools/Skyline/Model/DocSettings/AbsoluteQuantification/QuantificationStrings.resx Adds localized label prefix for RSE display (plus large .resx schema/header churn).
pwiz_tools/Skyline/Model/DocSettings/AbsoluteQuantification/CalibrationCurve.cs Computes RSE during metric generation; adds “fitted parameter count” to metric creation for curve types.
pwiz_tools/Skyline/Model/Databinding/Entities/CalibrationCurveMetrics.cs Exposes FittedParameters and RelativeStandardError for databinding/reporting and adds display formatting helper.
pwiz_tools/Skyline/Controls/Graphs/Calibration/CalibrationGraphControl.cs Displays RSE text in the calibration graph label.

Comment thread pwiz_tools/Skyline/Model/DocSettings/AbsoluteQuantification/CalibrationCurve.cs Outdated
Comment thread pwiz_tools/Skyline/Model/DocSettings/AbsoluteQuantification/CalibrationCurve.cs Outdated
Comment thread pwiz_tools/Skyline/Model/DocSettings/AbsoluteQuantification/CalibrationCurve.cs Outdated
Comment thread pwiz_tools/Skyline/Model/DocSettings/AbsoluteQuantification/CalibrationCurve.cs Outdated
Comment thread pwiz_tools/Skyline/Model/Databinding/Entities/CalibrationCurveMetrics.cs Outdated
Comment thread pwiz_tools/Skyline/Model/Databinding/Entities/CalibrationCurveMetrics.cs Outdated
…to ja and zh-CHS (no translation), added Format.Integer to display fitted parameters correctly
@apsoras

apsoras commented Apr 1, 2026

Copy link
Copy Markdown
Author

I addressed the comments from the initial review in the latest commit. I did not add a specified expected value for RelativeStandardError in CalibrationCurveFitterTest.cs as there are no such checks for R-Squared. I did add several for FittedParameters however and extended the (Is)NotNull checks for more of the test methods.

@apsoras

apsoras commented Apr 13, 2026

Copy link
Copy Markdown
Author

Hello, is there anything else I should do to help this along? I have addressed the comments from the initial review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants