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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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.
Base
(**kwargs)¶ Bases:
object
The most base type
-
__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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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:
pyteomics.mass.unimod.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://'
. IfNone
(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
andby_title
methods in the old class.Parameters: Returns: out
Return type:
-
by_title
(identifier, strict=True)¶ Get a modification matching identifier. Replaces both
by_name
andby_title
methods in the old class.Parameters: Returns: out
Return type:
-
-
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.