src/pybel/canonicalize.py
def edge_to_tuple(
    source: BaseEntity,
    target: BaseEntity,
    data: EdgeData,
    use_identifiers: bool = True,
) -> Tuple[str, str, str]:
    """Take two nodes and gives back a BEL string representing the statement.

    :param source: The edge's source's PyBEL node data dictionary
    :param target: The edge's target's PyBEL node data dictionary
    :param data: The edge's data dictionary
    :param use_identifiers: Enables extended `BEP-0008 <http://bep.bel.bio/published/BEP-0008.html>`_ syntax
    """
    u_str = _decanonicalize_edge_node(source, data, node_position=SOURCE_MODIFIER, use_identifiers=use_identifiers)
    v_str = _decanonicalize_edge_node(target, data, node_position=TARGET_MODIFIER, use_identifiers=use_identifiers)
    return u_str, data[RELATION], v_str
Take two nodes and gives back a BEL string representing the statement.

    :param source: The edge's source's PyBEL node data dictionary
    :param target: The edge's target's PyBEL node data dictionary
    :param data: The edge's data dictionary
    :param use_identifiers: Enables extended `BEP-0008 <http://bep.bel.bio/published/BEP-0008.html>`_ syntax
    
Take two nodes and gives back a BEL string representing the statement.
Take two nodes and gives back a BEL string representing the statement .
def edge_to_tuple(
    source: BaseEntity,
    target: BaseEntity,
    data: EdgeData,
    use_identifiers: bool = True,
) -> Tuple[str, str, str]:
    u_str = _decanonicalize_edge_node(source, data, node_position=SOURCE_MODIFIER, use_identifiers=use_identifiers)
    v_str = _decanonicalize_edge_node(target, data, node_position=TARGET_MODIFIER, use_identifiers=use_identifiers)
    return u_str, data[RELATION], v_str
def edge_to_tuple ( source : BaseEntity , target : BaseEntity , data : EdgeData , use_identifiers : bool = True , ) -> Tuple [ str , str , str ] : u_str = _decanonicalize_edge_node ( source , data , node_position = SOURCE_MODIFIER , use_identifiers = use_identifiers ) v_str = _decanonicalize_edge_node ( target , data , node_position = TARGET_MODIFIER , use_identifiers = use_identifiers ) return u_str , data [ RELATION ] , v_str
Take two nodes and gives back a BEL string representing the statement.
Take two nodes and gives back a BEL string representing the statement .
"""Take two nodes and gives back a BEL string representing the statement.

    :param source: The edge's source's PyBEL node data dictionary
    :param target: The edge's target's PyBEL node data dictionary
    :param data: The edge's data dictionary
    :param use_identifiers: Enables extended `BEP-0008 <http://bep.bel.bio/published/BEP-0008.html>`_ syntax
    """
source
BaseEntity
The edge's source's PyBEL node data dictionary
The edge ' s source ' s PyBEL node data dictionary
target
BaseEntity
The edge's target's PyBEL node data dictionary
The edge ' s target ' s PyBEL node data dictionary
data
EdgeData
The edge's data dictionary
The edge ' s data dictionary
use_identifiers
bool
Enables extended `BEP-0008 `_ syntax
Enables extended ` BEP - 0008 ` _ syntax