Skip to main content

ArrayType

Enum ArrayType 

Source
pub enum ArrayType {
Show 26 variants Unknown, MZArray, IntensityArray, ChargeArray, SignalToNoiseArray, TimeArray, WavelengthArray, IonMobilityArray, MeanIonMobilityArray, MeanDriftTimeArray, MeanInverseReducedIonMobilityArray, RawIonMobilityArray, RawDriftTimeArray, RawInverseReducedIonMobilityArray, DeconvolutedIonMobilityArray, DeconvolutedDriftTimeArray, DeconvolutedInverseReducedIonMobilityArray, ScanningQuadrupolePositionLowerBoundMZ, ScanningQuadrupolePositionUpperBoundMZ, IndexArray, BaselineArray, ResolutionArray, PressureArray, TemperatureArray, FlowRateArray, NonStandardDataArray { name: Box<String>, },
}
Expand description

The kinds of data arrays found in mass spectrometry data files governed by the PSI-MS controlled vocabulary.

Variants§

§

Unknown

No information is given about this array, not even a name

§

MZArray

The m/z array, the coordinate values of a mass spectrum. The default unit is Unit::MZ.

§

IntensityArray

The intensity or abundance of a signal at a given point. The default unit is Unit::DetectorCounts.

§

ChargeArray

The deconvolved charge state of an ion

§

SignalToNoiseArray

The estimated signal to noise ratio of a point observation

§

TimeArray

The time coordinate an observation occured such as for a feature, trace, or chromatgam. The default unit is Unit::Minute

§

WavelengthArray

The wavelength coordinate of an observation in a photospectrometry measurement. The default unit is Unit::Nanometer.

§

IonMobilityArray

A basic ion mobility array that contains no additional information about the unit or level of processing or aggregation. Note: It has no implicit unit information!

§

MeanIonMobilityArray

The mean ion mobility measurement of an observation. This is the centroid of an ion mobility measurement, distinct from a profile array view. Note: It has no implicit unit information!

§

MeanDriftTimeArray

The mean drift time of an observation. This is the centroid of an ion mobility measurement expressed in terms of drift time. The default unit is Unit::Millisecond.

§

MeanInverseReducedIonMobilityArray

The mean drift time of an observation. This is the centroid of an ion mobility measurement expressed in terms of $V*s/cm^2$. The default unit is Unit::VoltSecondPerSquareCentimeter.

§

RawIonMobilityArray

The raw ion mobility measurement of an observation. This is unprocessed and may be profile or centroid ion mobility measurements.

§

RawDriftTimeArray

The raw drift time of an observation. This is may be a profile or centroid representation of an ion mobility measurement expressed in terms of drift time. The default unit is Unit::Millisecond.

§

RawInverseReducedIonMobilityArray

The raw drift time of an observation. This is may be a profile or centroid representation of an ion mobility measurement expressed in terms of $V*s/cm^2$. The default unit is Unit::VoltSecondPerSquareCentimeter.

§

DeconvolutedIonMobilityArray

The mean ion mobility measurement of an observation after deconvolution of cross-cutting properties like charge state, adduct, or some other relevant property. This is the centroid of an ion mobility measurement, distinct from a profile array view. Note: It has no implicit unit information!

§

DeconvolutedDriftTimeArray

The mean ion mobility drift time measurement of an observation expressed in drift time after deconvolution of cross-cutting properties like charge state, adduct, or some other relevant property. This is the centroid of an ion mobility measurement. The default unit is Unit::Millisecond.

§

DeconvolutedInverseReducedIonMobilityArray

The mean ion mobility drift time measurement of an observation expressed in $V*s/cm^2$ after deconvolution of cross-cutting properties like charge state, adduct, or some other relevant property. This is the centroid of an ion mobility measurement. The default unit is Unit::Millisecond.

§

ScanningQuadrupolePositionLowerBoundMZ

Array of m/z values representing the lower bound m/z of the quadrupole position at each point in the spectrum. The default unit is Unit::MZ

§

ScanningQuadrupolePositionUpperBoundMZ

Array of m/z values representing the upper bound m/z of the quadrupole position at each point in the spectrum. The default unit is Unit::MZ

§

IndexArray

A data array whose values are index values for another collection or array.

§

BaselineArray

A data array of signal baseline values (the signal in the absence of analytes).

§

ResolutionArray

