-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle negative self-reg and add test
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from mira.sources.sif import template_model_from_sif_edges | ||
from mira.modeling.amr.regnet import template_model_to_regnet_json | ||
|
||
|
||
def test_sif_processing(): | ||
# Lotka volterra example | ||
edges = [ | ||
('prey', 'POSITIVE', 'predator'), | ||
('predator', 'NEGATIVE', 'prey'), | ||
('prey', 'POSITIVE', 'prey'), | ||
('predator', 'NEGATIVE', 'predator') | ||
] | ||
tm = template_model_from_sif_edges(edges) | ||
assert len(tm.templates) == 4 | ||
regnet = template_model_to_regnet_json(tm) | ||
assert len(regnet['model']['edges']) == 2 |