cellannotation / cas-tools

Cell Annotation Schema Tools
1 stars 0 forks source link

Support deriving CELL_IDs from CAS heirarchy #15

Closed dosumis closed 6 months ago

dosumis commented 7 months ago

For a simple hierarchy, we only need to store Cell_IDs for rank=0

dosumis commented 7 months ago

This functionality is needed in order to demo editing hierarchy (in TDT) --> showing results in AnnData.

Ultimately we may be able to do this with RDF autogenerate by LinkML (see for example). A quick fix might be to generate a networkX object from annotation objects (accession -> has_parent accession) and query that.

dosumis commented 7 months ago

networkx based solution here: https://github.com/dosumis/nhp_basal_ganglia_taxonomy/blob/main/derive_cell_ids_from_hierarchy.ipynb

hkir-dev commented 7 months ago

Now flatten is deriving cell-ids from hierarchy: https://github.com/cellannotation/cas-tools/commit/ebc933940d22fd403cc5bb6044646b70858d8ff7

dosumis commented 6 months ago

We need merge to do this (too). Demo: