Feature: Add Relative Standard Error to Calibration Metrics - #4130
Feature: Add Relative Standard Error to Calibration Metrics#4130apsoras wants to merge 8 commits into
Conversation
…mented calculation for each curve fit type. Added to calibration graph with a new label type.
There was a problem hiding this comment.
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 supportingFittedParameters) 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. |
…to ja and zh-CHS (no translation), added Format.Integer to display fitted parameters correctly
|
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. |
|
Hello, is there anything else I should do to help this along? I have addressed the comments from the initial review. Thanks! |
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!