Save Cell Detection Parameters per core?

I’m working with a TMA where core to core different cell detection parameters are needed to get quality cell detection results. I can find the settings that were used in the Workflow tab but it doesn’t seem to record which core those settings were used on. Am I missing something, or is the only way to record what settings were used for each core to screenshot or write them down in a separate program?

I’m afraid the settings per core aren’t currently logged. Potentially you could write a script that selects certain cores (by some criterion…) prior to running cell detection, so that everything is logged in the script. But creating that script could be tricky if you need to change detection parameters more than once or twice.

This is wildly work-aroundy, and I wince imagining the distraught expression on Pete’s face but…

I almost never use Background radius and Max background intensity in my cell detection, and if those values are important to your detection choices, stop reading!

If you are still reading, you can order the cores by number, say top left is 1, top right is 10, and so on, whatever scheme makes sense to you. If the Background Radius is set to 0, the Max background intensity field does nothing. I can keep track of which core any cell analysis was run on by making it [1,2,3, etc].

Another option would be that “Set image type” comes with a name. You can re-run that line of code (extract using the Workflow tab, Create script, delete all other lines) and change the “HDAB Default” text to “Core A-1.” As long as you remember to edit and run a one line script before you start working with each core or set of cores, you can go back to the workflow to see what the last Set color deconvolution stains entry says.

:astonished: :weary: :pleading_face:

1 Like

Thanks for the ideas, it doesn’t seem like either of them are a significant time saver over saving a screenshot of the detection parameters per core.

I have another question that is somewhat related:

Is there a way to go through and gate out regions of each core that I do not want to include in the cell detection? Currently I run the cell detection and then manually go through and delete the detections that are immune infiltrates or blood vessels, but if I could draw boundaries around areas that I want to ignore then it would be much easier to iterate through detection methods and thresholding parameters.

The only advantage of either of those methods was being able to access the line of code directly, in case you wanted to copy and paste it somewhere. Say a script to run for a whole slide :slight_smile:

Not 100% clear on what you want to accomplish for the second question, but you can definitely run tissue detection with various settings that might help eliminate some unwanted areas. A better option might be the pixel classifier, with the Create objects option in the lower left set to create annotations and split them. That should give you the most control over what areas are considered tissue of interest (make sure to classify the tissue areas you do not want as “Ignore”).

You can also draw areas with the Wand tool inside of locked annotations, and when you delete the wand tool area you have the option of deleting all child cells.

Any unlocked annotation (right click, Annotations->) can be manually edited for area by using the brush tool with, on Windows, the Alt key held down.

The viability of many of these options will depend on which version of QuPath you are using.