Pyteomics documentation v3.5.1

unimod - interface to the Unimod database

Contents

unimod - interface to the Unimod database

This module provides an interface to the relational Unimod database. The main class is Unimod.

Dependencies

This module requres lxml and sqlalchemy.

class pyteomics.mass.unimod.AlternativeName(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
alt_name
id
modification_id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.AminoAcid(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, pyteomics.mass.unimod.HasFullNameMixin

Attributes:
full_name
id
num_C
num_H
num_N
num_O
num_S
one_letter
three_letter

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.Brick(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, pyteomics.mass.unimod.HasFullNameMixin

Attributes:
brick
composition
elements
full_name
id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.BrickToElement(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
brick_id
count
element
element_obj
id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.Classification(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
classification
id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.Crossreference(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
id
modification_id
source
source_id
text
url

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.CrossreferenceSource(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
id
source

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.Element(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, pyteomics.mass.unimod.HasFullNameMixin

Attributes:
average_mass
element
full_name
id
monoisotopic_mass

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.Fragment(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
composition
id
modification_id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.FragmentComposition(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
brick_string
count
fragment_id
id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.HasFullNameMixin[source]

Bases: object

A simple mixin to standardize equality operators for models with a full_name attribute.

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

class pyteomics.mass.unimod.MiscNotesModifications(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
id
modification_id
text
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.Modification(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base, pyteomics.mass.unimod.HasFullNameMixin

Attributes:
alternative_names

A descriptor that presents a read/write view of an object attribute.

approved
average_mass
bricks
code_name
ex_code_name
fragments

A descriptor that presents a read/write view of an object attribute.

full_name
id
monoisotopic_mass
notes
specificities
username_of_poster

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.ModificationToBrick(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
brick_string
count
id
modification_id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.NeutralLoss(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
brick_string
count
id
specificity_id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.Position(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
id
position

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.Specificity(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
amino_acid
classification
classification_id
group
hidden
id
modification_id
neutral_losses
position_id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.SpecificityToNeutralLoss(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Attributes:
average_mass
id
is_peptide_neutral_loss
is_required_peptide_neutral_loss
is_slave
monoisotopic_mass
specificity
specificity_id

Methods

from_tag  
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class pyteomics.mass.unimod.Unimod(path=None)[source]

Bases: object

Main class representing the relational Unimod database.

Attributes:
mods

Methods

by_name(identifier[, strict]) Get a modification matching identifier.
by_title(identifier[, strict]) Get a modification matching identifier.
get(identifier[, strict]) Get a modification matching identifier.
__init__(path=None)[source]

Initialize the object from a database file.

Parameters:
path : str or None, optional

If str, should point to a database. Use a dialect-specific prefix, like 'sqlite://'. If None (default), a relational XML file will be downloaded from default location.

by_name(identifier, strict=True)

Get a modification matching identifier. Replaces both by_name and by_title methods in the old class.

Parameters:
identifier : str
strict : bool, optional

Defaults to True.

Returns:
out : Modification
by_title(identifier, strict=True)

Get a modification matching identifier. Replaces both by_name and by_title methods in the old class.

Parameters:
identifier : str
strict : bool, optional

Defaults to True.

Returns:
out : Modification
get(identifier, strict=True)[source]

Get a modification matching identifier. Replaces both by_name and by_title methods in the old class.

Parameters:
identifier : str
strict : bool, optional

Defaults to True.

Returns:
out : Modification
pyteomics.mass.unimod.has_composition(attr_name)[source]

A decorator to simplify flagging a Model with a column to be treated as a formula for parsing. Calls _composition_listener() internally.

pyteomics.mass.unimod.load(doc_path, output_path='sqlite://')[source]

Parse the relational table-like XML file provided by http://www.unimod.org/downloads.html and convert each <tag>_row into an equivalent database entry.

By default the table will be held in memory.

pyteomics.mass.unimod.preprocess_xml(doc_path)[source]

Parse and drop namespaces from an XML document.

Parameters:
doc_path : str
Returns:
out : etree.ElementTree
pyteomics.mass.unimod.remove_namespace(doc, namespace)[source]

Remove namespace in the passed document in place.

Contents