Pyteomics documentation v4.4.0

unimod - interface to the Unimod database

«  mass - molecular masses and isotope distributions   ::   Contents   ::   achrom - additive model of polypeptide chromatography  »

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

__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

__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

__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

__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

__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

__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

__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

__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

__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

__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__

Initialize self. See help(type(self)) for accurate signature.

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

Bases: sqlalchemy.ext.declarative.api.Base

__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

__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

__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

__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

__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

__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

__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.

__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

Return type:

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

Return type:

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

Return type:

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
Return type:etree.ElementTree
pyteomics.mass.unimod.remove_namespace(doc, namespace)[source]

Remove namespace in the passed document in place.

«  mass - molecular masses and isotope distributions   ::   Contents   ::   achrom - additive model of polypeptide chromatography  »