Constants

PyBEL Constants

This module maintains the strings used throughout the PyBEL codebase to promote consistency.

Configuration Loading

By default, PyBEL loads its configuration from ~/.config/pybel/config.json. This json is stored in the object pybel.constants.config.

pybel.constants.PYBEL_MINIMUM_IMPORT_VERSION = (0, 9, 0)

The last PyBEL version where the graph data definition changed

pybel.constants.GOCC_LATEST = 'https://arty.scai.fraunhofer.de/artifactory/bel/namespace/go-cellular-component/go-cellular-component-20170511.belns'

GOCC is the only namespace that needs to be stored because translocations use some of its values by default

pybel.constants.PYBEL_CONNECTION = 'PYBEL_CONNECTION'

The environment variable that contains the default SQL connection information for the PyBEL cache

pybel.constants.PYBEL_DIR = '/home/docs/.pybel'

The default directory where PyBEL files, including logs and the default cache, are stored. Created if not exists.

pybel.constants.PYBEL_LOG_DIR = '/home/docs/.pybel/logs'

The default directory where PyBEL logs are stored

pybel.constants.PYBEL_DATA_DIR = '/home/docs/.pybel/data'

The default directory where PyBEL data are stored

pybel.constants.DEFAULT_CACHE_LOCATION = '/home/docs/.pybel/data/pybel_0.9.0_cache.db'

The default cache location is ~/.pybel/data/pybel_cache.db

pybel.constants.DEFAULT_CACHE_CONNECTION = 'sqlite:////home/docs/.pybel/data/pybel_0.9.0_cache.db'

The default cache connection string uses sqlite.

pybel.constants.config = {'PYBEL_CONNECTION': 'sqlite:////home/docs/.pybel/data/pybel_0.9.0_cache.db'}

The global configuration for PyBEL is stored here. By default, it loads from ~/.config/pybel/config.json

pybel.constants.get_cache_connection(connection=None)[source]

Returns the default cache connection string. If a connection string is explicitly given, passes it through

Parameters:connection (str) – RFC connection string
Return type:str
pybel.constants.BEL_DEFAULT_NAMESPACE = 'bel'

The default namespace given to entities in the BEL language

pybel.constants.CITATION_TYPES = {'Book', 'URL', 'Journal', 'DOI', 'Other', 'Online Resource', 'PubMed', 'PubMed Central'}

The valid citation types .. seealso:: https://wiki.openbel.org/display/BELNA/Citation

pybel.constants.NAMESPACE_DOMAIN_TYPES = {'Gene and Gene Products', 'Other', 'BiologicalProcess', 'Chemical'}

The valid namespace types .. seealso:: https://wiki.openbel.org/display/BELNA/Custom+Namespaces

pybel.constants.CITATION_TYPE = 'type'

Represents the key for the citation type in a citation dictionary

pybel.constants.CITATION_NAME = 'name'

Represents the key for the citation name in a citation dictionary

pybel.constants.CITATION_REFERENCE = 'reference'

Represents the key for the citation reference in a citation dictionary

pybel.constants.CITATION_DATE = 'date'

Represents the key for the citation date in a citation dictionary

pybel.constants.CITATION_AUTHORS = 'authors'

Represents the key for the citation authors in a citation dictionary

pybel.constants.CITATION_COMMENTS = 'comments'

Represents the key for the citation comment in a citation dictionary

pybel.constants.CITATION_TITLE = 'title'

Represents the key for the optional PyBEL citation title entry in a citation dictionary

pybel.constants.CITATION_VOLUME = 'volume'

Represents the key for the optional PyBEL citation volume entry in a citation dictionary

pybel.constants.CITATION_ISSUE = 'issue'

Represents the key for the optional PyBEL citation issue entry in a citation dictionary

pybel.constants.CITATION_PAGES = 'pages'

Represents the key for the optional PyBEL citation pages entry in a citation dictionary

pybel.constants.CITATION_FIRST_AUTHOR = 'first'

Represents the key for the optional PyBEL citation first author entry in a citation dictionary

pybel.constants.CITATION_LAST_AUTHOR = 'last'

Represents the key for the optional PyBEL citation last author entry in a citation dictionary

