-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hello, excited to try out this method. I'm currently adapting the 'minimal example' from the docs to 4 sections. My data consists of 4 tiffs with DAPI staining, and 4 csv files with x,y,z coords and gene names. I've manually added in the 'in_nucleus' column with all values set to 0 due to no prior, as per the documents instructions.
I'm having trouble visualizing the cells afterwords with the plot_result function:
from comseg.utils import plot
img_name = "32917-slide7_A1-1_DAPI"
G = Comsegdict[img_name].G
nuclei = tifffile.imread(
path_to_mask_prior + f'/{img_name}.tiff')
plot.plot_result(G=G,
nuclei = nuclei,
key_node = 'cell_index_pred',
title = None,
dico_cell_color = None,
figsize=(15, 15),
spots_size = 10,
plot_outlier = False)
This error occurs:
TypeError: Invalid shape (4288,) for image data
Traced specifically to:
ax.imshow(mip_nuclei > 0, cmap='gist_gray', alpha=0.8)
if data is None:
return func(ax, *map(sanitize_sequence, args), **kwargs)
...
im.set_data(X)
And after doing some digging through the source code, I can't seem to figure out what the image data is, or why the error is occurring to begin with. I'm assuming it's the pixel length of the tiff image. Despite the error, it still overlays cell_index_pred over the tiff I feed it. Though, I can't make sense of it- and the cells seem more chaotic than the initial DAPI stain would imply.
Probably user error on my part, but I'd appreciate any help you guys can provide. Is it a soft-requirement to run cellpose as a prior? Thanks in advance!