Closed Hrovatin closed 4 years ago
I cannot reproduce on the latest master. 🤷
It seems to be data instance specific. When I saved heatmap input data with header annotations and loaded it again this did not happen anymore. I can no longer switch between categorical after Merge Data (1), but before it I have only 1 categorical variable so I can not test if this happens due to the Merge Data. Example of the error:
It is very hard to debug such a complex workflow. Any chance to reproduce this on a smaller one?
I have tried with Merge Data and everything works fine. (in a simple workflow)
A simpler case:
The error is that domain["Cluster"] == domain["Cluster New"]
which shortcircuts the update in https://github.com/biolab/orange3/blob/24a49675f3cf8df90babb95397050cfe225925b1/Orange/widgets/visualize/owheatmap.py#L992-L994
Thanks @ales-erjavec for this example!
I think this is way beyond just calling update()
at the right time. Probably @janezd has to have a say in this, because it most likely goes all the way to __eq__
.
I don't have anything to say. I don't think we can change __eq__
.
__eq__
is quite imperfect, but still better than Variable.make
. We have different levels of equality, and this example would require a stricter one than most other contexts.
My dumbass fix would be if self.annotation_color_var.name != var.name
.... But I suppose this could lead to other sorts of problems.
On a related note, this is a problem:
>>> domain["Cluster"] == domain["Cluster New"]
True
>>> hash(domain["Cluster"]) == hash(domain["Cluster New"])
False
The same issue happens in other widgets, like Venn Diagram.
Here I have two tables - one of them has a column Gene and the other does not have it, so I had changed one of the columns to Gene with Edit Domain. When I try to compare them in Venn Diagram I can not select the column Gene for matching, as it thinks it is missing from one of the tables. If I change the column names in the file before loading data into the Orange the Venn Diagram matching works as expected.
Latest master: When I use heatmap colour annotations and I try to switch between categorical features the heatmap is not updated. Example: I start with categorical_A as annotation -> The heatmap displays annotation and the annotation selection menu is set to categorical_A. Then I switch to categorical_B. - > The annotation selection menu changes to categorical_B, but the heatmap still displays categorical_A. I can only set the categoricalB to be displayed in the heatmap by first setting the colour annotation (None)_ and then switching to categorical_B. The same bug is present in Split by.