Skip to main content

DeconvolutedSpectrumType

Struct DeconvolutedSpectrumType 

Source
pub struct DeconvolutedSpectrumType<D: DeconvolutedCentroidLike> {
    pub description: SpectrumDescription,
    pub deconvoluted_peaks: MassPeakSetType<D>,
}
Expand description

Represents a spectrum that has been centroided, deisotoped, and charge state deconvolved.

This type of spectrum represents data in exactly one format.

Fields§

§description: SpectrumDescription

The spectrum metadata describing acquisition conditions and details.

§deconvoluted_peaks: MassPeakSetType<D>

The deisotoped and charge state deconvolved peaks, sorted by neutral mass in a fast searchable structure.

Implementations§

Source§

impl<D: DeconvolutedCentroidLike> DeconvolutedSpectrumType<D>

Source

pub fn new( description: SpectrumDescription, deconvoluted_peaks: MassPeakSetType<D>, ) -> Self

Source

pub fn into_spectrum<C>( self, ) -> Result<MultiLayerSpectrum<C, D>, SpectrumConversionError>
where C: CentroidLike,

Convert a spectrum into a MultiLayerSpectrum on D, but preserve all information associated with this spectrum as-is.

Source

pub fn reinterpret<C1, D1>(self) -> MultiLayerSpectrum<C1, D1>

Convert a CentroidSpectrumType into a MultiLayerSpectrum over any peak type, but recode the peak list as DataArray, potentially losing information if the new peak types do not re-use the same ArrayType during peak reconstruction.

Trait Implementations§

Source§

impl<D: Clone + DeconvolutedCentroidLike> Clone for DeconvolutedSpectrumType<D>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<D: Debug + DeconvolutedCentroidLike> Debug for DeconvolutedSpectrumType<D>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<D: DeconvolutedCentroidLike> Default for DeconvolutedSpectrumType<D>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<D: DeconvolutedPeakAdapting> Index<usize> for DeconvolutedSpectrumType<D>

Source§

type Output = <PeakSetVec<D, Mass> as Index<usize>>::Output

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<D: DeconvolutedCentroidLike> ParamDescribed for DeconvolutedSpectrumType<D>

Source§

fn params(&self) -> &[Param]

Obtain an immutable slice over the encapsulated Param list
Source§

fn params_mut(&mut self) -> &mut ParamList

Obtain an mutable slice over the encapsulated Param list
Source§

fn add_param(&mut self, param: Param)

Add a new Param to the entity
Source§

fn extend_params(&mut self, it: impl IntoIterator<Item = Param>)

Add all parameters from an iterator of Param to the entity
Source§

fn remove_param(&mut self, index: usize) -> Param

Remove the ith Param from the entity.
Source§

fn get_param_by_name(&self, name: &str) -> Option<&Param>

Find the first Param whose name matches name
Source§

fn get_param_by_curie(&self, curie: &CURIE) -> Option<&Param>

Find the first Param whose CURIE matches curie
Source§

fn get_param_by_accession(&self, accession: &str) -> Option<&Param>

Find the first Param whose Param::accession matches accession Read more
Source§

fn iter_params(&self) -> Iter<'_, Param> ⓘ

Iterate over the encapsulated parameter list
Source§

fn iter_params_mut(&mut self) -> IterMut<'_, Param> ⓘ

Iterate mutably over the encapsulated parameter list
Source§

impl<D: DeconvolutedPeakAdapting> PeakCollection<D, Mass> for DeconvolutedSpectrumType<D>

Source§

fn len(&self) -> usize

Get the number of peaks in the collection
Source§

fn get_item(&self, i: usize) -> &D

Implement index access
Source§

fn get_slice(&self, i: Range<usize>) -> &[D]

Source§

fn search_by(&self, query: f64) -> Result<usize, usize>

Most basic method for coordinate search, find the index in this collection whose coordinate value is nearest to query. The return signature is identical to slice::binary_search_by
Source§

fn iter<'a>(&'a self) -> impl Iterator<Item = &'a D>
where D: 'a,

Source§

fn is_empty(&self) -> bool

Test if the collection is empty
Source§

unsafe fn get_item_unchecked(&self, i: usize) -> &T

Implement index access without bounds checking. Read more
Source§

fn _earliest_peak( &self, query: f64, error_tolerance: Tolerance, i: usize, ) -> Option<usize>

Implementation details of PeakCollection::_search_earliest
Source§

fn _latest_peak( &self, query: f64, error_tolerance: Tolerance, i: usize, ) -> Option<usize>

Implementation details of PeakCollection::_search_latest
Source§

fn _search_earliest( &self, query: f64, error_tolerance: Tolerance, ) -> Option<usize>

Find the first index for query within error_tolerance in this peak collection, or None.
Source§

fn _search_latest( &self, query: f64, error_tolerance: Tolerance, ) -> Option<usize>

Find the last index for query within error_tolerance in this peak collection, or None.
Source§

fn _closest_peak( &self, query: f64, error_tolerance: Tolerance, i: usize, ) -> Option<usize>

Source§

fn most_intense_peak_for( &self, query: f64, error_tolerance: Tolerance, i: usize, ) -> Option<usize>

Find the peak for query that satisfies error_tolerance with the maximum intensity, starting from index i.
Source§

fn total_ion_current(&self) -> f32

Source§

fn base_peak(&self) -> Option<&T>

Source§

fn search(&self, query: f64, error_tolerance: Tolerance) -> Option<usize>

Find the nearest index for query within error_tolerance in this peak collection, or None.
Source§

fn has_peak(&self, query: f64, error_tolerance: Tolerance) -> Option<&T>

Return the peak nearest to query within error_tolerance in this peak collection, or None.
Source§

fn between(&self, low: f64, high: f64, error_tolerance: Tolerance) -> &[T]

Return a slice containing all peaks between low and high coordinates within error_tolerance.
Source§

fn all_peaks_for(&self, query: f64, error_tolerance: Tolerance) -> &[T]

Find all peaks which could match query within error_tolerance units
Source§

fn search_sorted_all_indices<Q>( &self, queries: &[Q], error_tolerance: Tolerance, ) -> Vec<(usize, usize)>
where Q: CoordinateLike<C>,

Given a sorted list of query values that are on the same coordinate system C, find the pairs of indices from query to self within error_tolerance units of error. Read more
Source§

fn search_sorted_all_indices_iter<'a, Q>( &'a self, queries: &'a [Q], error_tolerance: Tolerance, ) -> SearchSortedIter<'a, C, T, Self, Q> ⓘ
where Q: CoordinateLike<C>, Self: Sized,

This alternative implementation of PeakCollection::search_sorted_all_indices that uses an iterator instead of creating intermediate storage. It should be equivalent in behavior but touch the heap less.
Source§

impl<D: DeconvolutedCentroidLike> SpectrumLike<CentroidPeak, D> for DeconvolutedSpectrumType<D>

Source§

fn description(&self) -> &SpectrumDescription

The method to access the spectrum description itself, which supplies the data for most other methods on this trait.
Source§

fn description_mut(&mut self) -> &mut SpectrumDescription

The method to access the spectrum descript itself, mutably.
Source§

fn peaks(&self) -> RefPeakDataLevel<'_, CentroidPeak, D>

Retrieve the most processed representation of the mass spectrum’s signal
Source§

fn raw_arrays(&self) -> Option<&BinaryArrayMap>

Obtain a reference to the BinaryArrayMap if one is available for the peak information. This may not be the most refined version of the peak signal if it has been processed further.
Source§

fn into_peaks_and_description( self, ) -> (PeakDataLevel<CentroidPeak, D>, SpectrumDescription)

Consume the spectrum, decomposing it into the SpectrumDescription and an owning PeakDataLevel. Read more
Source§

fn acquisition(&self) -> &Acquisition

Access the acquisition information for this spectrum.
Source§

fn precursor(&self) -> Option<&Precursor>

Access the (first) precursor information, if it exists.
Source§

fn precursor_iter(&self) -> impl Iterator<Item = &Precursor> + ExactSizeIterator

Iterate over all precursors of the spectrum
Source§

fn precursor_count(&self) -> usize

The number of precursor levels recorded
Source§

fn precursor_mut(&mut self) -> Option<&mut Precursor>

Mutably access the (first) precursor information, if it exists
Source§

fn precursor_iter_mut( &mut self, ) -> impl Iterator<Item = &mut Precursor> + ExactSizeIterator

Iterate over all precursors of the spectrum mutably
Source§

fn add_precursor(&mut self, precursor: Precursor)

Add a precursor to the list of precursors for this spectrum. Read more
Source§

fn remove_precursor(&mut self, index: usize) -> Precursor

Remove the precursor entry at index in the precursor list. Read more
Source§

fn start_time(&self) -> f64

A shortcut method to retrieve the scan start time of a spectrum
Source§

fn ms_level(&self) -> u8

Access the MS exponentiation level
Source§

fn id(&self) -> &str

Access the native ID string for the spectrum
Source§

fn index(&self) -> usize

Access the index of the spectrum in the source file
Source§

fn signal_continuity(&self) -> SignalContinuity

Access a description of how raw the signal is, whether a profile spectrum is available or only centroids are present.
Source§

fn polarity(&self) -> ScanPolarity

Access a description of the spectrum polarity
Source§

fn ion_mobility(&self) -> Option<f64>

Access the point measure of ion mobility associated with the scan if present. This is distinct from having a frame-level scan across the ion mobility dimension.
Source§

fn has_ion_mobility(&self) -> bool

Check if this spectrum has a point measure of ion mobility. This is distinct from having a frame-level scan across the ion mobility dimension.
Source§

fn has_ion_mobility_dimension(&self) -> bool

Check if this spectrum has an ion mobility dimension/array. This is distinct from having a scan-level point measure of ion mobility.
Source§

fn has_ion_mobility_class(&self) -> HasIonMobility

A single point of entry for checking if ion mobility is present.
Source§

fn spectrum_type(&self) -> Option<SpectrumType>

Find the type of spectrum described. Read more
Source§

fn set_spectrum_type(&mut self, spectrum_type: SpectrumType)

Set the kind of spectrum represented.
Source§

fn update_summaries(&mut self)

Compute and update the the total ion current, base peak, and m/z range for the spectrum based upon its current peak data. Read more
Source§

impl<C, D> TryFrom<MultiLayerSpectrum<C, D>> for DeconvolutedSpectrumType<D>

Source§

type Error = SpectrumConversionError

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

fn try_from(value: MultiLayerSpectrum<C, D>) -> Result<Self, Self::Error>

Performs the conversion.

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> 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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.