pybel.constants.CITATION_ENTRIES = ('type', 'name', 'reference', 'date', 'authors', 'comments')

Represents the ordering of the citation entries in a control statement (SET Citation = ...)

pybel.constants.FUNCTION = 'function'

The node data key specifying the node’s function (e.g. GENE, MIRNA, BIOPROCESS, etc.)

pybel.constants.NAMESPACE = 'namespace'

The key specifying an identifier dictionary’s namespace. Used for nodes, activities, and transformations.

pybel.constants.NAME = 'name'

The key specifying an identifier dictionary’s name. Used for nodes, activities, and transformations.

pybel.constants.IDENTIFIER = 'identifier'

The key specifying an identifier dictionary

pybel.constants.LABEL = 'label'

The key specifying an optional label for the node

pybel.constants.DESCRIPTION = 'description'

The key specifying an optional description for the node

pybel.constants.FUSION = 'fusion'

The node data key specifying a fusion dictionary, containing PARTNER_3P, PARTNER_5P,

pybel.constants.PARTNER_3P = 'partner_3p'

The key specifying the identifier dictionary of the fusion’s 3-Prime partner

pybel.constants.PARTNER_5P = 'partner_5p'

The key specifying the identifier dictionary of the fusion’s 5-Prime partner

pybel.constants.RANGE_3P = 'range_3p'

The key specifying the range dictionary of the fusion’s 3-Prime partner

pybel.constants.RANGE_5P = 'range_5p'

The key specifying the range dictionary of the fusion’s 5-Prime partner

pybel.constants.KIND = 'kind'

The key representing what kind of variation is being represented

pybel.constants.HGVS = 'hgvs'

The value for KIND for an HGVS variant

pybel.constants.PMOD = 'pmod'

The value for KIND for a protein modification

pybel.constants.GMOD = 'gmod'

The value for KIND for a gene modification

pybel.constants.FRAGMENT = 'frag'

The value for KIND for a fragment

pybel.constants.DIRTY = 'dirty'

Used as a namespace when none is given when lenient parsing mode is turned on. Not recommended!

pybel.constants.GENE = 'Gene'

Represents the BEL abundance, geneAbundance() .. seealso:: http://openbel.org/language/version_2.0/bel_specification_version_2.0.html#Xabundancea

pybel.constants.RNA = 'RNA'

Represents the BEL abundance, rnaAbundance()

pybel.constants.PROTEIN = 'Protein'

Represents the BEL abundance, proteinAbundance()

pybel.constants.MIRNA = 'miRNA'

Represents the BEL abundance, microRNAAbundance()

pybel.constants.ABUNDANCE = 'Abundance'

Represents the BEL abundance, abundance()

pybel.constants.BIOPROCESS = 'BiologicalProcess'

Represents the BEL function, biologicalProcess()

pybel.constants.PATHOLOGY = 'Pathology'

Represents the BEL function, pathology()

pybel.constants.COMPOSITE = 'Composite'

Represents the BEL abundance, compositeAbundance()

pybel.constants.COMPLEX = 'Complex'

Represents the BEL abundance, complexAbundance()

pybel.constants.REACTION = 'Reaction'

Represents the BEL transformation, reaction()

pybel.constants.RELATION = 'relation'

The key for an internal edge data dictionary for the relation string

pybel.constants.CITATION = 'citation'

The key for an internal edge data dictionary for the citation dictionary

pybel.constants.EVIDENCE = 'evidence'

The key for an internal edge data dictionary for the evidence string

pybel.constants.ANNOTATIONS = 'annotations'

The key for an internal edge data dictionary for the annotations dictionary

pybel.constants.SUBJECT = 'subject'

The key for an internal edge data dictionary for the subject modifier dictionary

pybel.constants.OBJECT = 'object'

The key for an internal edge data dictionary for the object modifier dictionary

pybel.constants.LINE = 'line'

The key or an internal edge data dictionary for the line number

pybel.constants.HASH = 'hash'

The key representing the hash of the other

pybel.constants.PYBEL_EDGE_DATA_KEYS = {'citation', 'evidence', 'object', 'annotations', 'subject', 'relation'}

The group of all BEL-provided keys for edge data dictionaries, used for hashing.

