Open HPiyadasa opened 9 months ago
I thought there was already the option to do this? Maybe it's not turned on by default in the notebook? Pretty sure @JLrumberger added this in.
I am not sure. The only way I got this to work was by altering the ZscoreNormalize and update_gui functions to do nothing
` class ZScoreNormalize(Normalize): def init(self, vmin=None, vcenter=None, vmax=None): super().init(vmin, vmax) # Retain superclass initialization
def inverse(self, value):
return value # Return the value as-is
def calibrate(self, values):
pass # Do nothing
def __call__(self, value: np.ndarray, clip=None):
return value # Return the value as-is
`
and
`
def update_gui(self):
"""Update and redraw any updated GUI elements"""
self.im_cs.set_data(self.selection_mask)
self.im_cs.set_extent((0, self.mcd.cluster_count, 0, 1))
if not self._heatmaps_stale:
print("skipping other repaints")
self.fig.canvas.draw()
return
# def _preplot(df):
# return df.apply(zscore).clip(upper=self.zscore_clamp_slider.value).T
def _preplot(df):
return df.T # Avoiding z-score normalization and clipping
`
We only added the option to make normalization optional for cell_som_clustering in issue #1000. But we didn't touch the GUI widget yet.
Currently in the generic cell clustering notebook, the heatmap widget shows valued that is scaled/Z scored. This is not informative when working with nimbus output that generates a probability score from 0-1 for each marker.
Describe the solution you'd like Remove any data transformation from the heatmap widget used for nimbus.
@alex-l-kong