Reasoner Converter provides conversion between TRAPI versions 0.9.2 and 1.0.0.
Jump to:
from reasoner_converter.upgrading import upgrade_Node
from reasoner_converter.downgrading import downgrade_Node
knode0 = {
"id": "MONDO:0005737",
"type": ["disease"],
}
knode1 = upgrade_Node(knode0)
knode0 == downgrade_Node(knode1)
The following are required to downgrade 1.0.0 → 0.9.2:
- QNode.category is a string or a list of length 1
- QEdge.predicate is a string or a list of length 1
/query
returns:Message
→Response
Response
has required propertymessage
- additional properties are: allowed → not allowed
.nodes
is: an array of objects with required propid
→ a map with keys equivalent toid
.edges
is: an array of objects with required propid
→ a map with keys equivalent toid
.type
→.category
.category
is: an array of strings → a string or an array of strings- additional properties are: allowed → not allowed
.type
→.predicate
.source_id
→.subject
.target_id
→.object
- additional properties are: allowed → not allowed
.nodes
is: an array of objects with required propid
→ a map with keys equivalent toid
.edges
is: an array of objects with required propid
→ a map with keys equivalent toid
.type
→.category
.category
is: a string → a string or an array of strings.curie
→.id
.type
→.predicate
.predicate
is: aBiolinkRelation
→ aBiolinkPredicate
or an array ofBiolinkPredicate
s.source_id
→.subject
.target_id
→.object
.node_bindings
is: an array of objects with required propqg_id
→ a map with keys equivalent toqg_id
and array values.edge_bindings
is: an array of objects with required propqg_id
→ a map with keys equivalent toqg_id
and array values
.kg_id
→.id
.id
can be: a string or an array of strings → a string
.kg_id
→.id
.id
can be: a string or an array of strings → a string
- string → "biolink:PascalCase"
- string → "biolink:snake_case"