Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ancestors in hierarchy from annotator? #18

Open
maksle opened this issue Feb 17, 2022 · 1 comment
Open

Missing ancestors in hierarchy from annotator? #18

maksle opened this issue Feb 17, 2022 · 1 comment

Comments

@maksle
Copy link

maksle commented Feb 17, 2022

If we look at https://data.bioontology.org/ontologies/MEDDRA/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FMEDDRA%2F10042945/paths_to_root to see the paths_to_root from MEDDRA/10042945, we see that there are 3 paths to root, each with 3 ancestors.

When annotating the text "Systemic lupus erythematosus" with expand_class_hierarchy=true and focusing on MEDDRA (https://data.bioontology.org/annotator?text=Systemic%20lupus%20erythematosus&class_hierarchy_max_level=25&expand_class_hierarchy=true&ontologies=MEDDRA) the first item in the result is MEDDRA/10042945 mentioned above. It contains hierarchy items with distances [1, 1, 1, 2, 3], but I expected it to have more items with distances [1, 2, 3, 1, 2, 3, 1, 2, 3] to reflect all the ancestors seen in the first link above.

@maksle
Copy link
Author

maksle commented Feb 17, 2022

It appears the last parent in the list is expanded arbitrarily, while the others are not
https://github.com/ncbo/ncbo_annotator/blob/master/lib/ncbo_annotator.rb#L541
and the order of the list of parents is itself arbitrary as it is just a distinct clause with no sort:
https://github.com/ncbo/ncbo_annotator/blob/master/lib/ncbo_annotator.rb#L728

I just am not sure if this is done on purpose for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant