Help with speckle pipeline

Hi

I am counting spots per cell in my images. I have a positive and negative image and I am trying to compare them. By eye it looks like one is quite negative and the other positive. I was hoping that you could help me tweak my pipeline a bit or provide some advice. Here is what is happening…I load the images and count spots but I seem to get more spots than I can see by eye. That is probably not surprising but I am curious if maybe I am not using the right filters or there might be some adjustments I can make? I take my images under identical setting on the confocal and when I import them to cell profiler I say not to re-adjust intensity, however I feel there is some readjustment or something that I am missing. Or maybe my spot size should be defined better?

Any advice would be great.
Thanks!
Henriette

Pipeline and example images are attached.
pipeline E.cp (14.8 KB)







Hi Henriette,

I would suggest two things:

  • In LoadImages, you should probably check the rescale intensities box. This is to ensure that images from various bit-depth formats are scaled correctly, and shouldn’t have a negative impact on your downstream analysis.
  • In IdentifyPrimaryObjects, I have a few comments:[list]*]You may want to consider changing the thresholding method to Otsu global, 3-class with the middle class set to Background. This method may perform a bit better than RobustBackground in this case.
  • The threshold correction factor is empirically set; it is simply whatever value is required to give you optimal detection results.
  • The fact that included a negative control image is helpful since you now have an idea of what the noise level looks like in the absence of spots. You can set the lower bound on the threshold to an appropriate value by seeing what pixel values are typical for these negatives, and make sure that no/minimal objects are detected in the negatives (which already seems to be mostly the case) and the spurious objects are missed in the positives.

/*:m][/list:u]Regards,
-Mark

Hi Mark,

Thanks so much for the suggestions. I am not exactly sure what the best threshold factor is but tried a range 0.7, 1, 1.3 and 1.5. See the attached figure. I think it looks pretty good now.

Anyway, while I did this some other things came up - when I set the threshold correction to 1.3 on the negative image I got an error message that said " negative row index found" and then CellProfiler asked me if I wanted to continue the analysis. Any idea what this refers to? This was for the negative image only. Also, on the negative set where I used 0.7 as a threshold I end up with a totally blue square where it is supposed to relate my spots to the cells - I see this occasionally but have not quite figured out why that is.

Also in the previous message you said: " The fact that included a negative control image is helpful since you now have an idea of what the noise level looks like in the absence of spots. You can set the lower bound on the threshold to an appropriate value by seeing what pixel values are typical for these negatives, and make sure that no/minimal objects are detected in the negatives (which already seems to be mostly the case) and the spurious objects are missed in the positives."

I have not quite figured this out - this is why I was not sure I should say rescale intensities when loading the images (although that makes no difference to my spot counting). When I open my negative image in CP I expect it to be completely black but instead I see this vague cell look - as one sees when the brightness and contrast is greatly adjusted - it is not real. Thus I don’t know how to set the lower bound on the threshold based on the pixel values. Do I go with those values that I can see on the image? It seems to be about 0.04 - is this the background you where referring to?

Thanks for all the help and suggestions!
Best,
Henriette



Hi Henriette,

This is a bug for which the fix has not yet been released. To workaround this, make sure the lower limit has been set correctly; see below.

Usually when this is seen, IdentifyPrimaryObjects has either identified nothing in the image (threshold too low) or identified the entire image as a single object (threshold too high). Most likely it is the former; look to the panel on the lower right for the number of objects identified: it will probably be either 0 or 1. For a negative image, presumably you would want zero objects to be detected.

Your comment re: “as one sees when the brightness and contrast is greatly adjusted” is exactly right: CP scales the images linearly between the dimmest and brightest settings. For your negative images, the dim staining is real - just that it’s normally not noticeable. In any case, the pixel intensities still reflect the actual values regardless of the image contrast displayed, so use those values. BTW: You can change the contrast by right-clicking on the image, and selecting “Image contrast” from the pop-up menu.

Regards,
-Mark