Analysing of neighbouring cells in QuPath

I am currently doing analysis of whole scanned tissue labelled with three different fluorescence markers (conjugated to alexa 488, alexa 546 and alexa 647) in addition to DAPI, where I have done cell segmentation (cell detection) and classification of the cells (object classification + creating composite classifier).
In the next step of the analysis, I want to do a “clustering analysis” of neighbouring cells, to check where my cells of interests are located compared to the other cells.

Do any of you know if this is possible in QuPath Version: 0.2.3?

I guess there is a way to create a script for this or is there a commando that I can’t find? Sadly, I am not an expert in scripting as my background is based with molecular biology/immunology/pathology.

Dear @AMHovd,

I am not sure such a functionality exists in QuPath. I know of CytoMap ( and there have been nice posts of how to move between QuPath and Cytomap:
There and back again, QuPath<==>CytoMAP cluster analysis
precisely to run clustering and dimensionality reduction.
hope this helps.


If the type of analysis you want to do involves
I have classes X Y and Z
How close are the nearest Y and Z to each X?
How close are the nearest X and Z to each Y?
You can get that information from Analyze->Spatial analysis->Detect centroid distances 2D

To do more with that information, you would either need to create summary measurements within QuPath, or export the Detection list and find average distances per cell type.

If you want to perform more of a neighborhood clustering analysis, you may want to try CytoMAP as @acrevenna suggested.