def psims_example(): ontology = Ontology(filename='psi-ms.obo', verbose=1) ontology.show() print("============================") term = ontology.terms["MS:1002286"] term.show() print("============================") name = 'QIT' print(f"Searching for '{name}'") if name in ontology.names: curies = ontology.names[name] for curie in curies: term = ontology.terms[curie] term.show() print("============================") name = 'bit' result_list = ontology.fuzzy_search(search_string=name) for item in result_list: print(item) print("============================") name = 'bit' result_list = ontology.fuzzy_search(search_string=name, children_of="MS:1000031") for item in result_list: print(item)
def po_example(): ontology = Ontology(filename='plant-ontology.obo', verbose=1) ontology.show() print("============================") name = 'xyl' result_list = ontology.fuzzy_search(search_string=name) for item in result_list: print(item)