INDRA CoGEx Representation (indra_cogex.representation
)
This documentation goes over helper functions and the python objects that represent Neo4j Nodes and Relations.
Representations for nodes and relations to upload to Neo4j.
- class Node(db_ns, db_id, labels, data=None)[source]
Representation for a node.
Initialize the node.
- Parameters:
db_ns (
str
) – The namespace associated with the node. Uses the INDRA standard.db_id (
str
) – The identifier within the namespace associated with the node. Uses the INDRA standard.labels (
Collection
[str
]) – A collection of labels for the node.data (
Optional
[Mapping
[str
,Any
]]) – An optional data dictionary associated with the node.
- class Relation(source_ns, source_id, target_ns, target_id, rel_type, data=None)[source]
Representation for a relation.
Initialize the relation.
- Parameters:
source_ns (
str
) – The namespace associated with the source node.source_id (
str
) – The identifier within the namespace associated with the source node.target_ns (
str
) – The namespace associated with the target node.target_id (
str
) – The identifier within the namespace associated with the target node.rel_type (
str
) – The type of relation.data (
Optional
[Mapping
[str
,Any
]]) – An optional data dictionary associated with the relation.