DiaIndex

Struct DiaIndex 

Source
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

Source

pub fn new( meta: &[FrameMeta], info: &[DiaMsMisInfo], wins: &[DiaMsMsWindow], ) -> Self

Source

pub fn program_slices_for_group(&self, g: u32) -> Vec<ProgramSlice>

Source

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:

  1. Precursor IM window overlaps tile scan band.
  2. Precursor m/z lies inside tile’s isolation m/z window. Tiles in group g that could have selected this precursor.

Conditions:

  1. Precursor apex IM scan lies inside tile scan band.
  2. Precursor m/z lies inside tile’s isolation m/z window.
Source

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.

Source

pub fn program_for_group(&self, g: u32) -> Ms2GroupProgram

Convenience: materialize a program description for a group.

Source

pub fn groups_for_precursor(&self, prec_mz: f32, im_apex: f32) -> Vec<u32>

Source

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.

Source

pub fn mz_bounds_for_window_group_core(&self, g: u32) -> Option<(f32, f32)>

Source

pub fn scan_unions_for_window_group_core( &self, g: u32, ) -> Option<Vec<(usize, usize)>>

Trait Implementations§

Source§

impl Clone for DiaIndex

Source§

fn clone(&self) -> DiaIndex

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DiaIndex

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V