biothings / biothings.species

This implements species API as part of BioThings API
Apache License 2.0
0 stars 3 forks source link

add four fields related to the taxonomy tree #16

Open newgene opened 3 hours ago

newgene commented 3 hours ago

Let's include these four fields for Taxonomy ontology:

            - "parents" (list): Immediate parent node IDs in the ontology hierarchy.
            - "children" (list): Immediate child node IDs in the ontology hierarchy.
            - "ancestors" (list): All ancestor node IDs (transitive closure).
            - "descendants" (list): All descendant node IDs (transitive closure).

Currently we have a lineage field, which is basically the ancestors field, and a children field. Both fields are calculated on the fly. We can evaluate if we should precompute all four fields as we did for other ontologies (see this example parser from biothings/pending.api repo)

newgene commented 3 hours ago

17 might provide additional lineage info useful for this issue.

newgene commented 3 hours ago

If we need to switch to use an obo file, OBO Foundry seems providing an obo file for NCBITaxon:

https://obofoundry.org/ontology/ncbitaxon.html

We can check how up-to-date compared to the original NCBI FTP site.