-
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the issue
A clear and concise description of what the bug is.
Environment
Describe your environment.
- Platform: centos7
- Python version: 3.10.14
bigtreeversion: 0.17.0
I'm seeing changes in the behavior of dataframe_to_tree_by_relation. This code was working in previous versions (ie v0.16.4 it works without error):
# rd is a pandas dataframe
>>> rd.shape
(412, 7)
>>> rd.columns
Index(['assembly', 'illumina', 'ont', 'parent', 'seqread', 'strain', 'talias'], dtype='object')
>>> root = dataframe_to_tree_by_relation(rd, parent_col="parent", child_col="strain", attribute_cols=["talias", "seqread", "assembly"])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/envs/vtools/lib/python3.10/site-packages/bigtree/tree/construct.py", line 947, in dataframe_to_tree_by_relation
f"Unable to determine root node\nPossible root nodes: {sorted(root_names)}"
TypeError: '<' not supported between instances of 'str' and 'float'
I'm not sure which column of the DataFrame this is referring to?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working