NativeSpectrumIdentifierFormatTerm

Enum NativeSpectrumIdentifierFormatTerm 

Source
pub enum NativeSpectrumIdentifierFormatTerm {
Show 28 variants NativeSpectrumIdentifierFormat, ThermoNativeIDFormat, WatersNativeIDFormat, WIFFNativeIDFormat, BrukerAgilentYEPNativeIDFormat, BrukerBAFNativeIDFormat, BrukerFIDNativeIDFormat, MultiplePeakListNativeIDFormat, SinglePeakListNativeIDFormat, ScanNumberOnlyNativeIDFormat, SpectrumIdentifierNativeIDFormat, BrukerU2NativeIDFormat, NoNativeIDFormat, ShimadzuBiotechNativeIDFormat, MobilionMBINativeIDFormat, SCIEXTOFTOFNativeIDFormat, AgilentMassHunterNativeIDFormat, SpectrumFromDatabaseIntegerNativeIDFormat, MascotQueryNumber, SpectrumFromProteinScapeDatabaseNativeIDFormat, SpectrumFromDatabaseStringNativeIDFormat, SCIEXTOFTOFT2DNativeIDFormat, ScaffoldNativeIDFormat, BrukerContainerNativeIDFormat, UIMFNativeIDFormat, BrukerTDFNativeIDFormat, ShimadzuBiotechQTOFNativeIDFormat, BrukerTSFNativeIDFormat,
}
Expand description

A text-based schema that defines how native spectrum identifiers are formatted. These patterns are often found in mzML-compatible formats.

Variants§

§

NativeSpectrumIdentifierFormat

native spectrum identifier format - (.+)

§

ThermoNativeIDFormat

Thermo nativeID format - controllerType=(?<controllerType>\d+) controllerNumber=(?<controllerNumber>\d+) scan=(?<scan>\d+)

§

WatersNativeIDFormat

Waters nativeID format - function=(?<function>\d+) process=(?<process>\d+) scan=(?<scan>\d+)

§

WIFFNativeIDFormat

WIFF nativeID format - sample=(?<sample>\d+) period=(?<period>\d+) cycle=(?<cycle>\d+) experiment=(?<experiment>\d+)

§

BrukerAgilentYEPNativeIDFormat

Bruker/Agilent YEP nativeID format - scan=(?<scan>\d+)

§

BrukerBAFNativeIDFormat

Bruker BAF nativeID format - scan=(?<scan>\d+)

§

BrukerFIDNativeIDFormat

Bruker FID nativeID format - file=(?<file>\S+)

§

MultiplePeakListNativeIDFormat

multiple peak list nativeID format - index=(?<index>\d+)

§

SinglePeakListNativeIDFormat

single peak list nativeID format - file=(?<file>\S+)

§

ScanNumberOnlyNativeIDFormat

scan number only nativeID format - scan=(?<scan>\d+)

§

SpectrumIdentifierNativeIDFormat

spectrum identifier nativeID format - spectrum=(?<spectrum>\d+)

§

BrukerU2NativeIDFormat

Bruker U2 nativeID format - declaration=(?<declaration>\d+) collection=(?<collection>\d+) scan=(?<scan>\d+)

§

NoNativeIDFormat

no nativeID format - (.+)

§

ShimadzuBiotechNativeIDFormat

Shimadzu Biotech nativeID format - source=(?<source>\S+) start=(?<start>\d+) end=(?<end>\d+)

§

MobilionMBINativeIDFormat

Mobilion MBI nativeID format - frame=(?<frame>\d+) scan=(?<scan>\d+)

§

SCIEXTOFTOFNativeIDFormat

SCIEX TOF/TOF nativeID format - jobRun=(?<jobRun>\d+) spotLabel=(?<spotLabel>\S+) spectrum=(?<spectrum>\d+)

§

AgilentMassHunterNativeIDFormat

Agilent MassHunter nativeID format - scanId=(?<scanId>\d+)

§

SpectrumFromDatabaseIntegerNativeIDFormat

spectrum from database integer nativeID format - databasekey=(?<databasekey>-?\d+)

§

MascotQueryNumber

Mascot query number - query=(?<query>\d+)

§

SpectrumFromProteinScapeDatabaseNativeIDFormat

spectrum from ProteinScape database nativeID format - databasekey=(?<databasekey>-?\d+)

§

SpectrumFromDatabaseStringNativeIDFormat

spectrum from database string nativeID format - databasekey=(?<databasekey>\S+)

§

SCIEXTOFTOFT2DNativeIDFormat

SCIEX TOF/TOF T2D nativeID format - file=(?<file>\S+)

§

ScaffoldNativeIDFormat

Scaffold nativeID format - (.+)

§

BrukerContainerNativeIDFormat

Bruker Container nativeID format - (.+)

§

UIMFNativeIDFormat

UIMF nativeID format - frame=(?<frame>\d+) scan=(?<scan>\d+) frameType=(?<frameType>\d+)

§

BrukerTDFNativeIDFormat

Bruker TDF nativeID format - frame=(?<frame>\d+) scan=(?<scan>\d+)

§

ShimadzuBiotechQTOFNativeIDFormat

Shimadzu Biotech QTOF nativeID format - scan=(?<scan>\d+)

§

BrukerTSFNativeIDFormat