pybel.constants.PYBEL_EDGE_METADATA_KEYS = {'line', 'hash'}

The group of all PyBEL-specific keys for edge data dictionaries, not used for hashing.

pybel.constants.PYBEL_EDGE_ALL_KEYS = {'object', 'citation', 'subject', 'relation', 'evidence', 'annotations', 'line', 'hash'}

The group of all PyBEL annotated keys for edge data dictionaries

pybel.constants.HAS_REACTANT = 'hasReactant'

A BEL relationship

pybel.constants.HAS_PRODUCT = 'hasProduct'

A BEL relationship

pybel.constants.HAS_COMPONENT = 'hasComponent'

A BEL relationship

pybel.constants.HAS_VARIANT = 'hasVariant'

A BEL relationship

pybel.constants.HAS_MEMBER = 'hasMember'

A BEL relationship

pybel.constants.TRANSCRIBED_TO = 'transcribedTo'

A BEL relationship GENE to RNA is called transcription

pybel.constants.TRANSLATED_TO = 'translatedTo'

A BEL relationship RNA to PROTEIN is called translation

pybel.constants.INCREASES = 'increases'

A BEL relationship

pybel.constants.DIRECTLY_INCREASES = 'directlyIncreases'

A BEL relationship

pybel.constants.DECREASES = 'decreases'

A BEL relationship

pybel.constants.DIRECTLY_DECREASES = 'directlyDecreases'

A BEL relationship

pybel.constants.CAUSES_NO_CHANGE = 'causesNoChange'

A BEL relationship

pybel.constants.REGULATES = 'regulates'

A BEL relationship

pybel.constants.NEGATIVE_CORRELATION = 'negativeCorrelation'

A BEL relationship

pybel.constants.POSITIVE_CORRELATION = 'positiveCorrelation'

A BEL relationship

pybel.constants.ASSOCIATION = 'association'

A BEL relationship

pybel.constants.ORTHOLOGOUS = 'orthologous'

A BEL relationship

pybel.constants.ANALOGOUS_TO = 'analogousTo'

A BEL relationship

pybel.constants.IS_A = 'isA'

A BEL relationship

pybel.constants.RATE_LIMITING_STEP_OF = 'rateLimitingStepOf'

A BEL relationship

pybel.constants.SUBPROCESS_OF = 'subProcessOf'

A BEL relationship

pybel.constants.BIOMARKER_FOR = 'biomarkerFor'

A BEL relationship

pybel.constants.PROGONSTIC_BIOMARKER_FOR = 'prognosticBiomarkerFor'

A BEL relationship

pybel.constants.EQUIVALENT_TO = 'equivalentTo'

A BEL relationship, added by PyBEL

pybel.constants.PART_OF = 'partOf'

A BEL relationship, added by PyBEL

pybel.constants.CAUSAL_INCREASE_RELATIONS = {'increases', 'directlyIncreases'}

A set of all causal relationships that have an increasing effect

pybel.constants.CAUSAL_DECREASE_RELATIONS = {'directlyDecreases', 'decreases'}

A set of all causal relationships that have a decreasing effect

pybel.constants.CAUSAL_RELATIONS = {'increases', 'directlyDecreases', 'directlyIncreases', 'decreases'}

A set of all causal relationships

pybel.constants.TWO_WAY_RELATIONS = {'negativeCorrelation', 'orthologous', 'analogousTo', 'positiveCorrelation', 'equivalentTo', 'association'}

A set of all relationships that are inherently directionless, and are therefore added to the graph twice

pybel.constants.CORRELATIVE_RELATIONS = {'negativeCorrelation', 'positiveCorrelation'}

A set of all correlative relationships

pybel.constants.unqualified_edges = ['hasReactant', 'hasProduct', 'hasComponent', 'hasVariant', 'transcribedTo', 'translatedTo', 'hasMember', 'isA', 'equivalentTo', 'partOf']

A list of relationship types that don’t require annotations or evidence This must be maintained as a list, since the unqualified_edge_code is calculated based on the order and needs to be consistent

pybel.constants.unqualified_edge_code = {'hasReactant': -1, 'hasProduct': -2, 'isA': -8, 'equivalentTo': -9, 'hasComponent': -3, 'transcribedTo': -5, 'hasVariant': -4, 'partOf': -10, 'hasMember': -7, 'translatedTo': -6}

