#[non_exhaustive]pub struct SpectrumSequenceListPSM {Show 18 fields
pub raw_file: PathBuf,
pub scan: usize,
pub z: Charge,
pub start_time: Option<Time>,
pub end_time: Option<Time>,
pub peptide: Option<Peptidoform<SemiAmbiguous>>,
pub score: Option<f64>,
pub score_type: Option<String>,
pub rt: Option<Time>,
pub adduct: Option<String>,
pub precursormz: Option<MassOverCharge>,
pub moleculename: Option<String>,
pub inchikey: Option<String>,
pub otherkeys: Option<String>,
pub ion_mobility: Option<f64>,
pub ion_mobility_units: Option<String>,
pub ccs: Option<f64>,
pub version: SpectrumSequenceListVersion,
/* private fields */
}Expand description
The data for individual entries in SpectrumSequenceList files.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.raw_file: PathBuf§scan: usize§z: Charge§start_time: Option<Time>§end_time: Option<Time>§peptide: Option<Peptidoform<SemiAmbiguous>>§score: Option<f64>§score_type: Option<String>§rt: Option<Time>§adduct: Option<String>§precursormz: Option<MassOverCharge>§moleculename: Option<String>§inchikey: Option<String>§otherkeys: Option<String>§ion_mobility: Option<f64>§ion_mobility_units: Option<String>§ccs: Option<f64>§version: SpectrumSequenceListVersionThe version used to read in the data
Implementations§
Trait Implementations§
Source§impl Clone for SpectrumSequenceListPSM
impl Clone for SpectrumSequenceListPSM
Source§fn clone(&self) -> SpectrumSequenceListPSM
fn clone(&self) -> SpectrumSequenceListPSM
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpectrumSequenceListPSM
impl Debug for SpectrumSequenceListPSM
Source§impl Default for SpectrumSequenceListPSM
impl Default for SpectrumSequenceListPSM
Source§fn default() -> SpectrumSequenceListPSM
fn default() -> SpectrumSequenceListPSM
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SpectrumSequenceListPSM
impl<'de> Deserialize<'de> for SpectrumSequenceListPSM
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SpectrumSequenceListPSM> for PSM<SemiAmbiguous, MaybePeptidoform>
impl From<SpectrumSequenceListPSM> for PSM<SemiAmbiguous, MaybePeptidoform>
Source§fn from(value: SpectrumSequenceListPSM) -> Self
fn from(value: SpectrumSequenceListPSM) -> Self
Converts to this type from the input type.
Source§impl PSMMetaData for SpectrumSequenceListPSM
impl PSMMetaData for SpectrumSequenceListPSM
Source§type SpectrumOutputMode = OutputMolecularFormula
type SpectrumOutputMode = OutputMolecularFormula
What mode is the spectrum stored in
Source§fn peptidoform_ion_set(&self) -> Option<Cow<'_, PeptidoformIonSet>>
fn peptidoform_ion_set(&self) -> Option<Cow<'_, PeptidoformIonSet>>
Get the peptidoform ion set, if present
Source§fn format(&self) -> KnownFileFormat
fn format(&self) -> KnownFileFormat
Get the format and version for this peptidoform
Source§fn numerical_id(&self) -> Option<usize>
fn numerical_id(&self) -> Option<usize>
Get the numerical PSM identifier
Source§fn search_engine(&self) -> Option<Term>
fn search_engine(&self) -> Option<Term>
Get the search engine that identified this PSM
Source§fn confidence(&self) -> Option<f64>
fn confidence(&self) -> Option<f64>
Get the normalised confidence, a score between -1 and 1 describing the confidence in the
entire PSM
Source§fn local_confidence(&self) -> Option<Cow<'_, [f64]>>
fn local_confidence(&self) -> Option<Cow<'_, [f64]>>
Get the normalised local confidence, a score between -1 and 1 for each amino acid in the
peptide
Source§fn original_confidence(&self) -> Option<(f64, Term)>
fn original_confidence(&self) -> Option<(f64, Term)>
Get the original confidence and the term identifying the type of original confidence
Source§fn original_local_confidence(&self) -> Option<&[f64]>
fn original_local_confidence(&self) -> Option<&[f64]>
Get the original local confidence, a score for each amino acid in the peptide
Source§fn retention_time(&self) -> Option<Time>
fn retention_time(&self) -> Option<Time>
The retention time, if known
Source§fn scans(&self) -> SpectrumIds
fn scans(&self) -> SpectrumIds
The scans per rawfile that are at the basis for this PSM
Source§fn experimental_mz(&self) -> Option<MassOverCharge>
fn experimental_mz(&self) -> Option<MassOverCharge>
Get the mz as experimentally determined
Source§fn experimental_mass(&self) -> Option<Mass>
fn experimental_mass(&self) -> Option<Mass>
Get the mass as experimentally determined
Source§fn protein_location(&self) -> Option<Range<u16>>
fn protein_location(&self) -> Option<Range<u16>>
Get the protein location if this was database matched data
Source§fn flanking_sequences(&self) -> (&FlankingSequence, &FlankingSequence)
fn flanking_sequences(&self) -> (&FlankingSequence, &FlankingSequence)
Get the flanking sequences on the N and C terminal side.
The reported sequences are both in N to C direction.
Source§fn database(&self) -> Option<(&str, Option<&str>)>
fn database(&self) -> Option<(&str, Option<&str>)>
The database that was used for matching optionally with the version of the database
Source§fn unique(&self) -> Option<bool>
fn unique(&self) -> Option<bool>
Get if this PSM is marked as a unique match for its database match, note that this might not
be true anymore if multiple streams of data are merged
Source§fn reliability(&self) -> Option<Reliability>
fn reliability(&self) -> Option<Reliability>
Get the reliability of this PSM
Source§fn fragmentation_model(&self) -> Option<BuiltInFragmentationModel>
fn fragmentation_model(&self) -> Option<BuiltInFragmentationModel>
Which built-in fragmentation model this fragmentation mode matches to.
The default implementation matches on the textual output of [
MetaData::mode].
If needed a custom implementation can be made.Source§fn ppm_error(&self) -> Option<Ratio>
fn ppm_error(&self) -> Option<Ratio>
Get the absolute ppm error between the experimental and theoretical precursor mass, if there
are multiple masses possible returns the smallest ppm
Source§fn mass_error(&self) -> Option<Mass>
fn mass_error(&self) -> Option<Mass>
Get the absolute mass error between the experimental and theoretical precursor mass, if
there are multiple masses possible returns the smallest difference
Source§fn annotated_spectrum(
&self,
) -> Option<Cow<'_, AnnotatedSpectrum<Self::SpectrumOutputMode>>>
fn annotated_spectrum( &self, ) -> Option<Cow<'_, AnnotatedSpectrum<Self::SpectrumOutputMode>>>
Get the annotated spectrum if this is encoded in the format
Source§fn has_annotated_spectrum(&self) -> bool
fn has_annotated_spectrum(&self) -> bool
Check if this spectrum has an annotated spectrum available.
This can be overwritten to built a faster implementation if creating the spectrum needs to
happen at runtime.
Source§impl PSMSource for SpectrumSequenceListPSM
impl PSMSource for SpectrumSequenceListPSM
Source§type Format = SpectrumSequenceListFormat
type Format = SpectrumSequenceListFormat
The format type
Source§type Complexity = SemiAmbiguous
type Complexity = SemiAmbiguous
The complexity marker type
Source§type PeptidoformAvailability = MaybePeptidoform
type PeptidoformAvailability = MaybePeptidoform
The peptidoform availability marker type
Source§type Version = SpectrumSequenceListVersion
type Version = SpectrumSequenceListVersion
The version type
Source§fn parse(
source: &Self::Source,
ontologies: &Ontologies,
keep_all_columns: bool,
proteins: &mut HashMap<String, Arc<<SpectrumSequenceListPSM as PSMMetaData>::Protein>>,
) -> Result<(Self, &'static Self::Format), BoxedError<'static, BasicKind>>
fn parse( source: &Self::Source, ontologies: &Ontologies, keep_all_columns: bool, proteins: &mut HashMap<String, Arc<<SpectrumSequenceListPSM as PSMMetaData>::Protein>>, ) -> Result<(Self, &'static Self::Format), BoxedError<'static, BasicKind>>
Parse a single PSM from its source and return the detected format Read more
Source§fn parse_file(
path: impl AsRef<Path>,
ontologies: &Ontologies,
keep_all_columns: bool,
version: Option<Self::Version>,
) -> Result<BoxedIdentifiedPeptideIter<'_, Self>, BoxedError<'static, BasicKind>>
fn parse_file( path: impl AsRef<Path>, ontologies: &Ontologies, keep_all_columns: bool, version: Option<Self::Version>, ) -> Result<BoxedIdentifiedPeptideIter<'_, Self>, BoxedError<'static, BasicKind>>
Parse a file with PSMs. Read more
Source§fn parse_reader<'a>(
reader: impl Read + 'a,
ontologies: &'a Ontologies,
keep_all_columns: bool,
version: Option<Self::Version>,
) -> Result<BoxedIdentifiedPeptideIter<'a, Self>, BoxedError<'static, BasicKind>>
fn parse_reader<'a>( reader: impl Read + 'a, ontologies: &'a Ontologies, keep_all_columns: bool, version: Option<Self::Version>, ) -> Result<BoxedIdentifiedPeptideIter<'a, Self>, BoxedError<'static, BasicKind>>
Parse a reader with PSMs. Read more
Source§fn parse_specific(
source: &Self::Source,
format: &SpectrumSequenceListFormat,
ontologies: &Ontologies,
keep_all_columns: bool,
proteins: &mut HashMap<String, Arc<<SpectrumSequenceListPSM as PSMMetaData>::Protein>>,
) -> Result<Self, BoxedError<'static, BasicKind>>
fn parse_specific( source: &Self::Source, format: &SpectrumSequenceListFormat, ontologies: &Ontologies, keep_all_columns: bool, proteins: &mut HashMap<String, Arc<<SpectrumSequenceListPSM as PSMMetaData>::Protein>>, ) -> Result<Self, BoxedError<'static, BasicKind>>
Parse a single PSM with the given format Read more
Source§fn parse_many<I: Iterator<Item = Result<Self::Source, BoxedError<'static, BasicKind>>>>(
iter: I,
ontologies: &Ontologies,
keep_all_columns: bool,
format: Option<Self::Format>,
) -> PSMIter<'_, Self, I> ⓘ
fn parse_many<I: Iterator<Item = Result<Self::Source, BoxedError<'static, BasicKind>>>>( iter: I, ontologies: &Ontologies, keep_all_columns: bool, format: Option<Self::Format>, ) -> PSMIter<'_, Self, I> ⓘ
Parse a source of multiple peptides using the given format or automatically determining the
format to use by the first item Read more
Source§fn post_process(
source: &Self::Source,
parsed: Self,
ontologies: &Ontologies,
) -> Result<Self, BoxedError<'static, BasicKind>>
fn post_process( source: &Self::Source, parsed: Self, ontologies: &Ontologies, ) -> Result<Self, BoxedError<'static, BasicKind>>
Allow post processing of the peptide Read more
Source§impl PartialEq for SpectrumSequenceListPSM
impl PartialEq for SpectrumSequenceListPSM
Source§impl Serialize for SpectrumSequenceListPSM
impl Serialize for SpectrumSequenceListPSM
impl StructuralPartialEq for SpectrumSequenceListPSM
Auto Trait Implementations§
impl !RefUnwindSafe for SpectrumSequenceListPSM
impl !UnwindSafe for SpectrumSequenceListPSM
impl Freeze for SpectrumSequenceListPSM
impl Send for SpectrumSequenceListPSM
impl Sync for SpectrumSequenceListPSM
impl Unpin for SpectrumSequenceListPSM
impl UnsafeUnpin for SpectrumSequenceListPSM
Blanket Implementations§
impl<T> AtLeast<T> for T
impl<T> AtMax<T> for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> HighestOf<T> for T
impl<T> HighestOf<T> for T
Source§type HighestLevel = T
type HighestLevel = T
This is the highest complexity level out of Self and the type parameter
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 moreimpl<T> Scalar for T
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.