We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 795e67a commit 2a039b6Copy full SHA for 2a039b6
chebai/preprocessing/datasets/chebi.py
@@ -783,8 +783,10 @@ def _extract_class_hierarchy(self, chebi_path: str) -> "nx.DiGraph":
783
)
784
return g
785
786
- def select_classes(self, g: nx.DiGraph, *args, **kwargs) -> List:
+ def select_classes(self, g: "nx.DiGraph", *args, **kwargs) -> List:
787
"""Only selects classes that meet the threshold AND are subclasses of the top class ID (including itself)."""
788
+ import networkx as nx
789
+
790
smiles = nx.get_node_attributes(g, "smiles")
791
nodes = list(
792
sorted(
0 commit comments