Unqualified edges are given negative keys since the standard NetworkX edge key factory starts at 0 and counts up

pybel.constants.GRAPH_METADATA = 'document_metadata'

The key for the document metadata dictionary. Can be accessed by graph.graph[GRAPH_METADATA], or by using the property built in to the pybel.BELGraph, pybel.BELGraph.document()

pybel.constants.METADATA_NAME = 'name'

The key for the document name. Can be accessed by graph.document[METADATA_NAME] or by using the property built into the pybel.BELGraph class, pybel.BELGraph.name()

pybel.constants.METADATA_VERSION = 'version'

The key for the document version. Can be accessed by graph.document[METADATA_VERSION]

pybel.constants.METADATA_DESCRIPTION = 'description'

The key for the document description. Can be accessed by graph.document[METADATA_DESCRIPTION]

pybel.constants.METADATA_AUTHORS = 'authors'

The key for the document authors. Can be accessed by graph.document[METADATA_NAME]

pybel.constants.METADATA_CONTACT = 'contact'

The key for the document contact email. Can be accessed by graph.document[METADATA_CONTACT]

pybel.constants.METADATA_LICENSES = 'licenses'

The key for the document licenses. Can be accessed by graph.document[METADATA_LICENSES]

The key for the document copyright information. Can be accessed by graph.document[METADATA_COPYRIGHT]

pybel.constants.METADATA_DISCLAIMER = 'disclaimer'

The key for the document disclaimer. Can be accessed by graph.document[METADATA_DISCLAIMER]

pybel.constants.METADATA_PROJECT = 'project'

The key for the document project. Can be accessed by graph.document[METADATA_PROJECT]

pybel.constants.DOCUMENT_KEYS = {'Disclaimer': 'disclaimer', 'Authors': 'authors', 'Project': 'project', 'Copyright': 'copyright', 'Licenses': 'licenses', 'Description': 'description', 'ContactInfo': 'contact', 'Name': 'name', 'Version': 'version'}

Provides a mapping from BEL language keywords to internal PyBEL strings

pybel.constants.METADATA_INSERT_KEYS = {'contact', 'description', 'version', 'name', 'disclaimer', 'copyright', 'licenses', 'authors'}

The keys to use when inserting a graph to the cache

pybel.constants.INVERSE_DOCUMENT_KEYS = {'contact': 'ContactInfo', 'disclaimer': 'Disclaimer', 'copyright': 'Copyright', 'name': 'Name', 'licenses': 'Licenses', 'authors': 'Authors', 'description': 'Description', 'version': 'Version', 'project': 'Project'}

Provides a mapping from internal PyBEL strings to BEL language keywords. Is the inverse of DOCUMENT_KEYS

pybel.constants.REQUIRED_METADATA = {'contact', 'authors', 'description', 'version', 'name'}

A set representing the required metadata during BEL document parsing

pybel.constants.FRAGMENT_START = 'start'

The key for the starting position of a fragment range

pybel.constants.FRAGMENT_STOP = 'stop'

The key for the stopping position of a fragment range

pybel.constants.FRAGMENT_MISSING = 'missing'

The key signifying that there is neither a start nor stop position defined

pybel.constants.FRAGMENT_DESCRIPTION = 'description'

The key for any additional descriptive data about a fragment

pybel.constants.GMOD_ORDER = ['kind', 'identifier']

The order for serializing gene modification data

pybel.constants.GSUB_REFERENCE = 'reference'

The key for the reference nucleotide in a gene substitution. Only used during parsing since this is converted to HGVS.

pybel.constants.GSUB_POSITION = 'position'

The key for the position of a gene substitution. Only used during parsing since this is converted to HGVS

pybel.constants.GSUB_VARIANT = 'variant'

The key for the effect of a gene substitution. Only used during parsing since this is converted to HGVS

pybel.constants.PMOD_CODE = 'code'

The key for the protein modification code.

pybel.constants.PMOD_POSITION = 'pos'

The key for the protein modification position.

pybel.constants.PMOD_ORDER = ['kind', 'identifier', 'code', 'pos']

