Group Naming (in Group By Node) Affects Final Results

#1

Hi,

I am using Group By followed by Group Loop Start where the loop contains the nodes Ungroup and Element Selector (End Loop).

I want to group rows on a particular index, and then from the resulting group, pick out the best value.

My question is: The flow works as expected only when Group Naming (in Group By) is set to “Aggregation method (column name)” – Why?

thanks!

Scott

0 Likes

#2

Hi there @sbembenek18,

It would be really weird that column name affects for example calculations from Element Selector. When you change Group Naming do you check subsequent nodes that they are configured properly? If you can’t figure it out can you share workflow example for someone to check?

Br,
Ivan

1 Like

#3

Good to hear from you!

I can confirm this behavior. If I have “aggregation method (column name)” in Group By, it gives what I expect: The smallest value for “Score” over all the molecules in the group (defined by Index) is chosen. However, if I change to “Keep original name(s)”, the wrong molecules are chosen. Just as worse, if I then set it back to “aggregation method (column name)” I am unable to recover the original behavior (even after resetting the nodes and updating the variables in the SDF writer); I can only recover the original (correct) behvior upon close and reopening the workflow. I’e uploaded the workflow and file.

You help would be greatly appreciated!

ScottFind_Best_in_Group_Test0.knwf (21.3 KB)
chembl_25_short_test.sdf.zip (14.6 KB)

1 Like

#4

@sbembenek18,

the problem here is the Element Selector node.

If you change the column naming scheme in the groupby and after that open the Element Selector dialog and click ok everything should be fine.

There problem is that the Element Selector should actually tell you that the select column (List) Score is not existing and should be un-configured once you change the column naming scheme, however it does something wierd.

With 4.1.0 we replace the Element Selector by a different node which will not have this problem.

Sorry for your inconveniences
Mark

1 Like

#5

Hi Mark,

Actually, the Element Selector does update correctly but the wierd behavior still persists.

Scott

0 Likes

#6

@sbembenek18,

could you try the following.

  1. Run a single loop iteration of your current workflow.

Result:
Row with Score -12.1

  1. Change GroupBy to Keep original names(s) -> run single loop iteration

Result:
Row with Score -10.

  1. Open Metanode -> Open Element Selector Dialog (shows the correct column selection related to the bug) -> Click Apply -> Reset nodes (yes) -> run single loop iteration

Result:
Row with Score -12.1

If you would change after step 3 again to a different naming scheme (step 2) again the row with score -10 would be selected, although the Dialog of the Element Selector would indicate that you have the proper column selected.

0 Likes