Can you use CellProfiler to analyze whole tissue samples + 6-color images?

module
loadimages

#1

I have done fluorescent IHC on whole lymph node sections and stained them for 6 different markers. The images I have collected are saved in TIF format but when I open each image, it is saved in 6 channels. I’m not sure how I would upload the images to CellProfiler for analysis. Also, is this software ok to use for images that are between 90-200 MB? Lastly, would anyone be willing to give some suggestions for modules to use for analysis of the various cell types I have stained for? (CD8, CD4, CD11c, CD19, LYVE-1, and CD31)

Below I have attached a link for an image I’ve taken. The file will say that its big but it’s just because there are technically 6 different images of the same sample.

https://drive.google.com/file/d/0B3VQHz56xnNuNjdmZkdla3oxNEE/view?usp=sharing

Any help would be greatly appreciated as I have never done image analysis before. Thank You!


#2

I’m not sure how I would upload the images to CellProfiler for analysis.

CellProfiler can easily open multichannel images, simply tell CP in NamesAndTypes that it’s a “Color” image (since it’s >1 channel, then add the ColorToGrey module with the settings “Split” by “Channel” as the first module of your pipeline. That should easily split your image into as many channels as you need.

Also, is this software ok to use for images that are between 90-200 MB?

That will entirely depend on the computer you’re working with. Even if it does work, it’ll be slow, so I’d recommend cropping out a few smaller representative areas of your image to try developing your pipeline on before running it on the whole image.

I also couldn’t help but notice your image has been stitched without illumination correction - this blog post discusses illumination correction of stitched images and why it’s important. Correcting the illumination is important because otherwise a real cell that’s stuck in a dim area of the image may not get counted while background autofluorescence that’s in a bright area of the image will. The post I linked discussed a way to calculate the illumination functions with dyes, but you can also do it computationally if you have enough images. In either case, it’ll be easier to work with the un-stitched images if the microscope will give them to you- it’ll also alleviate the issue that the images may be too big to properly work in CP.

Lastly, would anyone be willing to give some suggestions for modules to use for analysis of the various cell types I have stained for? (CD8, CD4, CD11c, CD19, LYVE-1, and CD31)[…]Any help would be greatly appreciated as I have never done image analysis before. Thank You!

You may want to search around the forum for other people who’ve worked with lymph tissue or just tissue sections in general. We also have example pipelines on our website you can look through.

Good luck!


#3

Hi Beth,

Thank you for all your help. I received the message, “Error while processing ColorToGrey: index 3 is out of bounds for axis 2 with size 3”. I only added the ColorToGrey module and attempted to test whether it would work to process my images into the 6 channels. Is there another way the images should be processed before this step?


#4

Yes, for some reason whatever program you used to export the images (the microscope software, I assume) didn’t set the metadata properly- both FIJI (an ImageJ variant) and CP see the image as having 6 timepoints, not 6 channels. This is causing CP to think you have 6 images in your set rather than one, so it’s only pulling one greyscale image at a time and (understandably) failing when it tries to split the channels.

What I did to solve this was to open your image in FIJI, hit “Image->Hyperstacks->Stack To Hyperstack”, convert the image to having 6 channels rather than 6 timepoints, then resaved it. CellProfiler could then load it and use ColorToGrey to split the channels just fine. Depending on how many images you have, it may be straightforward to do this manually, or you can try to find some ways to automate the process; the script linked here could do it with only a few modifications.


#5

I tried the Hyperstacks>Stacks To Hyperstack and I got back this…

So there are only 3 channels there. Also, for the script, is that something I can just copy/paste into a document or is there more development that goes into it?


#6

CP only shows you up to the first 3 channels it has split out, but I had the same behavior on my computer and all 6 channels were still there if you try to add another module downstream (RescaleIntensity, etc). I agree it’s confusing though, and I’ll probably file a bug report to try to change the behavior.

I made that script over a year ago, so I don’t clearly remember the details, but there’s a decent chance it’d have to be modified slightly (to make sure it accepts .tif files rather than just .flex, to make sure the number of channels can be increased to 6, etc). Once that was done, you could follow the instructions in that post to install it into your ImageJ and it’d become a plugin you could use. Again though, depending on how many images you have, in the long run I can’t tell you whether it’d be faster for you to spend the time updating the script for your use vs doing the simple procedure on each image manually.