def yield_ndex(ndex_url): element = cx_pb2.Element() netAttr = element.networkAttribute netAttr.name = 'ndex_uuid' netAttr.value = parse_ndex_uuid(ndex_url) yield element element = cx_pb2.Element() netAttr = element.networkAttribute netAttr.name = 'ndex_url' netAttr.value = ndex_url yield element
def create_edgeAttribute(self, edge_id, key, val): element = cx_pb2.Element() attr = element.edgeAttribute attr.edgeId = edge_id attr.name = key attr.value = val return element
def create_edge(self, edge_id, node1, node2): element = cx_pb2.Element() edge = element.edge edge.id = edge_id edge.sourceId = node1 edge.targetId = node2 return element
def create_nodeAttribute(self, node_id, key, val): element = cx_pb2.Element() attr = element.nodeAttribute attr.nodeId = node_id attr.name = key attr.value = val return element
def create_internal_crash_error(self, message, status): element = cx_pb2.Element() error = element.error error.status = status error.code = 'clixo_service/' + str(status) error.message = message error.link = 'https://github.com/michaelkyu/ontology_cx' return element
def create_internal_crash_error(self, message, status): element = cx_pb2.Element() error = element.error error.status = status error.code = 'cy://align-hierarchies/' + str(status) error.message = message error.link = 'http://align-hierarchies' return element
def create_node(self, node_id, node_name): element = cx_pb2.Element() node = element.node node.id = node_id node.name = node_name return element