pub struct TimsSlice {
pub frames: Vec<TimsFrame>,
}
Fields§
§frames: Vec<TimsFrame>
Implementations§
Source§impl TimsSlice
impl TimsSlice
Sourcepub fn filter_ranged(
&self,
mz_min: f64,
mz_max: f64,
scan_min: i32,
scan_max: i32,
inv_mob_min: f64,
inv_mob_max: f64,
intensity_min: f64,
intensity_max: f64,
num_threads: usize,
) -> TimsSlice
pub fn filter_ranged( &self, mz_min: f64, mz_max: f64, scan_min: i32, scan_max: i32, inv_mob_min: f64, inv_mob_max: f64, intensity_min: f64, intensity_max: f64, num_threads: usize, ) -> TimsSlice
Filter the TimsSlice by m/z, scan, and intensity
§Arguments
mz_min
- The minimum m/z valuemz_max
- The maximum m/z valuescan_min
- The minimum scan valuescan_max
- The maximum scan valueintensity_min
- The minimum intensity valueintensity_max
- The maximum intensity valuenum_threads
- The number of threads to use
§Returns
TimsSlice
- A TimsSlice containing only the TimsFrames that pass the filter
§Example
use mscore::timstof::slice::TimsSlice;
let slice = TimsSlice::new(vec![]);
let filtered_slice = slice.filter_ranged(400.0, 2000.0, 0, 1000, 0.0, 100000.0, 0.0, 1.6, 4);
pub fn filter_ranged_ms_type_specific( &self, mz_min_ms1: f64, mz_max_ms1: f64, scan_min_ms1: i32, scan_max_ms1: i32, inv_mob_min_ms1: f64, inv_mob_max_ms1: f64, intensity_min_ms1: f64, intensity_max_ms1: f64, mz_min_ms2: f64, mz_max_ms2: f64, scan_min_ms2: i32, scan_max_ms2: i32, inv_mob_min_ms2: f64, inv_mob_max_ms2: f64, intensity_min_ms2: f64, intensity_max_ms2: f64, num_threads: usize, ) -> TimsSlice
Sourcepub fn get_slice_by_type(&self, t: MsType) -> TimsSlice
pub fn get_slice_by_type(&self, t: MsType) -> TimsSlice
pub fn to_resolution(&self, resolution: i32, num_threads: usize) -> TimsSlice
pub fn vectorized( &self, resolution: i32, num_threads: usize, ) -> TimsSliceVectorized
pub fn from_flat_slice( frame_ids: Vec<i32>, scans: Vec<i32>, tofs: Vec<i32>, retention_times: Vec<f64>, mobilities: Vec<f64>, mzs: Vec<f64>, intensities: Vec<f64>, ) -> Self
pub fn flatten(&self) -> TimsSliceFlat
pub fn to_windows( &self, window_length: f64, overlapping: bool, min_peaks: usize, min_intensity: f64, num_threads: usize, ) -> Vec<TimsSpectrum>
pub fn to_dense_windows( &self, window_length: f64, overlapping: bool, min_peaks: usize, min_intensity: f64, resolution: i32, num_threads: usize, ) -> Vec<(Vec<f64>, Vec<f64>, Vec<f64>, Vec<i32>, Vec<i32>, usize, usize)>
pub fn to_tims_planes( &self, tof_max_value: i32, num_chunks: i32, num_threads: usize, ) -> Vec<TimsPlane>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimsSlice
impl RefUnwindSafe for TimsSlice
impl Send for TimsSlice
impl Sync for TimsSlice
impl Unpin for TimsSlice
impl UnwindSafe for TimsSlice
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
Mutably borrows from an owned value. Read more
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>
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 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>
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
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>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.