pub struct FeatureMatrix {
pub run_names: Vec<String>,
pub features: Vec<Feature>,
pub matrix_evidence: Option<Vec<[f32; 9]>>,
pub joint_evidence: Option<Vec<Vec<Observation>>>,
pub joint_cell_evidence: Option<Vec<[f32; 12]>>,
}Expand description
A single-run or aligned multi-run feature set.
Fields§
§run_names: Vec<String>Run intensity column names in vector order.
features: Vec<Feature>§matrix_evidence: Option<Vec<[f32; 9]>>Optional LFQ evidence, one vector per retained consensus feature. Absent for ordinary matrices and single-run inputs: their classifier vectors keep the exact original dimensions and column order.
joint_evidence: Option<Vec<Vec<Observation>>>Original, aligned observations per consensus row for one joint search.
Quantitative cells remain on features; observations never duplicate them.
joint_cell_evidence: Option<Vec<[f32; 12]>>Extraction summaries per joint row, independent of candidate identity.
Implementations§
Source§impl FeatureMatrix
impl FeatureMatrix
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn load(features_path: impl AsRef<Path>) -> Result<Self>
pub fn load(features_path: impl AsRef<Path>) -> Result<Self>
Load a single-run biosaur2 feature file (*.features.tsv).
Sourcepub fn load_matrix(path: impl AsRef<Path>, min_runs: u32) -> Result<Self>
pub fn load_matrix(path: impl AsRef<Path>, min_runs: u32) -> Result<Self>
Load a koth-aligned consensus matrix (intensity_matrix.tsv): one row per
consensus feature, with the leading columns massCalib, mz, charge, rtApex, im, combined_score, seed_run, n_contributing_runs followed by one
intensity column per run. Unlike single-run input, each feature carries the
FULL per-run intensity vector (intensities) — that’s what the multi-sample
quant rollup consumes, and the ID featurizer already reads n_detected
(runs with signal) and sum_int from it. The per-feature single-run quality
columns (cosine/isotope/ppm/nScans) are absent here and read as None
(inert in the featurizer); combined_score and n_contributing_runs
survive alignment and are used.
min_runs drops consensus features detected in fewer than that many runs.
This filter is REQUIRED for aligned-matrix search, not cosmetic: alignment
discards the per-feature nIsotopes column that uno’s single-run path uses
to reject junk, so without a reproducibility floor the random-match
background p climbs to ~0.83 and the binomial finds nothing. A real
peptide is detected across replicates; single-run features are dominated by
noise. min_runs = 2 is a safe floor (won’t drop a condition-specific
peptide that has ≥2 replicates).
Trait Implementations§
Source§impl Clone for FeatureMatrix
impl Clone for FeatureMatrix
Auto Trait Implementations§
impl Freeze for FeatureMatrix
impl RefUnwindSafe for FeatureMatrix
impl Send for FeatureMatrix
impl Sync for FeatureMatrix
impl Unpin for FeatureMatrix
impl UnsafeUnpin for FeatureMatrix
impl UnwindSafe for FeatureMatrix
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.