Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New modification statements #1161

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion indra/resources/statements_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
"properties": {
"type": {
"type": "string",
"pattern": "^((Phosphorylation)|(Dephosphorylation)|(Ubiquitination)|(Deubiquitination)|(Sumoylation)|(Desumoylation)|(Hydroxylation)|(Dehydroxylation)|(Acetylation)|(Deacetylation)|(Glycosylation)|(Deglycosylation)|(Farnesylation)|(Defarnesylation)|(Geranylgeranylation)|(Degeranylgeranylation)|(Palmitoylation)|(Depalmitoylation)|(Myristoylation)|(Demyristoylation)|(Ribosylation)|(Deribosylation)|(Methylation)|(Demethylation))$",
"pattern": "^((Phosphorylation)|(Dephosphorylation)|(Ubiquitination)|(Deubiquitination)|(Sumoylation)|(Desumoylation)|(Hydroxylation)|(Dehydroxylation)|(Acetylation)|(Deacetylation)|(Glycosylation)|(Deglycosylation)|(Farnesylation)|(Defarnesylation)|(Geranylgeranylation)|(Degeranylgeranylation)|(Palmitoylation)|(Depalmitoylation)|(Myristoylation)|(Demyristoylation)|(Ribosylation)|(Deribosylation)|(Methylation)|(Demethylation)|(Carboxylation)|(Decarboxylation)|(Amidation)|(Deamidation)|(Sulfation)|(Desulfation)|(Neddylation)|(Deneddylation)|(Alkylation)|(Dealkylation)|(Prenylation)|(Deprenylation'))$",
"description": "The type of the statement"
},
"enz": {
Expand Down
63 changes: 63 additions & 0 deletions indra/statements/statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@
- :py:class:`Deribosylation`
- :py:class:`Methylation`
- :py:class:`Demethylation`
- :py:class:`Carboxylation`
- :py:class:`Decarboxylation`
- :py:class:`Amidation`
- :py:class:`Deamidation`
- :py:class:`Sulfation`
- :py:class:`Desulfation`
- :py:class:`Neddylation`
- :py:class:`Deneddylation`
- :py:class:`Alkylation`
- :py:class:`Dealkylation`
- :py:class:`Prenylation`
- :py:class:`Deprenylation`

There are additional subtypes of :py:class:`SelfModification`:

Expand Down Expand Up @@ -195,6 +207,9 @@
'Complex', 'Translocation', 'RegulateAmount', 'DecreaseAmount',
'IncreaseAmount', 'Influence', 'Conversion', 'Unresolved',
'Association', 'Event', 'Migration',
'Carboxylation', 'Decarboxylation', 'Amidation', 'Deamidation', 'Sulfation',
'Desulfation', 'Neddylation', 'Deneddylation', 'Alkylation', 'Dealkylation',
'Prenylation', 'Deprenylation',

# Error classes
'InputError', 'UnresolvedUuidError', 'InvalidLocationError',
Expand Down Expand Up @@ -1005,6 +1020,54 @@ class Demethylation(RemoveModification):
"""Demethylation modification."""


class Carboxylation(AddModification):
"""Carboxylation modification."""


class Decarboxylation(RemoveModification):
"""Decarboxylation modification."""


class Amidation(AddModification):
"""Amidation modification."""


class Deamidation(RemoveModification):
"""Deamidation modification."""


class Sulfation(AddModification):
"""Sulfation modification."""


class Desulfation(RemoveModification):
"""Desulfation modification."""


class Neddylation(AddModification):
"""Neddylation modification."""


class Deneddylation(RemoveModification):
"""Deneddylation modification."""


class Alkylation(AddModification):
"""Alkylation modification."""


class Dealkylation(RemoveModification):
"""Dealkylation modification."""


class Prenylation(AddModification):
"""Prenylation modification."""


class Deprenylation(RemoveModification):
"""Deprenylation modification."""


@python_2_unicode_compatible
class RegulateActivity(Statement):
"""Regulation of activity.
Expand Down
5 changes: 4 additions & 1 deletion indra/tests/test_json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ def test_valid_modification():
'Myristoylation', 'Demyristoylation', 'Ribosylation',
'Deribosylation', 'Methylation', 'Demethylation',
'Activation', 'Inhibition', 'IncreaseAmount',
'DecreaseAmount']
'DecreaseAmount', 'Carboxylation', 'Decarboxylation',
'Amidation', 'Deamidation', 'Sulfation', 'Desulfation',
'Neddylation', 'Deneddylation', 'Alkylation',
'Dealkylation', 'Prenylation', 'Deprenylation']

for mod_type in mod_types:
s = {'enz': valid_agent1, 'sub': valid_agent2,
Expand Down