Skip to content

Make extracting an ontology subtree more flexible#36

Draft
allenbaron wants to merge 5 commits into
mainfrom
issue7
Draft

Make extracting an ontology subtree more flexible#36
allenbaron wants to merge 5 commits into
mainfrom
issue7

Conversation

@allenbaron
Copy link
Copy Markdown
Collaborator

@allenbaron allenbaron commented Apr 10, 2026

Currently, this deprecates extract_subtree() and replaces it with extract_obo_class(), which provides a more control over class extraction.

Still needs testing.

Resolves #7

Needed for improvements to is_valid_obo()
- Fix code so it actually works
- Add 'parents' method
- Condense to single query template file
- Make input error message more informative
Now works for both extract_subtree() and extract_subclass()
@allenbaron
Copy link
Copy Markdown
Collaborator Author

Issues remaining to consider:

  • Should a max_dist parameter be added?
  • Does this work when multiple different trees are extracted (e.g. by specifying multiple IDs with method = "descendants" with non-overlapping subtrees)?
  • How are these ordered in format_subtree()? Is it deterministic?

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

Successfully merging this pull request may close these issues.

Add more control for building trees

1 participant