Neutral Deltas

The neutral deltas module provides lookups for neutral losses and gains.

class tacular.neutral_deltas.NeutralDelta(*values)[source]

Bases: StrEnum

Neutral loss deltas for fragment ions

AMMONIA = 'NH3'
CARBON_DIOXIDE = 'CO2'
CARBON_MONOXIDE = 'CO'
FORMAMIDE = 'HCONH2'
FORMIC_ACID = 'HCOOH'
HYDROGEN = 'H'
MERCAPTOACETAMIDE = 'C2H5NOS'
MERCAPTOACETIC_ACID = 'C2H4O2S'
METAPHOSPHORIC_ACID = 'HPO3'
METHANESULFENIC_ACID = 'CH4OS'
PHOSPHORIC_ACID = 'H3PO4'
SULFUR_TRIOXIDE = 'SO3'
WATER = 'H2O'
class tacular.neutral_deltas.NeutralDeltaInfo(formula, name, description, amino_acids, monoisotopic_mass, average_mass, dict_composition)[source]

Bases: object

Parameters:
  • formula (str)

  • name (str)

  • description (str)

  • amino_acids (frozenset[str])

  • monoisotopic_mass (float)

  • average_mass (float)

  • dict_composition (dict[str, int])

amino_acids: frozenset[str]
average_mass: float
calculate_loss_sites(sequence)[source]

Calculate the number of possible loss sites in a sequence

Return type:

int

Parameters:

sequence (str)

property composition: Counter[ElementInfo][source]

Get the composition as a Counter

description: str
dict_composition: dict[str, int]
formula: str
get_mass(monoisotopic=True)[source]

Get the mass of the fragment ion

Return type:

float

Parameters:

monoisotopic (bool)

monoisotopic_mass: float
name: str
to_dict(float_precision=6)[source]

Convert to dictionary representation

Return type:

dict[str, object]

Parameters:

float_precision (int)

class tacular.neutral_deltas.NeutralDeltaLookup(neutral_delta_data)[source]

Bases: object

Parameters:

neutral_delta_data (dict[NeutralDelta, NeutralDeltaInfo])

query_delta(delta)[source]

Query by NeutralDelta enum

Return type:

NeutralDeltaInfo | None

Parameters:

delta (NeutralDelta)

query_formula(formula)[source]

Query by chemical formula (e.g., ‘H2O’, ‘NH3’)

Return type:

NeutralDeltaInfo | None

Parameters:

formula (str)

query_name(name)[source]

Query by neutral delta name (e.g., ‘Water’, ‘Ammonia’)

Return type:

NeutralDeltaInfo | None

Parameters:

name (str)