pub struct MultiLayerIonMobilityFrame<C = Feature<MZ, IonMobility>, D = ChargedFeature<Mass, IonMobility>>{
pub arrays: Option<BinaryArrayMap3D>,
pub features: Option<FeatureMap<MZ, IonMobility, C>>,
pub deconvoluted_features: Option<FeatureMap<Mass, IonMobility, D>>,
pub description: IonMobilityFrameDescription,
}Expand description
An ion mobility dimension-equivalent of MultiLayerSpectrum.
An ion mobility frame is just like a mass spectrum, except the signal is spread across multiple ion mobility “points”. This means that instead producing “points” in the mass coordinate system, this produces traces-over-time or “features”.
An ion mobility frames can usually be inter-converted with spectra.
Fields§
§arrays: Option<BinaryArrayMap3D>The raw data arrays, split by ion mobility point
features: Option<FeatureMap<MZ, IonMobility, C>>The (potentially absent) m/z coordinate feature map
deconvoluted_features: Option<FeatureMap<Mass, IonMobility, D>>The (potentially absent) neutral mass coordinate feature map
description: IonMobilityFrameDescriptionImplementations§
Source§impl<C, D> MultiLayerIonMobilityFrame<C, D>where
C: FeatureLike<MZ, IonMobility> + BuildFromArrayMap3D,
D: FeatureLike<Mass, IonMobility> + KnownCharge + BuildFromArrayMap3D,
impl<C, D> MultiLayerIonMobilityFrame<C, D>where
C: FeatureLike<MZ, IonMobility> + BuildFromArrayMap3D,
D: FeatureLike<Mass, IonMobility> + KnownCharge + BuildFromArrayMap3D,
Sourcepub fn try_build_features(
&mut self,
) -> Result<RefFeatureDataLevel<'_, C, D>, SpectrumConversionError>
pub fn try_build_features( &mut self, ) -> Result<RefFeatureDataLevel<'_, C, D>, SpectrumConversionError>
Try to build extracted feature maps from the raw BinaryArrayMap3D
This fails if the BinaryArrayMap3D is not present, or if the required
arrays for C and D are absent.
Source§impl<C, D> MultiLayerIonMobilityFrame<C, D>
impl<C, D> MultiLayerIonMobilityFrame<C, D>
Sourcepub fn new(
arrays: Option<BinaryArrayMap3D>,
features: Option<FeatureMap<MZ, IonMobility, C>>,
deconvoluted_features: Option<FeatureMap<Mass, IonMobility, D>>,
description: IonMobilityFrameDescription,
) -> MultiLayerIonMobilityFrame<C, D>
pub fn new( arrays: Option<BinaryArrayMap3D>, features: Option<FeatureMap<MZ, IonMobility, C>>, deconvoluted_features: Option<FeatureMap<Mass, IonMobility, D>>, description: IonMobilityFrameDescription, ) -> MultiLayerIonMobilityFrame<C, D>
Create a new MultiLayerIonMobilityFrame from a IonMobilityFrameDescription and
any/all/none of the different levels of processing details for signal
data.
Source§impl<C, D> MultiLayerIonMobilityFrame<C, D>where
C: FeatureLike<MZ, IonMobility> + FeatureLikeMut<MZ, IonMobility>,
D: FeatureLike<Mass, IonMobility> + KnownCharge,
When mzsignal is available, MultiLayerIonMobilityFrame supports performing feature extraction
to construct ion mobility-distributed traces in the m/z dimension similar to MultiLayerSpectrum::pick_peaks.
impl<C, D> MultiLayerIonMobilityFrame<C, D>where
C: FeatureLike<MZ, IonMobility> + FeatureLikeMut<MZ, IonMobility>,
D: FeatureLike<Mass, IonMobility> + KnownCharge,
When mzsignal is available, MultiLayerIonMobilityFrame supports performing feature extraction
to construct ion mobility-distributed traces in the m/z dimension similar to MultiLayerSpectrum::pick_peaks.
Sourcepub fn extract_features_with<E>(
&mut self,
error_tolerance: Tolerance,
min_length: usize,
maximum_gap_size: f64,
peak_picker: Option<PeakPicker>,
) -> Result<(), ArrayRetrievalError>
pub fn extract_features_with<E>( &mut self, error_tolerance: Tolerance, min_length: usize, maximum_gap_size: f64, peak_picker: Option<PeakPicker>, ) -> Result<(), ArrayRetrievalError>
Extract features using the provided MapState type to build the C-type features
directly.
If the m/z dimension is not centroided, this will pick peaks for each ion mobility slice as well.
§Arguments
error_tolerance: The mass accuracy error accepted in the m/z dimension between members of the same feature or trace.min_length: The minimum number of time points a feature must contain to be kept in the solution.maximum_gap_size: The maximum time period between m/z observations to tolerate within a feature.peak_picker: A configuredPeakPickerinstance to use to centroid profile m/z spectra. If not provided, the default configuration will be used.
§Type Arguments
E: aMapStateimplementing type that will control howFeatureExtracterTypecan construct features.
If the m/z dimension is not centroided, this will pick peaks for each ion mobility slice as well.
§Note
This requires directly specifying the extraction type to use which opens up a wide
range of customization options. For the simple cases and for convenience, see
MultiLayerIonMobilityFrame::extract_features_simple.
Source§impl<D> MultiLayerIonMobilityFrame<Feature<MZ, IonMobility>, D>
impl<D> MultiLayerIonMobilityFrame<Feature<MZ, IonMobility>, D>
Sourcepub fn extract_features_simple(
&mut self,
error_tolerance: Tolerance,
min_length: usize,
maximum_gap_size: f64,
peak_picker: Option<PeakPicker>,
) -> Result<(), ArrayRetrievalError>
pub fn extract_features_simple( &mut self, error_tolerance: Tolerance, min_length: usize, maximum_gap_size: f64, peak_picker: Option<PeakPicker>, ) -> Result<(), ArrayRetrievalError>
Extract features using the default algorithm.
§Arguments
error_tolerance: The mass accuracy error accepted in the m/z dimension between members of the same feature or trace.min_length: The minimum number of time points a feature must contain to be kept in the solution.maximum_gap_size: The maximum time period between m/z observations to tolerate within a feature.peak_picker: A configuredPeakPickerinstance to use to centroid profile m/z spectra. If not provided, the default configuration will be used.
If the m/z dimension is not centroided, this will pick peaks for each ion mobility slice as well.
Trait Implementations§
Source§impl<C, D> Clone for MultiLayerIonMobilityFrame<C, D>where
C: Clone + FeatureLike<MZ, IonMobility>,
D: Clone + FeatureLike<Mass, IonMobility> + KnownCharge,
impl<C, D> Clone for MultiLayerIonMobilityFrame<C, D>where
C: Clone + FeatureLike<MZ, IonMobility>,
D: Clone + FeatureLike<Mass, IonMobility> + KnownCharge,
Source§fn clone(&self) -> MultiLayerIonMobilityFrame<C, D>
fn clone(&self) -> MultiLayerIonMobilityFrame<C, D>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<C, D> Debug for MultiLayerIonMobilityFrame<C, D>where
C: Debug + FeatureLike<MZ, IonMobility>,
D: Debug + FeatureLike<Mass, IonMobility> + KnownCharge,
impl<C, D> Debug for MultiLayerIonMobilityFrame<C, D>where
C: Debug + FeatureLike<MZ, IonMobility>,
D: Debug + FeatureLike<Mass, IonMobility> + KnownCharge,
Source§impl<C, D> Default for MultiLayerIonMobilityFrame<C, D>where
C: Default + FeatureLike<MZ, IonMobility>,
D: Default + FeatureLike<Mass, IonMobility> + KnownCharge,
impl<C, D> Default for MultiLayerIonMobilityFrame<C, D>where
C: Default + FeatureLike<MZ, IonMobility>,
D: Default + FeatureLike<Mass, IonMobility> + KnownCharge,
Source§fn default() -> MultiLayerIonMobilityFrame<C, D>
fn default() -> MultiLayerIonMobilityFrame<C, D>
Source§impl<'de, C, D> Deserialize<'de> for MultiLayerIonMobilityFrame<C, D>where
C: FeatureLike<MZ, IonMobility> + Deserialize<'de>,
D: FeatureLike<Mass, IonMobility> + KnownCharge + Deserialize<'de>,
impl<'de, C, D> Deserialize<'de> for MultiLayerIonMobilityFrame<C, D>where
C: FeatureLike<MZ, IonMobility> + Deserialize<'de>,
D: FeatureLike<Mass, IonMobility> + KnownCharge + Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MultiLayerIonMobilityFrame<C, D>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MultiLayerIonMobilityFrame<C, D>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<C, D> IonMobilityFrameLike<C, D> for MultiLayerIonMobilityFrame<C, D>
impl<C, D> IonMobilityFrameLike<C, D> for MultiLayerIonMobilityFrame<C, D>
Source§fn description(&self) -> &IonMobilityFrameDescription
fn description(&self) -> &IonMobilityFrameDescription
Source§fn description_mut(&mut self) -> &mut IonMobilityFrameDescription
fn description_mut(&mut self) -> &mut IonMobilityFrameDescription
Source§fn raw_arrays(&self) -> Option<&BinaryArrayMap3D>
fn raw_arrays(&self) -> Option<&BinaryArrayMap3D>
BinaryArrayMap3D if one is available for the feature
information. This may not be the most refined version of the feature signal if
it has been processed further.Source§fn features(&self) -> RefFeatureDataLevel<'_, C, D>
fn features(&self) -> RefFeatureDataLevel<'_, C, D>
Source§fn into_features_and_parts(
self,
) -> (FeatureDataLevel<C, D>, IonMobilityFrameDescription)
fn into_features_and_parts( self, ) -> (FeatureDataLevel<C, D>, IonMobilityFrameDescription)
IonMobilityFrameDescription and an owning
FeatureDataLevel. Read moreSource§fn ion_mobility_unit(&self) -> Unit
fn ion_mobility_unit(&self) -> Unit
Source§fn ion_mobility_unit_mut(&mut self) -> &mut Unit
fn ion_mobility_unit_mut(&mut self) -> &mut Unit
Source§fn acquisition(&self) -> &Acquisition
fn acquisition(&self) -> &Acquisition
Source§fn precursor_iter(&self) -> impl Iterator<Item = &Precursor> + ExactSizeIterator
fn precursor_iter(&self) -> impl Iterator<Item = &Precursor> + ExactSizeIterator
Source§fn precursor_count(&self) -> usize
fn precursor_count(&self) -> usize
Source§fn precursor_mut(&mut self) -> Option<&mut Precursor>
fn precursor_mut(&mut self) -> Option<&mut Precursor>
Source§fn precursor_iter_mut(
&mut self,
) -> impl Iterator<Item = &mut Precursor> + ExactSizeIterator
fn precursor_iter_mut( &mut self, ) -> impl Iterator<Item = &mut Precursor> + ExactSizeIterator
Source§fn add_precursor(&mut self, precursor: Precursor)
fn add_precursor(&mut self, precursor: Precursor)
Source§fn remove_precursor(&mut self, index: usize) -> Precursor
fn remove_precursor(&mut self, index: usize) -> Precursor
index in the precursor list. Read moreSource§fn start_time(&self) -> f64
fn start_time(&self) -> f64
Source§fn signal_continuity(&self) -> SignalContinuity
fn signal_continuity(&self) -> SignalContinuity
Source§fn polarity(&self) -> ScanPolarity
fn polarity(&self) -> ScanPolarity
Source§impl<C, D> ParamDescribed for MultiLayerIonMobilityFrame<C, D>
impl<C, D> ParamDescribed for MultiLayerIonMobilityFrame<C, D>
Source§fn params_mut(&mut self) -> &mut Vec<Param>
fn params_mut(&mut self) -> &mut Vec<Param>
Param listSource§fn extend_params(&mut self, it: impl IntoIterator<Item = Param>)
fn extend_params(&mut self, it: impl IntoIterator<Item = Param>)
Param to the entitySource§fn get_param_by_name(&self, name: &str) -> Option<&Param>
fn get_param_by_name(&self, name: &str) -> Option<&Param>
Param whose name matches nameSource§impl<C, D> Serialize for MultiLayerIonMobilityFrame<C, D>where
C: FeatureLike<MZ, IonMobility> + Serialize,
D: FeatureLike<Mass, IonMobility> + KnownCharge + Serialize,
impl<C, D> Serialize for MultiLayerIonMobilityFrame<C, D>where
C: FeatureLike<MZ, IonMobility> + Serialize,
D: FeatureLike<Mass, IonMobility> + KnownCharge + Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl<C, D> TryFrom<MultiLayerIonMobilityFrame<C, D>> for RawSpectrumwhere
C: FeatureLike<MZ, IonMobility> + BuildArrayMap3DFrom,
D: FeatureLike<Mass, IonMobility> + KnownCharge + BuildArrayMap3DFrom,
A MultiLayerIonMobilityFrame can be converted to RawSpectrum by flattening
the feature data into a BinaryArrayMap.
impl<C, D> TryFrom<MultiLayerIonMobilityFrame<C, D>> for RawSpectrumwhere
C: FeatureLike<MZ, IonMobility> + BuildArrayMap3DFrom,
D: FeatureLike<Mass, IonMobility> + KnownCharge + BuildArrayMap3DFrom,
A MultiLayerIonMobilityFrame can be converted to RawSpectrum by flattening
the feature data into a BinaryArrayMap.
Source§type Error = ArrayRetrievalError
type Error = ArrayRetrievalError
Source§fn try_from(
value: MultiLayerIonMobilityFrame<C, D>,
) -> Result<RawSpectrum, <RawSpectrum as TryFrom<MultiLayerIonMobilityFrame<C, D>>>::Error>
fn try_from( value: MultiLayerIonMobilityFrame<C, D>, ) -> Result<RawSpectrum, <RawSpectrum as TryFrom<MultiLayerIonMobilityFrame<C, D>>>::Error>
Source§impl<CFeat, DFeat, CPeak, DPeak> TryFrom<MultiLayerIonMobilityFrame<CFeat, DFeat>> for MultiLayerSpectrum<CPeak, DPeak>where
CFeat: FeatureLike<MZ, IonMobility> + BuildArrayMap3DFrom,
DFeat: FeatureLike<Mass, IonMobility> + KnownCharge + BuildArrayMap3DFrom,
CPeak: CentroidLike + BuildFromArrayMap,
DPeak: DeconvolutedCentroidLike + BuildFromArrayMap,
A MultiLayerIonMobilityFrame can be converted to MultiLayerSpectrum by flattening
the feature data into a BinaryArrayMap.
impl<CFeat, DFeat, CPeak, DPeak> TryFrom<MultiLayerIonMobilityFrame<CFeat, DFeat>> for MultiLayerSpectrum<CPeak, DPeak>where
CFeat: FeatureLike<MZ, IonMobility> + BuildArrayMap3DFrom,
DFeat: FeatureLike<Mass, IonMobility> + KnownCharge + BuildArrayMap3DFrom,
CPeak: CentroidLike + BuildFromArrayMap,
DPeak: DeconvolutedCentroidLike + BuildFromArrayMap,
A MultiLayerIonMobilityFrame can be converted to MultiLayerSpectrum by flattening
the feature data into a BinaryArrayMap.
Source§type Error = ArrayRetrievalError
type Error = ArrayRetrievalError
Source§fn try_from(
value: MultiLayerIonMobilityFrame<CFeat, DFeat>,
) -> Result<MultiLayerSpectrum<CPeak, DPeak>, <MultiLayerSpectrum<CPeak, DPeak> as TryFrom<MultiLayerIonMobilityFrame<CFeat, DFeat>>>::Error>
fn try_from( value: MultiLayerIonMobilityFrame<CFeat, DFeat>, ) -> Result<MultiLayerSpectrum<CPeak, DPeak>, <MultiLayerSpectrum<CPeak, DPeak> as TryFrom<MultiLayerIonMobilityFrame<CFeat, DFeat>>>::Error>
Source§impl<CFeat, DFeat, CPeak, DPeak> TryFrom<MultiLayerSpectrum<CPeak, DPeak>> for MultiLayerIonMobilityFrame<CFeat, DFeat>where
CFeat: FeatureLike<MZ, IonMobility>,
DFeat: FeatureLike<Mass, IonMobility> + KnownCharge,
CPeak: CentroidLike,
DPeak: DeconvolutedCentroidLike,
MultiLayerSpectrum instances can be converted to MultiLayerIonMobilityFrame by
using BinaryArrayMap3D::stack on the flat MultiLayerSpectrum::arrays.
impl<CFeat, DFeat, CPeak, DPeak> TryFrom<MultiLayerSpectrum<CPeak, DPeak>> for MultiLayerIonMobilityFrame<CFeat, DFeat>where
CFeat: FeatureLike<MZ, IonMobility>,
DFeat: FeatureLike<Mass, IonMobility> + KnownCharge,
CPeak: CentroidLike,
DPeak: DeconvolutedCentroidLike,
MultiLayerSpectrum instances can be converted to MultiLayerIonMobilityFrame by
using BinaryArrayMap3D::stack on the flat MultiLayerSpectrum::arrays.
§Errors
This will fail if BinaryArrayMap3D::stack fails
Source§type Error = ArrayRetrievalError
type Error = ArrayRetrievalError
Source§fn try_from(
value: MultiLayerSpectrum<CPeak, DPeak>,
) -> Result<MultiLayerIonMobilityFrame<CFeat, DFeat>, <MultiLayerIonMobilityFrame<CFeat, DFeat> as TryFrom<MultiLayerSpectrum<CPeak, DPeak>>>::Error>
fn try_from( value: MultiLayerSpectrum<CPeak, DPeak>, ) -> Result<MultiLayerIonMobilityFrame<CFeat, DFeat>, <MultiLayerIonMobilityFrame<CFeat, DFeat> as TryFrom<MultiLayerSpectrum<CPeak, DPeak>>>::Error>
Source§impl<CFeat, DFeat> TryFrom<RawSpectrum> for MultiLayerIonMobilityFrame<CFeat, DFeat>
RawSpectrum instances can be converted to MultiLayerIonMobilityFrame by
using BinaryArrayMap3D::stack on the flat RawSpectrum::arrays.
impl<CFeat, DFeat> TryFrom<RawSpectrum> for MultiLayerIonMobilityFrame<CFeat, DFeat>
RawSpectrum instances can be converted to MultiLayerIonMobilityFrame by
using BinaryArrayMap3D::stack on the flat RawSpectrum::arrays.
§Errors
This will fail if BinaryArrayMap3D::stack fails
Source§type Error = ArrayRetrievalError
type Error = ArrayRetrievalError
Source§fn try_from(
value: RawSpectrum,
) -> Result<MultiLayerIonMobilityFrame<CFeat, DFeat>, <MultiLayerIonMobilityFrame<CFeat, DFeat> as TryFrom<RawSpectrum>>::Error>
fn try_from( value: RawSpectrum, ) -> Result<MultiLayerIonMobilityFrame<CFeat, DFeat>, <MultiLayerIonMobilityFrame<CFeat, DFeat> as TryFrom<RawSpectrum>>::Error>
Auto Trait Implementations§
impl<C, D> Freeze for MultiLayerIonMobilityFrame<C, D>where
Option<FeatureMap<MZ, IonMobility, C>>: Freeze,
Option<FeatureMap<Mass, IonMobility, D>>: Freeze,
impl<C, D> RefUnwindSafe for MultiLayerIonMobilityFrame<C, D>where
Option<FeatureMap<MZ, IonMobility, C>>: RefUnwindSafe,
Option<FeatureMap<Mass, IonMobility, D>>: RefUnwindSafe,
impl<C, D> Send for MultiLayerIonMobilityFrame<C, D>
impl<C, D> Sync for MultiLayerIonMobilityFrame<C, D>
impl<C, D> Unpin for MultiLayerIonMobilityFrame<C, D>where
Option<FeatureMap<MZ, IonMobility, C>>: Unpin,
Option<FeatureMap<Mass, IonMobility, D>>: Unpin,
impl<C, D> UnsafeUnpin for MultiLayerIonMobilityFrame<C, D>where
Option<FeatureMap<MZ, IonMobility, C>>: UnsafeUnpin,
Option<FeatureMap<Mass, IonMobility, D>>: UnsafeUnpin,
impl<C, D> UnwindSafe for MultiLayerIonMobilityFrame<C, D>where
Option<FeatureMap<MZ, IonMobility, C>>: UnwindSafe,
Option<FeatureMap<Mass, IonMobility, D>>: UnwindSafe,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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.