pub struct DiaIndex {
pub frame_to_group: HashMap<u32, u32>,
pub group_to_frames: HashMap<u32, Vec<u32>>,
pub group_to_isolation: HashMap<u32, Vec<(f64, f64)>>,
pub group_to_scan_ranges: HashMap<u32, Vec<(u32, u32)>>,
pub group_to_mz_union: HashMap<u32, (f64, f64)>,
pub group_to_scan_unions: HashMap<u32, Vec<(u32, u32)>>,
pub frame_time: HashMap<u32, f64>,
pub group_to_slices: HashMap<u32, Arc<[ProgramSlice]>>,
}Fields§
§frame_to_group: HashMap<u32, u32>MS2 frame_id -> window_group
group_to_frames: HashMap<u32, Vec<u32>>window_group -> MS2 frame_ids (sorted by time)
group_to_isolation: HashMap<u32, Vec<(f64, f64)>>window_group -> list of (mz_lo, mz_hi) isolation ranges (normalized)
group_to_scan_ranges: HashMap<u32, Vec<(u32, u32)>>window_group -> list of (scan_lo, scan_hi) active scan ranges (normalized, inclusive)
group_to_mz_union: HashMap<u32, (f64, f64)>window_group -> convex m/z union (lo, hi)
group_to_scan_unions: HashMap<u32, Vec<(u32, u32)>>window_group -> merged disjoint scan unions (inclusive)
frame_time: HashMap<u32, f64>frame_id -> time (seconds)
group_to_slices: HashMap<u32, Arc<[ProgramSlice]>>New: pre-materialized program slices per group.
Implementations§
Source§impl DiaIndex
impl DiaIndex
pub fn new( meta: &[FrameMeta], info: &[DiaMsMisInfo], wins: &[DiaMsMsWindow], ) -> Self
pub fn program_slices_for_group(&self, g: u32) -> Vec<ProgramSlice>
Sourcepub fn tiles_for_precursor_in_group(
&self,
g: u32,
prec_mz: f32,
im_apex: f32,
) -> Vec<usize>
pub fn tiles_for_precursor_in_group( &self, g: u32, prec_mz: f32, im_apex: f32, ) -> Vec<usize>
Tiles in group g that could have selected this precursor.
Conditions:
- Precursor IM window overlaps tile scan band.
- Precursor m/z lies inside tile’s isolation m/z window.
Tiles in group
gthat could have selected this precursor.
Conditions:
- Precursor apex IM scan lies inside tile scan band.
- Precursor m/z lies inside tile’s isolation m/z window.
Sourcepub fn tiles_for_fragment_in_group(
&self,
g: u32,
im_window: (usize, usize),
) -> Vec<usize>
pub fn tiles_for_fragment_in_group( &self, g: u32, im_window: (usize, usize), ) -> Vec<usize>
Tiles in group g that an MS2 fragment cluster could belong to.
IMPORTANT: Fragment m/z is not constrained by isolation window (selection happened before fragmentation). We only check the IM/scan range.
Sourcepub fn program_for_group(&self, g: u32) -> Ms2GroupProgram
pub fn program_for_group(&self, g: u32) -> Ms2GroupProgram
Convenience: materialize a program description for a group.
pub fn groups_for_precursor(&self, prec_mz: f32, im_apex: f32) -> Vec<u32>
Sourcepub fn tile_mz_bounds(&self, g: u32, tile_idx: usize) -> (f32, f32)
pub fn tile_mz_bounds(&self, g: u32, tile_idx: usize) -> (f32, f32)
Return the m/z isolation bounds (lo, hi) for a given tile index in a group.
If the tile index is out of range for this group, returns (NaN, NaN). This is used by the fragment query to decide whether a fragment’s m/z lies inside the precursor-selection band of the shared tile.
pub fn mz_bounds_for_window_group_core(&self, g: u32) -> Option<(f32, f32)>
pub fn scan_unions_for_window_group_core( &self, g: u32, ) -> Option<Vec<(usize, usize)>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiaIndex
impl RefUnwindSafe for DiaIndex
impl Send for DiaIndex
impl Sync for DiaIndex
impl Unpin for DiaIndex
impl UnwindSafe for DiaIndex
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.