pub struct ScoredFeature {
pub feature: Feature,
pub neutron_offset: i8,
pub isotope_score: f64,
pub cosine_score: f64,
pub combined_score: f64,
pub theoretical_pattern: Vec<f64>,
}Expand description
Feature with isotope pattern scoring applied.
Carries three distinct quality scores so downstream stages (alignment,
consensus grouping, LFQ filters) can filter on whichever makes sense for
their purpose. All three are bounded [0, 1]; higher = better.
Fields§
§feature: Feature§neutron_offset: i8Neutron offset applied: -1, 0, or 1. Non-zero means the observed monoisotopic peak is actually M+|offset|.
isotope_score: f64Isotope-pattern score: Bhattacharyya coefficient between the observed apex-scan isotope intensities and the theoretical averagine template. Measures “does the isotope envelope look like a peptide?”.
cosine_score: f64Chromatographic cosine score: mirror of feature.cosine_score —
the mean cosine similarity (in time domain) between adjacent isotope
hills. Measures “do the isotope hills co-elute?”.
combined_score: f64Combined score: isotope_score × cosine_score. The default
quality knob used by alignment, consensus grouping, and feature
retention. High requires both a good pattern match AND tight co-elution.
theoretical_pattern: Vec<f64>Theoretical averagine isotope pattern (normalized to sum=1)
Implementations§
Source§impl ScoredFeature
impl ScoredFeature
Sourcepub fn monoisotopic_mz(&self) -> f64
pub fn monoisotopic_mz(&self) -> f64
Corrected monoisotopic m/z (adjusted by neutron_offset).
Sourcepub fn monoisotopic_neutral_mass(&self, polarity: Polarity) -> Option<f64>
pub fn monoisotopic_neutral_mass(&self, polarity: Polarity) -> Option<f64>
Corrected neutral monoisotopic mass.
Trait Implementations§
Source§impl Clone for ScoredFeature
impl Clone for ScoredFeature
Auto Trait Implementations§
impl Freeze for ScoredFeature
impl RefUnwindSafe for ScoredFeature
impl Send for ScoredFeature
impl Sync for ScoredFeature
impl Unpin for ScoredFeature
impl UnsafeUnpin for ScoredFeature
impl UnwindSafe for ScoredFeature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more