MSFraggerData

Struct MSFraggerData 

Source
#[non_exhaustive]
pub struct MSFraggerData {
Show 48 fields pub expectation_score: f32, pub hyper_score: f64, pub mass: Mass, pub missed_cleavages: usize, pub next_score: f32, pub peptide: Peptidoform<SimpleLinear>, pub protein: (FastaIdentifier<String>, String), pub rt: Time, pub scan: SpectrumId, pub modifications: ThinVec<(SequencePosition, SimpleModification)>, pub z: Charge, pub best_score_with_delta_mass: Option<f32>, pub calibrated_experimental_mass: Option<Mass>, pub calibrated_experimental_mz: Option<MassOverCharge>, pub condition: Option<String>, pub delta_score: Option<f32>, pub entry_name: Option<String>, pub enzymatic_termini: Option<usize>, pub extended_peptide: Option<(FlankingSequence, Option<Peptidoform<SemiAmbiguous>>, FlankingSequence)>, pub glycan_q_value: Option<f32>, pub glycan_score: Option<f32>, pub group: Option<String>, pub intensity: Option<f32>, pub ion_mobility: Option<f32>, pub ions_best_position: Option<usize>, pub is_unique: Option<bool>, pub mz: Option<MassOverCharge>, pub gene: Option<String>, pub mapped_genes: Option<ThinVec<String>>, pub mapped_proteins: Option<ThinVec<String>>, pub num_matched_ions: Option<usize>, pub num_tol_term: Option<usize>, pub open_search_localisation: Option<String>, pub open_search_modification: Option<MSFraggerOpenModification>, pub open_search_position_scores: Option<ThinVec<f64>>, pub peptide_prophet_probability: Option<f32>, pub protein_description: Option<String>, pub protein_end: Option<u16>, pub protein_id: Option<String>, pub protein_start: Option<u16>, pub purity: Option<f32>, pub rank: Option<usize>, pub score_without_delta_mass: Option<f32>, pub second_best_score_with_delta_mass: Option<f32>, pub raw_file: Option<PathBuf>, pub total_glycan_composition: Option<ThinVec<(MonoSaccharide, isize)>>, pub tot_num_ions: Option<usize>, pub version: MSFraggerVersion, /* private fields */
}
Expand description

The data for individual entries in MSFragger 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.
§expectation_score: f32§hyper_score: f64§mass: Mass§missed_cleavages: usize§next_score: f32§peptide: Peptidoform<SimpleLinear>§protein: (FastaIdentifier<String>, String)

The full header of the fasta entry, split into the id and the rest of the line (without the separating space)

§rt: Time§scan: SpectrumId§modifications: ThinVec<(SequencePosition, SimpleModification)>§z: Charge§best_score_with_delta_mass: Option<f32>§calibrated_experimental_mass: Option<Mass>§calibrated_experimental_mz: Option<MassOverCharge>§condition: Option<String>§delta_score: Option<f32>§entry_name: Option<String>§enzymatic_termini: Option<usize>§extended_peptide: Option<(FlankingSequence, Option<Peptidoform<SemiAmbiguous>>, FlankingSequence)>§glycan_q_value: Option<f32>§glycan_score: Option<f32>§group: Option<String>§intensity: Option<f32>§ion_mobility: Option<f32>§ions_best_position: Option<usize>§is_unique: Option<bool>§mz: Option<MassOverCharge>§gene: Option<String>§mapped_genes: Option<ThinVec<String>>§mapped_proteins: Option<ThinVec<String>>§num_matched_ions: Option<usize>§num_tol_term: Option<usize>§open_search_localisation: Option<String>§open_search_modification: Option<MSFraggerOpenModification>

Either glycan ‘HexNAc(4)Hex(5)Fuc(1)NeuAc(2) % 2350.8304’ or mod ‘Mod1: First isotopic peak (Theoretical: 1.0024)’ ‘Mod1: Deamidation (PeakApex: 0.9836, Theoretical: 0.9840)’

§open_search_position_scores: Option<ThinVec<f64>>§peptide_prophet_probability: Option<f32>§protein_description: Option<String>§protein_end: Option<u16>§protein_id: Option<String>§protein_start: Option<u16>§purity: Option<f32>§rank: Option<usize>§score_without_delta_mass: Option<f32>§second_best_score_with_delta_mass: Option<f32>§raw_file: Option<PathBuf>§total_glycan_composition: Option<ThinVec<(MonoSaccharide, isize)>>§tot_num_ions: Option<usize>§version: MSFraggerVersion

