Add interface IHasIsobaricQuantReporters so that SpectralMatch can optionally have reporter ion intensities#989
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #989 +/- ##
=======================================
Coverage 81.08% 81.08%
=======================================
Files 271 271
Lines 39154 39154
Branches 4296 4296
=======================================
Hits 31749 31749
Misses 6652 6652
Partials 753 753 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a new internal interface IHasIsobaricQuantReporters to standardize how objects expose isobaric quantification reporter intensities (TMT or iTRAQ channels). The interface provides a capability pattern for objects that need to carry reporter ion intensities along with metadata indicating whether valid data is present.
Key Changes:
- Added
IHasIsobaricQuantReportersinterface with properties for reporter intensities and a validity flag - Interface extends
IComparable<IHasIsobaricQuantReporters>to support ordering operations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using System.Threading.Tasks; |
There was a problem hiding this comment.
These using statements are unused and should be removed. The interface only requires System for the IComparable<T> interface. Remove:
System.Collections.GenericSystem.LinqSystem.TextSystem.Threading.Tasks
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; |
| /// Capability interface for objects that can expose isobaric-quantification reporter intensities | ||
| /// (for example TMT or iTRAQ reporter channels) and be ordered for comparisons. | ||
| /// Implementers provide a fixed-order array of reporter intensities and a boolean indicating | ||
| /// whether meaningful reporter data is present. |
There was a problem hiding this comment.
The interface requires implementers to support IComparable<IHasIsobaricQuantReporters> but provides no guidance on how comparison should be performed. Without a CompareTo method signature in the interface or documentation explaining the expected comparison semantics, implementers won't know how to order instances (e.g., by scan number, by sum of intensities, by retention time, etc.).
Consider either:
- Documenting the expected comparison behavior in the interface's XML documentation
- Removing the
IComparable<IHasIsobaricQuantReporters>constraint if ordering is not actually needed for this capability interface - Making the comparison method explicit in the interface with appropriate documentation
| /// whether meaningful reporter data is present. | |
| /// whether meaningful reporter data is present. | |
| /// | |
| /// <para> | |
| /// <b>Comparison semantics:</b> Implementers must define <c>CompareTo</c> such that instances are ordered | |
| /// by the sum of their isobaric quant reporter intensities (descending). If two instances have the same sum, | |
| /// implementers should use a secondary property (such as scan number or retention time) for tie-breaking, | |
| /// and document this behavior in their implementation. | |
| /// </para> |
This pull request introduces a new capability interface,
IHasIsobaricQuantReporters, to theOmicsnamespace. This interface is intended for objects that can expose isobaric quantification reporter intensities (such as TMT or iTRAQ channels) and can be ordered for comparisons. The interface provides properties for accessing reporter intensities and a flag indicating whether valid data is present.New interface for isobaric quantification support:
IHasIsobaricQuantReportersinterface, which exposes a fixed-order array of reporter intensities and a boolean property to indicate the presence of valid reporter data. The interface also inherits fromIComparable<IHasIsobaricQuantReporters>to support ordering and comparisons.This pull request introduces a new internal interface,IHasIsobaricQuantReporters, to theOmicsnamespace. This interface standardizes how objects expose isobaric quantification reporter intensities (such as TMT or iTRAQ channels) and supports ordering for comparisons. The interface ensures that implementers provide both a fixed-order array of reporter intensities and a flag indicating the presence of valid data.Isobaric quantification support:
IHasIsobaricQuantReportersinterface, which requires implementers to expose a boolean propertyHasIsobaricQuantReportersand a fixed-order array propertyIsobaricQuantReporterIntensities, and to support ordering viaIComparable<IHasIsobaricQuantReporters>.