Skip to content

add top class option for chebi graph, set molecular entity as default#9

Merged
sfluegel05 merged 2 commits intodevfrom
feature/new-top-class
May 7, 2026
Merged

add top class option for chebi graph, set molecular entity as default#9
sfluegel05 merged 2 commits intodevfrom
feature/new-top-class

Conversation

@sfluegel05
Copy link
Copy Markdown
Contributor

Currently, the ChEBI graph includes all classes in ChEBI, including roles, chemical entities (which include atoms, chemical substances, groups and molecular entities) and subatomic particles.

As discussed in the March 26 Strontex meeting, it does not make sense for our models to learn the classification of subatomic particles, atoms, chemical substances or groups. Roles are also a different classification task.

Therefore, I changed the default ChEBI graph to be the subgraph of molecular entity (excluding molecular entity itself). By setting the top class, one can get other graphs if needed.

@sfluegel05
Copy link
Copy Markdown
Contributor Author

@copilot unittests are failing, fix

Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

@copilot unittests are failing, fix

Fixed in a464207. I investigated the CI failures, reproduced them locally, and updated build_chebi_graph to handle missing top_class in partial ontologies by returning the full graph instead of raising a NetworkX error. I also ran ruff format, ruff check, targeted tests, and the full test suite (65 passed).

@sfluegel05 sfluegel05 merged commit c159a87 into dev May 7, 2026
8 checks passed
@sfluegel05 sfluegel05 deleted the feature/new-top-class branch May 7, 2026 11:33
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.

2 participants