Onward! Towards single cell analysis
I filtered out cells that are were not positively labeled in CellProfiler with the Simple Segmentation images/masks made in ilastik. Then, I filtered out cells based on size and circularity. Lastly, I cropped out objects from each image into separate images. I’ll walk you through what I did to make this happen.
Spare you the details…or not
My pipeline saves the mask and the segmented areas that are considered positively labeled. The images are cropped to exclude area that do not have positively labeled (i.e. fluorescent) cells.
Filtering steps based on size cutoff (max/min) may not work for each batch of immunocytochemicaly labeled cells, due to differences in non-specific labeling and batch processing. This will lead to false negative or positives; you may include cells that are not labeled specifically. If it is not done properly then false positives occur. So, if labeling is not consistent, from batch to batch, and it typically is not, then selecting a cut off size that will be applicable is challenging. This seems like an opportunity to create a “hyper parameter” which could be trained in a model to maximize a cutoff size which would maximize your valuation metric (e.g. accuracy or F-score).
Custom Script to Crop Object to Individual Images
To my knowledge, Cell Proiler does not have the ability to save each segmented area or object into separate images, but it may be possible soon. In the mean time you can use OpenCV in Python to cut cell(s) in segmented areas into separate files. The cropped images at the top of this post were created using the Python. I’ve posted my script below. Next up, extracting features from my cropped images using a pre-trained deep neural network.