A data array of resolution values, which influence the accuracy of measurements.

§

PressureArray

A data array of pressure measurements.

§

TemperatureArray

A data array of temperature measurements.

§

FlowRateArray

A data array of flow rate measurements.

§

NonStandardDataArray

A data array that is not covered by any of the existing types, but given a distinct name. This is used for user- or application-defined arrays.

Fields

§name: Box<String>

Implementations§

Source§

impl ArrayType

Source

pub const fn preferred_dtype(&self) -> BinaryDataArrayType

Get the data type that the array is compatible with in the mzdata type expectations.

By default, the m/z array is encoded using Float64, the charge state array is encoded using Int32, and all other arrays are encoded using Float32.

§Examples
use mzdata_bindata::{ArrayType, BinaryDataArrayType};

assert_eq!(ArrayType::MZArray.preferred_dtype(), BinaryDataArrayType::Float64);
assert_eq!(ArrayType::IntensityArray.preferred_dtype(), BinaryDataArrayType::Float32);
assert_eq!(ArrayType::ChargeArray.preferred_dtype(), BinaryDataArrayType::Int32);
Source

pub const fn as_mean_ion_mobility(&self) -> Option<ArrayType>

Convert an ion mobility array to its mean variant

§Examples
use mzdata_bindata::ArrayType;

assert_eq!(
    ArrayType::RawDriftTimeArray.as_mean_ion_mobility(),
    Some(ArrayType::MeanDriftTimeArray)
);
assert_eq!(ArrayType::MZArray.as_mean_ion_mobility(), None);
Source

pub const fn as_raw_ion_mobility(&self) -> Option<ArrayType>

Convert an ion mobility array to its raw variant

Source

pub const fn as_deconvoluted_ion_mobility(&self) -> Option<ArrayType>

Convert an ion mobility array to its deconvoluted variant

Source

pub fn nonstandard<S>(name: S) -> ArrayType
where S: ToString,

Create a ArrayType::NonStandardDataArray with the provided name.

Source

pub const fn preferred_unit(&self) -> Option<Unit>

The preferred unit for this array type.

Source

pub const fn is_ion_mobility(&self) -> bool

Test if the the array describes an ion mobility quantity.

§Examples
use mzdata_bindata::ArrayType;

assert!(!ArrayType::MZArray.is_ion_mobility());
assert!(ArrayType::MeanInverseReducedIonMobilityArray.is_ion_mobility());
Source

pub fn as_param(&self, unit: Option<Unit>) -> Param

Create a Param for this array type.

If a unit is provided, that unit will be specified, otherwise a default unit may be used instead.

Prefer this to Self::as_param_const when you do not need to worry about const-ness and the

Source

pub const fn as_param_const(&self) -> ParamCow<'static>

Create a ParamCow for this array type in a const context using the default unit.

NOTE: If this is a Self::NonStandardDataArray, this function will panic as this variant requires allocation.

Prefer this method over Self::as_param_with_unit_const when the default unit is acceptable, and you are confident you are not dealing with a non-standard array.

§Panics

When self is either Self::NonStandardDataArray or an unimplemented variant.

Source

pub const fn as_param_with_unit_const(&self, unit: Unit) -> ParamCow<'static>

Create a ParamCow for this array type in a const context using the provided unit.

NOTE: If this is a Self::NonStandardDataArray, this function will panic as this variant requires allocation.

Prefer this method over Self::as_param_const when you want to control the unit directly rather than accepting the default unit and possibly updating it in the calling code.

§Panics

When self is either Self::NonStandardDataArray or an unimplemented variant.

Source

pub fn from_accession(x: CURIE) -> Option<ArrayType>

Translate from CURIE to an ArrayType

Trait Implementations§

Source§

impl Clone for ArrayType

Source§

fn clone(&self) -> ArrayType

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 Debug for ArrayType

Source§

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

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

impl Default for ArrayType

Source§

fn default() -> ArrayType

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

impl<'de> Deserialize<'de> for ArrayType

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<ArrayType, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ArrayType

Source§

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

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

impl Eq for ArrayType

Source§

impl Hash for ArrayType

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for ArrayType

Source§

fn cmp(&self, other: &ArrayType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for ArrayType

Source§

fn eq(&self, other: &ArrayType) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for ArrayType

Source§

fn partial_cmp(&self, other: &ArrayType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for ArrayType

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ArrayType

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

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

Source§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more