MontpellierRessourcesImagerie / imagej_macros_and_scripts

ImageJ macros and scripts written at the imaging facility MRI
MIT License
29 stars 15 forks source link

issue #16

Closed Elena983 closed 1 year ago

Elena983 commented 1 year ago

Hello Volker To access the segmentation quality, I need to do the NNA (nearest neighborhood analysis) for each cell type. I did clustering with R package Seurat, QPath, and Polylux plugin for ImageJ2. And now I know where my cells are. It is the first approach.

Or I can do the clustering with your tool and then access the NN distance.

I receive it when I start clustering (the "c" button on the plugin).

image

image

And after clustering with Seurat, QPath, and Polylux I received it image

These are, for example, Metastasis cells defined by their transcripts.

volker-baecker commented 1 year ago

Hi @Elena983 , did you see the documentation of the tool here: Cluster-Analysis-of-Nuclei-Tool

I'm not sure that we are talking about the same thing. The tool runs a DBScan clustering on the spatial coordinates, i.e. on points and calculates the NN-distances between for all points and for the points within and outside of the clusters. By default it does a simple detection on the input image, but you can switch that of in the options (right-click on the c-button) and start with a table of the coordinates instead. In that case the table must have the columns X, Y and Mean. The Mean column can be used to only include points where the intensity is above a threshold. One of the errors you get is probably because there are no X and Y columns and the other because with the given parameters no clusters were found.

But I suppose you are clustering different features, like gene expression, and not spatial coordinates?

Best, Volker

Elena983 commented 1 year ago

I need to do a quantitative measure (maybe nearest neighbor analysis) to assess the segmentation quality for each cell type. I cannot fix the previous error It still could not find the clusters or X and Y columns... But analysis works before line 243 and shows me some results.

But if I switch to detection I get another error image