The resources package#
Glycosylator comes with a dedicated reference dataset for glycans structures. This dataset is loaded by default and can be accessed
using the glycosylator.resources.get_default_compounds() and glycosylator.resources.get_default_topology() functions.
In addition to the dedicated datasets, Glycosylator comes with additional auxiliary resources that are doucumented here.
The sequons module#
Pre-defined sequons for protein glycosylation sites
- glycosylator.resources.sequons.SEQUONS = {'N-linked': <glycosylator.resources.sequons.Sequon object>, 'O-linked': <glycosylator.resources.sequons.Sequon object>}#
Default sequons for protein glycosylation sites
- class glycosylator.resources.sequons.Sequon(id: str, pattern: str)[source]#
Bases:
objectA class representing a sequon pattern for glycosylation
- add_linkage(resname: str, linkage: str)[source]#
Add a linkage id that is associated with a given residue
- Parameters:
resname (str) – Residue name
linkage (str) – Linkage id
- glycosylator.resources.sequons.add_sequon(sequon_or_pattern: str | Sequon, key: str = None, overwrite: bool = False)[source]#
Add a sequon to the default sequons
- Parameters:
sequon_or_pattern (str) – Sequon object or regex pattern
key (str) – Sequon key, if a regex pattern is provided.
overwrite (bool) – If True, the new sequon is permanently included in the default sequons file.
- glycosylator.resources.sequons.available_sequons() list[source]#
Get the available sequons
- Returns:
Sequons
- Return type:
list
- glycosylator.resources.sequons.get_default_sequons() dict[source]#
Get the default sequons
- Returns:
Sequons
- Return type:
dict
- glycosylator.resources.sequons.get_sequon(key: str) Sequon[source]#
Get a sequon regex pattern
- Parameters:
key (str) – Sequon key
- Return type:
Sequon or None
- glycosylator.resources.sequons.load_sequons(filename: str) dict[source]#
Load a json file with sequons
- Parameters:
filename (str) – Path to the json file
- Returns:
Sequons
- Return type:
dict
- glycosylator.resources.sequons.restore_sequons(overwrite: bool = True)[source]#
Restore the default sequon regex patterns
- Parameters:
overwrite (bool) – If True, the backup is permanently set as the default again.
The icons module#
Icons for drawing glycan structures in 2D
- glycosylator.resources.icons.get_base_color(name: str) str[source]#
Get the only base color of a monosaccharide
- Parameters:
name (str) – The name of the monosaccharide
- Returns:
The base color of the monosaccharide
- Return type:
str
The names module#
These are name mappings for glycan residues between their PDB identifiers and IUPAC names.