biolink / biolink-model-toolkit

A collection of useful python functions for looking up information and working with the Biolink Model
https://biolink.github.io/biolink-model-toolkit/
BSD 3-Clause "New" or "Revised" License
20 stars 11 forks source link

Some genealogy of classes not being returned #78

Closed YaphetKG closed 2 years ago

YaphetKG commented 2 years ago

When running this code snippet


!pip install git+https://github.com/biolink/biolink-model-toolkit.git@0.8.2
version = "2.2.16"
BMT = Toolkit(
            schema=f"[https://raw.githubusercontent.com/biolink/biolink-model/{version}/biolink-model.yaml](https://raw.githubusercontent.com/biolink/biolink-model/%7Bversion%7D/biolink-model.yaml)",
        )
classes = BMT.get_all_classes()
# get_all_slots()
slots = BMT.get_all_slots()
# get_all_types()
types = BMT.get_all_types()
# get_all_elements()
elements = classes + slots  + types
basic_ancestors = {
    element: BMT.get_ancestors(
        element,
        reflexive=False,
        mixin=False,
    )
    for element in elements
}
basic_ancestors['expressed in']

Although expressed in is in the biolink heirarchy as a subclass of located in we don't get the located in the the results and calling BMT.get_descendants("located in") also doesn't report back expressed in

cbizon commented 2 years ago

@sierra-moxon

YaphetKG commented 2 years ago

Issue seems to be fixed on biolink model v2.3.0