The version used to read in the data

Implementations§

Source§

impl MSFraggerData

Source

pub fn full_csv_line(&self) -> Option<&[(Arc<String>, String)]>

Get all original columns from the CSV file, only available if the file was opened with the option keep_all_columns turned on.

Trait Implementations§

Source§

impl Clone for MSFraggerData

Source§

fn clone(&self) -> MSFraggerData

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 MSFraggerData

Source§

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

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

impl Default for MSFraggerData

Source§

fn default() -> MSFraggerData

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

impl<'de> Deserialize<'de> for MSFraggerData

Source§

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<MSFraggerData> for IdentifiedPeptidoform<SimpleLinear, PeptidoformPresent>

Source§

fn from(value: MSFraggerData) -> Self

Converts to this type from the input type.
Source§

impl IdentifiedPeptidoformSource for MSFraggerData

Source§

type Source = CsvLine

The source data where the peptides are parsed form
Source§

type Format = MSFraggerFormat

The format type
Source§

type Complexity = SimpleLinear

The complexity marker type
Source§

type PeptidoformAvailability = PeptidoformPresent

The peptidoform availability marker type
Source§

type Version = MSFraggerVersion

The version type
Source§

fn parse( source: &Self::Source, ontologies: &Ontologies, keep_all_columns: bool, ) -> Result<(Self, &'static Self::Format), BoxedError<'static, BasicKind>>

Parse a single identified peptide 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>>

Parse a file with identified peptides. 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>>

Parse a reader with identified peptides. Read more
Source§

fn parse_specific( source: &Self::Source, format: &MSFraggerFormat, ontologies: &Ontologies, keep_all_columns: bool, ) -> Result<Self, BoxedError<'static, BasicKind>>

Parse a single identified peptide with the given format Read more
Source§

fn post_process( _source: &CsvLine, parsed: Self, _ontologies: &Ontologies, ) -> Result<Self, BoxedError<'static, BasicKind>>

Allow post processing of the peptide 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>, ) -> IdentifiedPeptidoformIter<'_, 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§

impl MetaData for MSFraggerData

Source§

fn compound_peptidoform_ion(&self) -> Option<Cow<'_, CompoundPeptidoformIon>>

Get the compound peptidoform ion, if present
Source§

fn format(&self) -> KnownFileFormat

Get the format and version for this peptidoform
Source§

fn id(&self) -> String

Get the PSM identifier
Source§

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

Get the confidence, a score between -1 and 1 describing the confidence in the entire PSM
Source§

fn local_confidence(&self) -> Option<Cow<'_, [f64]>>

Get the local confidence, a score between -1 and 1 for each amino acid in the peptide
Source§

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

Get the original confidence
Source§

fn original_local_confidence(&self) -> Option<&[f64]>

Get the original local confidence, a score for each amino acid in the peptide
Source§

fn charge(&self) -> Option<Charge>

The charge of the precursor/PSM, if known
Source§

fn mode(&self) -> Option<Cow<'_, str>>

Which fragmentation mode was used, if known
Source§

fn retention_time(&self) -> Option<Time>

The retention time, if known
Source§

fn scans(&self) -> SpectrumIds

The scans per rawfile that are at the basis for this identified peptide
Source§

fn experimental_mz(&self) -> Option<MassOverCharge>

Get the mz as experimentally determined
Source§

fn experimental_mass(&self) -> Option<Mass>

Get the mass as experimentally determined
Source§

fn protein_names(&self) -> Option<Cow<'_, [FastaIdentifier<String>]>>

Get the protein names if this was database matched data
Source§

fn protein_id(&self) -> Option<usize>

Get the protein id if this was database matched data
Source§

fn protein_location(&self) -> Option<Range<u16>>

Get the protein location if this was database matched data
Source§

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>)>

The database that was used for matching optionally with the version of the database
Source§

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>

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>

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

Get the annotated spectrum if this is encoded in the format
Source§

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 PartialEq for MSFraggerData

Source§

fn eq(&self, other: &MSFraggerData) -> 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 Serialize for MSFraggerData

Source§

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

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

impl StructuralPartialEq for MSFraggerData

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> HighestOf<T> for T

Source§

type HighestLevel = T

This is the highest complexity level out of Self and the type parameter
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> Same for T

Source§

type Output = T

Should always be Self
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, 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.
Source§

impl<T> AtLeast<T> for T

Source§

impl<T> AtMax<T> for T

Source§

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

Source§

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