The order for serializing information about a protein modification

pybel.constants.PSUB_REFERENCE = 'reference'

The key for the reference amino acid in a protein substitution. Only used during parsing since this is concerted to HGVS

pybel.constants.PSUB_POSITION = 'position'

The key for the position of a protein substitution. Only used during parsing since this is converted to HGVS.

pybel.constants.PSUB_VARIANT = 'variant'

The key for the variant of a protein substitution.Only used during parsing since this is converted to HGVS.

pybel.constants.TRUNCATION_POSITION = 'position'

The key for the position at which a protein is truncated

pybel.constants.belns_encodings = {'B': {'BiologicalProcess', 'Pathology'}, 'A': {'Complex', 'RNA', 'Abundance', 'Protein', 'Gene', 'miRNA'}, 'O': {'Pathology'}, 'C': {'Complex'}, 'M': {'miRNA'}, 'P': {'Protein'}, 'G': {'Gene'}, 'R': {'RNA', 'miRNA'}}

The mapping from BEL namespace codes to PyBEL internal abundance constants ..seealso:: https://wiki.openbel.org/display/BELNA/Assignment+of+Encoding+%28Allowed+Functions%29+for+BEL+Namespaces

BEL Language

This module contains mappings between PyBEL’s internal constants and BEL language keywords

pybel.parser.language.activity_labels = {'gef': 'gef', 'gtpBoundActivity': 'gtp', 'pep': 'pep', 'catalyticActivity': 'cat', 'kinaseActivity': 'kin', 'kin': 'kin', 'transportActivity': 'tport', 'chap': 'chap', 'gtpaseActivatingProteinActivity': 'gap', 'molecularActivity': 'molecularActivity', 'ribo': 'ribo', 'phosphataseActivity': 'phos', 'peptidaseActivity': 'pep', 'guanineNucleotideExchangeFactorActivity': 'gef', 'tscript': 'tscript', 'tport': 'tport', 'chaperoneActivity': 'chap', 'ribosylationActivity': 'ribo', 'gtp': 'gtp', 'gap': 'gap', 'transcriptionalActivity': 'tscript', 'cat': 'cat', 'phos': 'phos'}

A dictionary of activity labels used in the ma() function in activity(p(X), ma(Y))

pybel.parser.language.activity_go_mapping = {'tscript': {'identifier': 'GO:0001071', 'namespace': 'GO', 'name': 'nucleic acid binding transcription factor activity'}, 'tport': {'identifier': 'GO:0005215', 'namespace': 'GO', 'name': 'transporter activity'}, 'gef': {'identifier': 'GO:0005085', 'namespace': 'GO', 'name': 'guanyl-nucleotide exchange factor activity'}, 'pep': {'identifier': 'GO:0008233', 'namespace': 'GO', 'name': 'peptidase activity'}, 'gtp': {'identifier': 'GO:0005525', 'namespace': 'GO', 'name': 'GTP binding'}, 'kin': {'identifier': 'GO:0016301', 'namespace': 'GO', 'name': 'kinase activity'}, 'gap': {'identifier': 'GO:0032794', 'namespace': 'GO', 'name': 'GTPase activating protein binding'}, 'chap': {'identifier': 'GO:0044183', 'namespace': 'GO', 'name': 'protein binding involved in protein folding'}, 'molecularActivity': {'identifier': 'GO:0003674', 'namespace': 'GO', 'name': 'molecular_function'}, 'cat': {'identifier': 'GO:0003824', 'namespace': 'GO', 'name': 'catalytic activity'}, 'ribo': {'identifier': 'GO:0003956', 'namespace': 'GO', 'name': 'NAD(P)+-protein-arginine ADP-ribosyltransferase activity'}, 'phos': {'identifier': 'GO:0016791', 'namespace': 'GO', 'name': 'phosphatase activity'}}

Maps the default BEL molecular activities to Gene Ontology Molecular Functions

