thanks, now I’ve got the workflow. The issue with the Segment Cropper is that it does crop out individual segments, but also includes segments where one nucleus has several marks in there. Lets look at
Nucleus_28 as an example, which has three marks in it:
The result of the segment cropper has four entries, one each for the “unique overlaps” (for lack of a better description) and then then one more row with all overlapping labelings. Since the later are separated by semicolons (and you don’t need these non-unique overlapping ones, right?), I would suggest to filter them our with a row filter:
(possibly on the other column as well, if these turn up there as well)
Hopefully this solves one part of the issue, now to the multiple occurrences Indeed strange that Nucleus_# and mark_# appear twice with different order. I’m not sure whether it would be possible to configure the segment cropper to do that automatically, but a quick check on the example suggests that every pair in the “Label”-column appears in the “DependentLabel”-column:
With help of another row filter, we can get rid of these entries as well (you’d need to check whether this is really always the case, not only in this small example. If its not the case, we can come up with something more sophisticated using a few rule engines, I suppose.)
There are also a few marks that lie not in a nucleus (mark_1, mark_17, and mark_18), I guess you want to filter there out as well: You can use a rule-based filter for that.
I think your workflow is great! Looks like you can now do the same procedure with the other channel and go on with manually calculating the correlation coefficient? I think I would do something like the following:
- Group-By after the loop, with group columns “Label” and “DependentLabel” and mean-aggregation method to calculate the mean of each nucleus
- Joiner to join back the mean on the “Label” and “DependentLabel” columns to the output of the loop
- same procedure with the other channel, join both results on the “Label” and “DependentLabel” columns
- use Math Formula nodes to calculate the coefficient
Or do you have something different in mind already?