Qupath dearray script doesn't continue to cell detection steop

Hi,
When running the TMA dearrayer via script for the whole project, it doesn’t continue on to the next step of cell detection and instead stop after the TMA is dearrayed. What is the command/ break to proceed to the next step?
Thanks!

clearAllObjects();
setColorDeconvolutionStains('{"Name" : "H-DAB default", "Stain 1" : "Hematoxylin", "Values 1" : "0.65111 0.70119 0.29049 ", "Stain 2" : "DAB", "Values 2" : "0.26917 0.56824 0.77759 ", "Background" : " 255 255 255 "}');
if (!isTMADearrayed()) {
	runPlugin('qupath.imagej.detect.dearray.TMADearrayerPluginIJ', '{"coreDiameterMM": 1.8,  "labelsHorizontal": "1-10",  "labelsVertical": "A-i",  "labelOrder": "Row first",  "densityThreshold": 5,  "boundsScale": 105}');
	return;
};

//select all annotations
selectTMACores();

//run cell detection optical density sum default
runPlugin('qupath.imagej.detect.cells.WatershedCellDetection', '{"detectionImageBrightfield": "Optical density sum",  "requestedPixelSizeMicrons": 0.17,  "backgroundRadiusMicrons": 20.0,  "medianRadiusMicrons": 0.0,  "sigmaMicrons": 1.6,  "minAreaMicrons": 10.0,  "maxAreaMicrons": 400.0,  "threshold": 0.05,  "maxBackground": 2.0,  "watershedPostProcess": true,  "excludeDAB": false,  "cellExpansionMicrons": 5.0,  "includeNuclei": true,  "smoothBoundaries": true,  "makeMeasurements": true}');

You can remove the return; bit and then it will continue.

Alternatively, just run the script twice – although for that to work you’d need to remove the clearAllObjects(); statement as well.

The reason for ‘stopping’ being the default is that the automated dearraying is generally just a first guess… i find it almost always requires a manual check (and some adjustments).

Usually, I would dearray all the cores, check them all, then backup my project with the ‘good’ dearrayed cores (so the manual step won’t need to be repeated). Then I’d proceed with the analysis.

1 Like