pybel.parser.language.abundance_labels = {'p': 'Protein', 'a': 'Abundance', 'biologicalProcess': 'BiologicalProcess', 'path': 'Pathology', 'r': 'RNA', 'complexAbundance': 'Complex', 'bp': 'BiologicalProcess', 'rnaAbundance': 'RNA', 'microRNAAbundance': 'miRNA', 'g': 'Gene', 'compositeAbundance': 'Composite', 'abundance': 'Abundance', 'complex': 'Complex', 'pathology': 'Pathology', 'composite': 'Composite', 'proteinAbundance': 'Protein', 'm': 'miRNA', 'geneAbundance': 'Gene'}

Provides a mapping from BEL terms to PyBEL internal constants

pybel.parser.language.abundance_sbo_mapping = {'Complex': {'identifier': 'SBO:0000297', 'namespace': 'SBO', 'name': 'protein complex'}, 'Gene': {'identifier': 'SBO:0000243', 'namespace': 'SBO', 'name': 'gene'}, 'BiologicalProcess': {'identifier': 'SBO:0000375', 'namespace': 'SBO', 'name': 'process'}, 'miRNA': {'identifier': 'SBO:0000316', 'namespace': 'SBO', 'name': 'microRNA'}, 'RNA': {'identifier': 'SBO:0000278', 'namespace': 'SBO', 'name': 'messenger RNA'}}

Maps the BEL abundance types to the Systems Biology Ontology

pybel.parser.language.aa_placeholder = "X"

In biological literature, the X is used to denote a truncation. Text mining efforts often encode X as an amino acid, for which we will throw an error using handle_aa_placeholder()

pybel.parser.language.handle_aa_placeholder(line, position, tokens)[source]

Raises an exception when encountering a placeholder amino acid, X

pybel.parser.language.pmod_namespace = {'Me2': 'Me2', 'glycosylation': 'Glyco', 'Gerger': 'Gerger', 'O-linked glycosylation': 'OGlyco', 'ADPRib': 'ADPRib', 'UbPoly': 'UbPoly', 'tri-methylation': 'Me3', 'ISGylation': 'ISG', 'Me': 'Me', 'ubiquitinylation': 'Ub', 'di-methylation': 'Me2', 'phosphorylation': 'Ph', 'hydroxylation': 'Hy', 'Glyco': 'Glyco', 'UbK48': 'UbK48', 'dimethylation': 'Me2', 'Farn': 'Farn', 'Hy': 'Hy', 'SUMOylation': 'Sumo', 'oxidation': 'Ox', 'Palm': 'Palm', 'farnesylation': 'Farn', 'ubiquitylation': 'Ub', 'Sulf': 'Sulf', 'ISG': 'ISG', 'Ac': 'Ac', 'UbK63': 'UbK63', 'Lysine 48-linked polyubiquitination': 'UbK48', 'polyubiquitination': 'UbPoly', 'Lysine 63-linked polyubiquitination': 'UbK63', 'sulphation': 'Sulf', 'trimethylation': 'Me3', 'NGlyco': 'NGlyco', 'sulfation': 'Sulf', 'Nitrosylation': 'NO', 'ubiquitination': 'Ub', 'UbMono': 'UbMono', 'Ph': 'Ph', 'myristoylation': 'Myr', 'Ox': 'Ox', 'sulphonation': 'sulfonation', 'neddylation': 'Nedd', 'Sumo': 'Sumo', 'mono-methylation': 'Me1', 'Nedd': 'Nedd', 'monoubiquitination': 'UbMono', 'adenosine diphosphoribosyl': 'ADPRib', 'methylation': 'Me', 'palmitoylation': 'Palm', 'Me3': 'Me3', 'N-linked glycosylation': 'NGlyco', 'Me1': 'Me1', 'monomethylation': 'Me1', 'sulphur addition': 'Sulf', 'sulfonation': 'sulfonation', 'OGlyco': 'OGlyco', 'ISG15-protein conjugation': 'ISG', 'acetylation': 'Ac', 'Ub': 'Ub', 'ADP-ribosylation': 'ADPRib', 'geranylgeranylation': 'Gerger', 'Myr': 'Myr', 'NO': 'NO', 'sulfur addition': 'Sulf'}

A dictionary of default protein modifications to their preferred value

