biocypher._create.BioCypherEdge

class biocypher._create.BioCypherEdge(source_id: str, target_id: str, relationship_label: str, relationship_id: ~typing.Optional[str] = None, properties: dict = <factory>)

Handoff class to represent biomedical relationships in Neo4j.

Has source and target ids, label, property dict; ids and label (in the Neo4j sense of a label, ie, the entity descriptor after the colon, such as “:TARGETS”) are non-optional and called source_id, target_id, and relationship_label to avoid confusion with properties called “label”, which usually denotes the human-readable form. Relationship labels are written in UPPERCASE and as verbs, as per Neo4j consensus.

Parameters:
  • source_id (string) – consensus “best” id for biological entity

  • target_id (string) – consensus “best” id for biological entity

  • relationship_label (string) – type of interaction, UPPERCASE

  • properties (dict) – collection of all other properties of the

  • edge (respective) –

__init__(source_id: str, target_id: str, relationship_label: str, relationship_id: ~typing.Optional[str] = None, properties: dict = <factory>) None

Methods

__init__(source_id, target_id, ...[, ...])

get_dict()

Return dict of ids, label, and properties.

get_id()

Returns primary node identifier or None.

get_label()

Returns relationship label.

get_properties()

Returns all other relationship properties apart from primary ids and label as key-value pairs.

get_source_id()

Returns primary node identifier of relationship source.

get_target_id()

Returns primary node identifier of relationship target.

get_type()

Returns relationship label.

Attributes

relationship_id

source_id

target_id

relationship_label

properties