Bruker TSF nativeID format - frame=(?<frame>\d+)

Implementations§

Source§

impl NativeSpectrumIdentifierFormatTerm

These methods are part of the controlled vocabulary mapping

Source

pub const fn accession(&self) -> u32

Retrieve the accession number for this term, independent of its controlled vocabulary

Source

pub const fn controlled_vocabulary(&self) -> ControlledVocabulary

Retrieve the controlled vocabulary this term belongs to

Source

pub const fn name(&self) -> &'static str

Retrieve the plain text human readable name for this term

Source

pub fn from_name(name: &str) -> Option<NativeSpectrumIdentifierFormatTerm>

Attempt to map a string by name to retrieve one of the terms from this set.

If no match is found, None is returned.

Source

pub const fn from_accession( accession: u32, ) -> Option<NativeSpectrumIdentifierFormatTerm>

Attempt to map the numeric accession number to retrieve one of the terms from this set.

If no match is found, None is returned.

Source

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

Convert this term into a ParamCow without a value.

Source

pub const fn from_curie( curie: &CURIE, ) -> Option<NativeSpectrumIdentifierFormatTerm>

Convert a CURIE by accession.

If no match is found, None is returned.

Source

pub const fn from_param( p: &ParamCow<'static>, ) -> Option<NativeSpectrumIdentifierFormatTerm>

Attempt to convert a ParamCow to a term from this set.

If no match is found, None is returned.

§Note

This method can be called in const contexts, requiring the type be ParamCow with a 'static lifetime parameter, but the regular From trait is implemented for all ParamLike types.

Source

pub fn flags(&self) -> &str

Retrieve a term set specific set of flags

Source

pub fn parents(&self) -> Vec<NativeSpectrumIdentifierFormatTerm>

Retrieve the list of zero or more terms in the set which are parents of this term.

Source§

impl NativeSpectrumIdentifierFormatTerm

Source

pub fn parser(&self) -> Regex

Create a new regex::Regex for this identifier format.

Source

pub fn parse<'h>(&self, ident: &'h str) -> Option<Captures<'h>>

This parses the provided string, returning the captured groups of the ID pattern if they are present in a regex::Captures structure that can be indexed by group number.

§Note

This method creates a new regular expression on each invocation, making it expensive to invoke. If you must call this repeatedly, instead use NativeSpectrumIdentifierFormatTerm::build to create a the regular expression once and re-use it directly.

Source

pub fn build(&self) -> NativeSpectrumIDFormat

Source

pub fn format<'h>( &self, values: impl IntoIterator<Item = ValueRef<'h>>, ) -> String

Given the field values of a nativeID format, create string in that format

§Note

This method creates a new expression formatter every time. Use NativeSpectrumIdentifierFormatTerm::build to create a re-useable parser/formatter.

Source

pub fn parse_named<'h>(&self, ident: &'h str) -> Vec<(Option<String>, &'h str)>

This parses the provided string, returning the capture groups as (name, value) pairs they are present.

§Note

This method creates a new regular expression on each invocation, making it expensive to invoke. If you must call this repeatedly, instead use NativeSpectrumIdentifierFormatTerm::build to create a the regular expression once and re-use it directly.

Trait Implementations§

Source§

impl Clone for NativeSpectrumIdentifierFormatTerm

Source§

fn clone(&self) -> NativeSpectrumIdentifierFormatTerm

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 NativeSpectrumIdentifierFormatTerm

Source§

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

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

impl From<&NativeSpectrumIdentifierFormatTerm> for Param

Source§

fn from(value: &NativeSpectrumIdentifierFormatTerm) -> Param

Converts to this type from the input type.
Source§

impl From<&NativeSpectrumIdentifierFormatTerm> for ParamCow<'static>

Source§

fn from(value: &NativeSpectrumIdentifierFormatTerm) -> ParamCow<'static>

Converts to this type from the input type.
Source§

impl From<NativeSpectrumIdentifierFormatTerm> for NativeSpectrumIDFormat

Source§

fn from(value: NativeSpectrumIdentifierFormatTerm) -> NativeSpectrumIDFormat

Converts to this type from the input type.
Source§

impl From<NativeSpectrumIdentifierFormatTerm> for Param

Source§

fn from(value: NativeSpectrumIdentifierFormatTerm) -> Param

Converts to this type from the input type.
Source§

impl From<NativeSpectrumIdentifierFormatTerm> for ParamCow<'static>

Source§

fn from(value: NativeSpectrumIdentifierFormatTerm) -> ParamCow<'static>

Converts to this type from the input type.
Source§

impl<P> From<P> for NativeSpectrumIdentifierFormatTerm
where P: ParamLike,

Source§

fn from(value: P) -> NativeSpectrumIdentifierFormatTerm

Converts to this type from the input type.
Source§

impl PartialEq for NativeSpectrumIdentifierFormatTerm

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for NativeSpectrumIdentifierFormatTerm

Source§

impl Eq for NativeSpectrumIdentifierFormatTerm

Source§

impl StructuralPartialEq for NativeSpectrumIdentifierFormatTerm

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> AsOut<T> for T
where T: Copy,

Source§

fn as_out(&mut self) -> Out<'_, T>

Returns an out reference to self.
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<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<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 = 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.