pub struct CompoundPeptidoformIon(/* private fields */);Expand description
A single full ProForma entry. This entry can contain multiple sets of cross-linked peptides.
A single set of cross-linked peptides is a PeptidoformIon. A ProForma entry with two chimeric
peptides will be saved as one CompoundPeptidoformIon with two PeptidoformIons that each
contain one of the Peptidoforms.
Implementations§
Source§impl CompoundPeptidoformIon
impl CompoundPeptidoformIon
Sourcepub fn new(iter: impl IntoIterator<Item = PeptidoformIon>) -> Option<Self>
pub fn new(iter: impl IntoIterator<Item = PeptidoformIon>) -> Option<Self>
Create a new CompoundPeptidoformIon from many Peptidoforms. This returns None if the
global isotope modifications of all peptidoforms are not identical.
Sourcepub fn formulas(&self) -> Multi<MolecularFormula>
pub fn formulas(&self) -> Multi<MolecularFormula>
Get all possible formulas for this compound peptidoform
Sourcepub fn singular(self) -> Option<PeptidoformIon>
pub fn singular(self) -> Option<PeptidoformIon>
Assume there is exactly one peptidoform in this compound peptidoform.
Sourcepub fn singular_ref(&self) -> Option<&PeptidoformIon>
pub fn singular_ref(&self) -> Option<&PeptidoformIon>
Assume there is exactly one peptidoform in this compound peptidoform.
Sourcepub fn singular_peptidoform(self) -> Option<Peptidoform<Linked>>
pub fn singular_peptidoform(self) -> Option<Peptidoform<Linked>>
Assume there is exactly one peptide in this compound peptidoform.
Sourcepub fn singular_peptidoform_ref(&self) -> Option<&Peptidoform<Linked>>
pub fn singular_peptidoform_ref(&self) -> Option<&Peptidoform<Linked>>
Assume there is exactly one peptide in this compound peptidoform.
Sourcepub fn peptidoform_ions(&self) -> &[PeptidoformIon]
pub fn peptidoform_ions(&self) -> &[PeptidoformIon]
Get all peptidoform ions making up this compound peptidoform.
Sourcepub fn peptidoforms(&self) -> impl Iterator<Item = &Peptidoform<Linked>>
pub fn peptidoforms(&self) -> impl Iterator<Item = &Peptidoform<Linked>>
Get all peptidoforms making up this compound peptidoform.
Sourcepub fn generate_theoretical_fragments(
&self,
max_charge: Charge,
model: &FragmentationModel,
) -> Vec<Fragment>
pub fn generate_theoretical_fragments( &self, max_charge: Charge, model: &FragmentationModel, ) -> Vec<Fragment>
Generate the theoretical fragments for this compound peptidoform.
Sourcepub fn display(
&self,
f: &mut impl Write,
specification_compliant: bool,
) -> Result
pub fn display( &self, f: &mut impl Write, specification_compliant: bool, ) -> Result
Display this compound peptidoform.
specification_compliant Displays this compound peptidoform either normalised to the
internal representation (with false) or as fully spec compliant ProForma (no glycan
structure or custom modifications) (with true).
§Errors
Only if the underlying formatter (f) errors.
Source§impl CompoundPeptidoformIon
impl CompoundPeptidoformIon
Sourcepub fn pro_forma<'a>(
value: &'a str,
custom_database: Option<&CustomDatabase>,
) -> Result<Self, BoxedError<'a, BasicKind>>
pub fn pro_forma<'a>( value: &'a str, custom_database: Option<&CustomDatabase>, ) -> Result<Self, BoxedError<'a, BasicKind>>
Parse a compound peptidoform in the ProForma specification.
§Errors
It fails when the string is not a valid ProForma string.
Trait Implementations§
Source§impl Clone for CompoundPeptidoformIon
impl Clone for CompoundPeptidoformIon
Source§fn clone(&self) -> CompoundPeptidoformIon
fn clone(&self) -> CompoundPeptidoformIon
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompoundPeptidoformIon
impl Debug for CompoundPeptidoformIon
Source§impl Default for CompoundPeptidoformIon
impl Default for CompoundPeptidoformIon
Source§fn default() -> CompoundPeptidoformIon
fn default() -> CompoundPeptidoformIon
Source§impl<'de> Deserialize<'de> for CompoundPeptidoformIon
impl<'de> Deserialize<'de> for CompoundPeptidoformIon
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>,
Source§impl Display for CompoundPeptidoformIon
impl Display for CompoundPeptidoformIon
Source§impl<Complexity> From<Peptidoform<Complexity>> for CompoundPeptidoformIon
impl<Complexity> From<Peptidoform<Complexity>> for CompoundPeptidoformIon
Source§fn from(value: Peptidoform<Complexity>) -> Self
fn from(value: Peptidoform<Complexity>) -> Self
Source§impl From<PeptidoformIon> for CompoundPeptidoformIon
impl From<PeptidoformIon> for CompoundPeptidoformIon
Source§fn from(value: PeptidoformIon) -> Self
fn from(value: PeptidoformIon) -> Self
Source§impl<Complexity> From<Vec<Peptidoform<Complexity>>> for CompoundPeptidoformIon
impl<Complexity> From<Vec<Peptidoform<Complexity>>> for CompoundPeptidoformIon
Source§fn from(value: Vec<Peptidoform<Complexity>>) -> Self
fn from(value: Vec<Peptidoform<Complexity>>) -> Self
Source§impl HasCompoundPeptidoformIon for &CompoundPeptidoformIon
impl HasCompoundPeptidoformIon for &CompoundPeptidoformIon
Source§fn compound_peptidoform_ion(&self) -> &CompoundPeptidoformIon
fn compound_peptidoform_ion(&self) -> &CompoundPeptidoformIon
Source§impl HasCompoundPeptidoformIon for CompoundPeptidoformIon
impl HasCompoundPeptidoformIon for CompoundPeptidoformIon
Source§fn compound_peptidoform_ion(&self) -> &Self
fn compound_peptidoform_ion(&self) -> &Self
Source§impl Hash for CompoundPeptidoformIon
impl Hash for CompoundPeptidoformIon
Source§impl Ord for CompoundPeptidoformIon
impl Ord for CompoundPeptidoformIon
Source§fn cmp(&self, other: &CompoundPeptidoformIon) -> Ordering
fn cmp(&self, other: &CompoundPeptidoformIon) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CompoundPeptidoformIon
impl PartialEq for CompoundPeptidoformIon
Source§impl PartialOrd for CompoundPeptidoformIon
impl PartialOrd for CompoundPeptidoformIon
Source§impl Serialize for CompoundPeptidoformIon
impl Serialize for CompoundPeptidoformIon
impl Eq for CompoundPeptidoformIon
impl StructuralPartialEq for CompoundPeptidoformIon
Auto Trait Implementations§
impl Freeze for CompoundPeptidoformIon
impl !RefUnwindSafe for CompoundPeptidoformIon
impl Send for CompoundPeptidoformIon
impl Sync for CompoundPeptidoformIon
impl Unpin for CompoundPeptidoformIon
impl !UnwindSafe for CompoundPeptidoformIon
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> HighestOf<T> for T
impl<T> HighestOf<T> for T
Source§type HighestLevel = T
type HighestLevel = T
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>
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>
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