Skip to content

Commit

Permalink
Improve styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ddomingof committed Jul 5, 2019
1 parent 6f0350c commit dd24c1e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/pathme/kegg/convert_to_bel.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def add_simple_edge(graph, u, v, relation_type):
graph.add_increases(
u, v_modified,
citation=KEGG_CITATION, evidence='Extracted from KEGG',
subject_modifier=activity() if type(u) in ACTIVITY_ALLOWED_MODIFIERS else None,
subject_modifier=activity() if isinstance(u, ACTIVITY_ALLOWED_MODIFIERS) else None,
# Add the activity function if subject is one of the following nodes (BEL 2.0 specifications)
annotations={},
)
Expand All @@ -522,7 +522,7 @@ def add_simple_edge(graph, u, v, relation_type):
graph.add_decreases(
u, v_modified,
citation=KEGG_CITATION, evidence='Extracted from KEGG',
subject_modifier=activity() if type(u) in ACTIVITY_ALLOWED_MODIFIERS else None,
subject_modifier=activity() if isinstance(u, ACTIVITY_ALLOWED_MODIFIERS) else None,
# Add the activity function if subject is one of the following nodes (BEL 2.0 specifications)
annotations={},
)
Expand All @@ -539,7 +539,7 @@ def add_simple_edge(graph, u, v, relation_type):
graph.add_increases(
u, v_modified,
citation=KEGG_CITATION, evidence='Extracted from KEGG',
subject_modifier=activity() if type(u) in ACTIVITY_ALLOWED_MODIFIERS else None,
subject_modifier=activity() if isinstance(u, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)

Expand All @@ -552,7 +552,7 @@ def add_simple_edge(graph, u, v, relation_type):
graph.add_decreases(
u, v,
citation=KEGG_CITATION, evidence='Extracted from KEGG',
subject_modifier=activity() if type(u) in ACTIVITY_ALLOWED_MODIFIERS else None,
subject_modifier=activity() if isinstance(u, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)

Expand All @@ -561,7 +561,7 @@ def add_simple_edge(graph, u, v, relation_type):
graph.add_increases(
u, v,
citation=KEGG_CITATION, evidence='Extracted from KEGG',
object_modifier=activity() if type(v) in ACTIVITY_ALLOWED_MODIFIERS else None,
object_modifier=activity() if isinstance(v, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)

Expand All @@ -570,7 +570,7 @@ def add_simple_edge(graph, u, v, relation_type):
graph.add_increases(
u, v,
citation=KEGG_CITATION, evidence='Extracted from KEGG',
subject_modifier=activity('cat') if type(u) in ACTIVITY_ALLOWED_MODIFIERS else None,
subject_modifier=activity('cat') if isinstance(u, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)

Expand All @@ -579,7 +579,7 @@ def add_simple_edge(graph, u, v, relation_type):
graph.add_decreases(
u, v,
citation=KEGG_CITATION, evidence='Extracted from KEGG',
object_modifier=activity() if type(v) in ACTIVITY_ALLOWED_MODIFIERS else None,
object_modifier=activity() if isinstance(v, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)

Expand Down
4 changes: 2 additions & 2 deletions src/pathme/reactome/convert_to_bel.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ def add_simple_edge(graph: BELGraph, u, v, edge_types):
graph.add_increases(
u, v,
citation=REACTOME_CITATION, evidence='Extracted from Reactome',
object_modifier=activity() if type(v) in ACTIVITY_ALLOWED_MODIFIERS else None,
object_modifier=activity() if isinstance(v, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)

elif 'INHIBITION' in edge_types:
graph.add_decreases(
u, v,
citation=REACTOME_CITATION, evidence='Extracted from Reactome',
object_modifier=activity() if type(v) in ACTIVITY_ALLOWED_MODIFIERS else None,
object_modifier=activity() if isinstance(v, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)
else:
Expand Down
6 changes: 3 additions & 3 deletions src/pathme/wikipathways/convert_to_bel.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,23 +205,23 @@ def add_simple_edge(graph: BELGraph, u, v, edge_types, uri_id):
graph.add_increases(
u, v,
citation=uri_id, evidence='Extracted from WikiPathways',
object_modifier=activity() if type(v) in ACTIVITY_ALLOWED_MODIFIERS else None,
object_modifier=activity() if isinstance(v, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)

elif 'Inhibition' in edge_types:
graph.add_decreases(
u, v,
citation=uri_id, evidence='Extracted from WikiPathways',
object_modifier=activity() if type(v) in ACTIVITY_ALLOWED_MODIFIERS else None,
object_modifier=activity() if isinstance(v, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)

elif 'Catalysis' in edge_types:
graph.add_increases(
u, v,
citation=uri_id, evidence='Extracted from WikiPathways',
object_modifier=activity() if type(v) in ACTIVITY_ALLOWED_MODIFIERS else None,
object_modifier=activity() if isinstance(v, ACTIVITY_ALLOWED_MODIFIERS) else None,
annotations={},
)

Expand Down

0 comments on commit dd24c1e

Please sign in to comment.