v0.5.20
Highlights
Optional extra: LLM for Named Entity Recognition (Annotation)
Optional extra, https://llm.datasette.io/
pip install 'oaklib[llm]'
This provides a lightweight version of OntoGPT. Currently only the annotate
endpoint is implemented.
Create a file conf.yaml
categories: [PhenotypicFeature, Disease]
sources: [human-phenotype-ontology]
The conf file is optional - this affects the prompt
Note the conf file format for LLM is experimental and liable to change:
Run:
runoak -i llm:sqlite:obo:hp annotate -C conf.yaml "the patient has bowed and shortened tibia, as well as absent ears and no lungs"
The output is in the standard OAK text annotation format
TODO:
- experiment with different prompt settings
- stabilize format
- further documentation
Attaching metadata to relationships
As requested by @joeflack4
See:
Example code:
>>> from oaklib import get_adapter
>>> adapter = get_adapter("sqlite:obo:mondo")
>>> rels = list(adapter.relationships(["MONDO:0009831"]))
>>> for rel, metadatas in adapter.relationships_metadata(rels):
... for p, v in metadatas:
... print(rel, p, v)
<BLANKLINE>
...
('MONDO:0009831', 'rdfs:subClassOf', 'MONDO:0002516') oio:source NCIT:C9005
...
Or on the command line:
runoak -i sqlite:obo:mondo relationships MONDO:0009831 --include-metadata -p i
What's Changed
- Adding llm as an extra, adding llm implementation for annotation by @cmungall in #658
- Additional documentation by @cmungall in #655
- Adding ability to retrieve axiom annotations on relationships (axiom annotations) by @cmungall in #656 @joeflack4
- minor obographviz config change: new color disambiguating chebi by @cmungall in #657
Full Changelog: v0.5.19...v0.5.20