Enum rustyms::ComplexPeptide
source · pub enum ComplexPeptide {
Singular(LinearPeptide),
Multimeric(Vec<LinearPeptide>),
}Expand description
A single pro forma entry, can contain multiple peptides
Variants§
Singular(LinearPeptide)
A single linear peptide
Multimeric(Vec<LinearPeptide>)
A multimeric spectrum, multiple peptides coexist in a single spectrum indicated with ‘+’ in pro forma
Implementations§
source§impl ComplexPeptide
impl ComplexPeptide
sourcepub fn pro_forma(value: &str) -> Result<Self, CustomError>
pub fn pro_forma(value: &str) -> Result<Self, CustomError>
Pro Forma specification
Only supports a subset of the specification (see proforma_grammar.md for an overview of what is supported), some functions are not possible to be represented.
Errors
It fails when the string is not a valid Pro Forma string, with a minimal error message to help debug the cause.
sourcepub fn sloppy_pro_forma(
line: &str,
location: Range<usize>
) -> Result<LinearPeptide, CustomError>
pub fn sloppy_pro_forma( line: &str, location: Range<usize> ) -> Result<LinearPeptide, CustomError>
Read sloppy pro forma like sequences. Defined by the use of square or round braces to indicate modifications and missing any particular method of defining the N or C terminal modifications. Additionally any underscores will be ignored both on the ends and inside the sequence.
All modifications follow the same definitions as the strict pro forma syntax.
Errors
If it does not fit the above description.
sourcepub fn assume_linear(self) -> LinearPeptide
pub fn assume_linear(self) -> LinearPeptide
sourcepub fn peptides(&self) -> &[LinearPeptide]
pub fn peptides(&self) -> &[LinearPeptide]
Get all peptides making up this ComplexPeptide, regardless of its type
Trait Implementations§
source§impl Clone for ComplexPeptide
impl Clone for ComplexPeptide
source§fn clone(&self) -> ComplexPeptide
fn clone(&self) -> ComplexPeptide
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ComplexPeptide
impl Debug for ComplexPeptide
source§impl Display for ComplexPeptide
impl Display for ComplexPeptide
source§impl PartialEq for ComplexPeptide
impl PartialEq for ComplexPeptide
source§fn eq(&self, other: &ComplexPeptide) -> bool
fn eq(&self, other: &ComplexPeptide) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for ComplexPeptide
Auto Trait Implementations§
impl RefUnwindSafe for ComplexPeptide
impl Send for ComplexPeptide
impl Sync for ComplexPeptide
impl Unpin for ComplexPeptide
impl UnwindSafe for ComplexPeptide
Blanket Implementations§
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.