Skip to content

Add interface IHasIsobaricQuantReporters so that SpectralMatch can optionally have reporter ion intensities#989

Closed
trishorts wants to merge 1 commit into
smith-chem-wisc:masterfrom
trishorts:add-IHasIsobaricQuantReporters
Closed

Add interface IHasIsobaricQuantReporters so that SpectralMatch can optionally have reporter ion intensities#989
trishorts wants to merge 1 commit into
smith-chem-wisc:masterfrom
trishorts:add-IHasIsobaricQuantReporters

Conversation

@trishorts

@trishorts trishorts commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces a new capability interface, IHasIsobaricQuantReporters, to the Omics namespace. 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:

  • Added the IHasIsobaricQuantReporters interface, 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 from IComparable<IHasIsobaricQuantReporters> to support ordering and comparisons.This pull request introduces a new internal interface, IHasIsobaricQuantReporters, to the Omics namespace. 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:

  • Added the IHasIsobaricQuantReporters interface, which requires implementers to expose a boolean property HasIsobaricQuantReporters and a fixed-order array property IsobaricQuantReporterIntensities, and to support ordering via IComparable<IHasIsobaricQuantReporters>.

@codecov

codecov Bot commented Dec 4, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.08%. Comparing base (bbd06f8) to head (f9360bb).

Additional details and impacted files

Impacted file tree graph

@@           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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 IHasIsobaricQuantReporters interface 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.

Comment on lines +2 to +5
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

Copilot AI Dec 4, 2025

Copy link

Choose a reason for hiding this comment

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

These using statements are unused and should be removed. The interface only requires System for the IComparable<T> interface. Remove:

  • System.Collections.Generic
  • System.Linq
  • System.Text
  • System.Threading.Tasks
Suggested change
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

Copilot uses AI. Check for mistakes.
/// 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.

Copilot AI Dec 4, 2025

Copy link

Choose a reason for hiding this comment

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

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:

  1. Documenting the expected comparison behavior in the interface's XML documentation
  2. Removing the IComparable<IHasIsobaricQuantReporters> constraint if ordering is not actually needed for this capability interface
  3. Making the comparison method explicit in the interface with appropriate documentation
Suggested change
/// 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>

Copilot uses AI. Check for mistakes.
@trishorts trishorts added the WIP label Dec 5, 2025
@trishorts

Copy link
Copy Markdown
Contributor Author

Closing — IHasIsobaricQuantReporters orphaned by the #984/#1001 isobaric-quant redesign, which carries reporter intensities via different types.

@trishorts trishorts closed this Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants