src/pybel/dsl/node_classes.py
def as_bel(self, use_identifiers: bool = True) -> str:
        """Return this node as a BEL string."""
        if not self.variants:
            return super().as_bel(use_identifiers=use_identifiers)

        variants_canon = sorted([
            variant.as_bel(use_identifiers=use_identifiers)
            for variant in self.variants
        ])

        return "{}({}, {})".format(
            self._bel_function,
            self.obo if use_identifiers and self.entity.identifier and self.entity.name else self.curie,
            ', '.join(variants_canon),
        )
Return this node as a BEL string.
Return this node as a BEL string.
Return this node as a BEL string .
def as_bel(self, use_identifiers: bool = True) -> str:
        if not self.variants:
            return super().as_bel(use_identifiers=use_identifiers)
        variants_canon = sorted([
            variant.as_bel(use_identifiers=use_identifiers)
            for variant in self.variants
        ])
        return "{}({}, {})".format(
            self._bel_function,
            self.obo if use_identifiers and self.entity.identifier and self.entity.name else self.curie,
            ', '.join(variants_canon),
        )
def as_bel ( self , use_identifiers : bool = True ) -> str : if not self . variants : return super ( ) . as_bel ( use_identifiers = use_identifiers ) variants_canon = sorted ( [ variant . as_bel ( use_identifiers = use_identifiers ) for variant in self . variants ] ) return "{}({}, {})" . format ( self . _bel_function , self . obo if use_identifiers and self . entity . identifier and self . entity . name else self . curie , ', ' . join ( variants_canon ) , )
Return this node as a BEL string.
Return this node as a BEL string .
"""Return this node as a BEL string."""
self
use_identifiers
bool