pybel.parser.language.pmod_mappings = {'Me2': {'xrefs': [{'identifier': 'MOD:00429', 'namespace': 'MOD', 'name': 'dimethylated residue'}], 'synonyms': ['Me2', 'dimethylation', 'di-methylation']}, 'Ph': {'xrefs': [{'identifier': 'GO:0006468', 'namespace': 'GO', 'name': 'protein phosphorylation'}, {'identifier': 'MOD:00696', 'namespace': 'MOD'}], 'synonyms': ['Ph', 'phosphorylation']}, 'Gerger': {'xrefs': [{'identifier': 'GO:0018344', 'namespace': 'GO', 'name': 'protein geranylgeranylation'}, {'identifier': 'MOD:00441', 'namespace': 'MOD'}], 'synonyms': ['Gerger', 'geranylgeranylation']}, 'Ub': {'xrefs': [{'identifier': 'SBO:0000224', 'namespace': 'SBO', 'name': 'ubiquitination'}, {'identifier': 'GO:0016567', 'namespace': 'GO', 'name': 'protein ubiquitination'}, {'identifier': 'MOD:01148', 'namespace': 'MOD'}], 'synonyms': ['Ub', 'ubiquitination', 'ubiquitinylation', 'ubiquitylation']}, 'ADPRib': {'xrefs': [{'identifier': 'GO:0006471', 'namespace': 'GO', 'name': 'protein ADP-ribosylation'}, {'identifier': 'MOD:00752', 'namespace': 'MOD'}], 'synonyms': ['ADPRib', 'ADP-ribosylation', 'ADPRib', 'ADP-rybosylation', 'adenosine diphosphoribosyl']}, 'UbPoly': {'xrefs': [{'identifier': 'GO:0000209', 'namespace': 'GO', 'name': 'protein polyubiquitination'}], 'synonyms': ['UbPoly', 'polyubiquitination']}, 'Ox': {'xrefs': [{'identifier': 'GO:0018158', 'namespace': 'GO', 'name': 'protein oxidation'}], 'synonyms': ['Ox', 'oxidation']}, 'UbMono': {'xrefs': [{'identifier': 'GO:0006513', 'namespace': 'GO', 'name': 'protein monoubiquitination'}], 'synonyms': ['UbMono', 'monoubiquitination']}, 'Sumo': {'xrefs': [{'identifier': 'GO:0016925', 'namespace': 'GO', 'name': 'protein sumoylation'}, {'identifier': 'MOD:01149', 'namespace': 'MOD'}], 'synonyms': ['Sumo', 'SUMOylation']}, 'Palm': {'xrefs': [{'identifier': 'GO:0018345', 'namespace': 'GO', 'name': 'protein palmitoylation'}, {'identifier': 'MOD:00440', 'namespace': 'MOD'}], 'synonyms': ['Palm', 'palmitoylation']}, 'Me': {'xrefs': [{'identifier': 'GO:0006479', 'namespace': 'GO', 'name': 'protein methylation'}, {'identifier': 'MOD:00427', 'namespace': 'MOD'}], 'synonyms': ['Me', 'methylation']}, 'Nedd': {'xrefs': [{'identifier': 'GO:0045116', 'namespace': 'GO', 'name': 'protein neddylation'}, {'identifier': 'MOD:01150', 'namespace': 'MOD'}], 'synonyms': ['Nedd', 'neddylation', 'RUB1-protein conjugation']}, 'NGlyco': {'xrefs': [{'identifier': 'GO:0006487', 'namespace': 'GO', 'name': 'protein N-linked glycosylation'}, {'identifier': 'MOD:00006', 'namespace': 'MOD'}], 'synonyms': ['NGlyco', 'N-linked glycosylation']}, 'Glyco': {'xrefs': [{'identifier': 'GO:0006486', 'namespace': 'GO', 'name': 'protein glycosylation'}, {'identifier': 'MOD:00693', 'namespace': 'MOD'}], 'synonyms': ['Glyco', 'glycosylation']}, 'Me3': {'xrefs': [{'identifier': 'MOD:00430', 'namespace': 'MOD', 'name': 'trimethylated residue'}], 'synonyms': ['Me3', 'trimethylation', 'tri-methylation']}, 'Me1': {'xrefs': [{'identifier': 'MOD:00599', 'namespace': 'MOD', 'name': 'monomethylated residue'}], 'synonyms': ['Me1', 'monomethylation', 'mono-methylation']}, 'Hy': {'xrefs': [{'identifier': 'GO:0018126', 'namespace': 'GO', 'name': 'protein hydroxylation'}, {'identifier': 'MOD:00677', 'namespace': 'MOD'}], 'synonyms': ['Hyhydroxylation']}, 'sulfonation': {'xrefs': [{'identifier': 'MOP:0000559', 'namespace': 'MOP', 'name': 'sulfonation'}], 'synonyms': ['sulfonation', 'sulphonation']}, 'OGlyco': {'xrefs': [{'identifier': 'GO:0006493', 'namespace': 'GO', 'name': 'protein O-linked glycosylation'}, {'identifier': 'MOD:00396', 'namespace': 'MOD'}], 'synonyms': ['OGlyco', 'O-linked glycosylation']}, 'UbK48': {'xrefs': [{'identifier': 'GO:0070936', 'namespace': 'GO', 'name': 'protein K48-linked ubiquitination'}], 'synonyms': ['UbK48', 'Lysine 48-linked polyubiquitination']}, 'Sulf': {'xrefs': [{'identifier': 'GO:0006477', 'namespace': 'GO', 'name': 'protein sulfation'}, {'identifier': 'MOD:00695', 'namespace': 'MOD'}], 'synonyms': ['Sulf', 'sulfation', 'sulphation', 'sulfur addition', 'sulphur addition']}, 'ISG': {'xrefs': [{'identifier': 'GO:0032020', 'namespace': 'GO', 'name': 'ISG15-protein conjugation'}], 'synonyms': ['ISG', 'ISGylation', 'ISG15-protein conjugation']}, 'Ac': {'xrefs': [{'identifier': 'SBO:0000215', 'namespace': 'SBO', 'name': 'acetylation'}, {'identifier': 'GO:0006473', 'namespace': 'GO', 'name': 'protein acetylation'}, {'identifier': 'MOD:00394', 'namespace': 'MOD'}], 'synonyms': ['Ac', 'acetylation']}, 'UbK63': {'xrefs': [{'identifier': 'GO:0070534', 'namespace': 'GO', 'name': 'protein K63-linked ubiquitination'}], 'synonyms': ['UbK63', 'Lysine 63-linked polyubiquitination']}, 'NO': {'xrefs': [{'identifier': 'GO:0017014', 'namespace': 'GO', 'name': 'protein nitrosylation'}], 'synonyms': ['NO', 'Nitrosylation']}, 'Myr': {'xrefs': [{'identifier': 'GO:0018377', 'namespace': 'GO', 'name': 'protein myristoylation'}, {'identifier': 'MOD:00438', 'namespace': 'MOD'}], 'synonyms': ['Myr', 'myristoylation']}, 'Farn': {'xrefs': [{'identifier': 'GO:0018343', 'namespace': 'GO', 'name': 'protein farnesylation'}, {'identifier': 'MOD:00437', 'namespace': 'MOD'}], 'synonyms': ['Farn', 'farnesylation']}}

Use Gene Ontology children of GO_0006464: “cellular protein modification process”

pybel.parser.language.pmod_legacy_labels = {'F': 'Farn', 'O': 'Ox', 'M': 'Me', 'P': 'Ph', 'A': 'Ac', 'R': 'ADPRib', 'S': 'Sumo', 'U': 'Ub', 'G': 'Glyco', 'H': 'Hy'}

A dictionary of legacy (BEL 1.0) default namespace protein modifications to their BEL 2.0 preferred value

pybel.parser.language.gmod_namespace = {'methylation': 'Me', 'Me': 'Me', 'M': 'Me'}

A dictionary of default gene modifications. This is a PyBEL variant to the BEL specification.

pybel.parser.language.gmod_mappings = {'ADPRib': {'xrefs': [{'identifier': 'GO:0030592', 'namespace': 'GO', 'name': 'DNA ADP-ribosylation'}], 'synonyms': ['ADPRib']}, 'Me': {'xrefs': [{'identifier': 'GO:0006306', 'namespace': 'GO', 'name': 'DNA methylation'}], 'synonyms': ['Me', 'M', 'methylation']}}

Use Gene Ontology children of GO_0006304: “DNA modification”