Ontology#
- class openomics.database.ontology.Ontology(path, file_resources=None, blocksize=None, **kwargs)[source][source]#
Bases:
openomics.database.base.DatabaseAttributes Summary
Methods Summary
filter_annotation(annotation)filter_network(namespace)Filter the subgraph node_list to only namespace terms.
get_dfs_paths(root_nodes[, filter_duplicates])Return all depth-first search paths from root node(s) to children node by traversing the ontology directed graph.
get_node_color([file])load_network(file_resources)- rtype
Tuple[MultiDiGraph,List[str]]
remove_predecessor_terms(annotation[, sep])Attributes Documentation
Methods Documentation
- filter_network(namespace)[source][source]#
Filter the subgraph node_list to only namespace terms. :param namespace: one of {“biological_process”, “cellular_component”, “molecular_function”}
- Return type
None
- get_dfs_paths(root_nodes, filter_duplicates=False)[source][source]#
Return all depth-first search paths from root node(s) to children node by traversing the ontology directed graph. :param root_nodes: [”GO:0008150”] if biological processes, [”GO:0003674”] if molecular_function, or [”GO:0005575”] if cellular_component :type root_nodes: list :param filter_duplicates: whether to remove duplicated paths that end up at the same leaf nodes :type filter_duplicates: bool
Returns: pd.DataFrame of all paths starting from the root nodes.