Fragment Ion Types
The ion types module provides lookups for peptide fragment ion types.
- class tacular.ion_types.FragmentIonInfo(id, name, formula, monoisotopic_mass, average_mass, dict_composition, properties=<IonTypeProperty.NONE: 0>)[source]
Bases:
objectInformation about a fragment ion
- Parameters:
id (str)
name (str)
formula (str | None)
monoisotopic_mass (float | None)
average_mass (float | None)
dict_composition (Mapping[str, int] | None)
properties (IonTypeProperty)
- average_mass: float | None
- property composition: Counter[ElementInfo][source]
Get the composition as a Counter
- dict_composition: Mapping[str, int] | None
- formula: str | None
- get_mass(monoisotopic=True)[source]
Get the mass of the fragment ion
- Return type:
float- Parameters:
monoisotopic (bool)
- id: str
- property is_aa_specific_backward: bool
Check if ion is an amino acid-specific backward ion (v, w, wa, wb)
- property is_aa_specific_forward: bool
Check if ion is an amino acid-specific forward ion (d, da, db)
- property is_backward: bool
Check if ion is a backward ion type (x, y, z)
- property is_forward: bool
Check if ion is a forward ion type (a, b, c)
- property is_intact: bool
Check if ion is an intact ion (precursor, neutral)
- property is_internal: bool
Check if ion is an internal fragment
- monoisotopic_mass: float | None
- name: str
- properties: IonTypeProperty = 0
- class tacular.ion_types.FragmentIonLookup(fragment_ion_data)[source]
Bases:
object- Parameters:
fragment_ion_data (dict[IonType, FragmentIonInfo])
- get(key, default=None)[source]
Get fragment ion or None if not found
- Return type:
FragmentIonInfo|None- Parameters:
key (str | IonType)
default (FragmentIonInfo | None)
- query_id(ion_id)[source]
Query by fragment ion ID (e.g., ‘a’, ‘b’, ‘y’, ‘z’)
- Return type:
FragmentIonInfo|None- Parameters:
ion_id (str)
- query_ion_type(ion_type)[source]
Query by IonType enum
- Return type:
FragmentIonInfo|None- Parameters:
ion_type (IonType)
- query_name(name)[source]
Query by fragment ion name (e.g., ‘A-Ion’, ‘Y-Ion’)
- Return type:
FragmentIonInfo|None- Parameters:
name (str)
- class tacular.ion_types.IonType(*values)[source]
Bases:
StrEnumFragment ion types following ProForma notation
- A = 'a'
- AX = 'ax'
- AY = 'ay'
- AZ = 'az'
- B = 'b'
- BX = 'bx'
- BY = 'by'
- BZ = 'bz'
- C = 'c'
- CX = 'cx'
- CY = 'cy'
- CZ = 'cz'
- C_MINUS_H = 'c-H'
- D = 'd'
- DA = 'da'
- DA_ISOLEUCINE = 'da-isoleucine'
- DA_THREONINE = 'da-threonine'
- DB = 'db'
- DB_ISOLEUCINE = 'db-isoleucine'
- DB_THREONINE = 'db-threonine'
- D_VALINE = 'd-valine'
- IMMONIUM = 'i'
- NEUTRAL = 'n'
- PRECURSOR = 'p'
- V = 'v'
- W = 'w'
- WA = 'wa'
- WA_ISOLEUCINE = 'wa-isoleucine'
- WA_THREONINE = 'wa-threonine'
- WB = 'wb'
- WB_ISOLEUCINE = 'wb-isoleucine'
- WB_THREONINE = 'wb-threonine'
- W_VALINE = 'w-valine'
- X = 'x'
- Y = 'y'
- Z = 'z'
- Z_PLUS_H = 'z+H'
- Z_RADICAL = 'z.'