CellProfiler / CellProfiler-plugins

Community-contributed and experimental CellProfiler modules.
http://plugins.cellprofiler.org/
56 stars 67 forks source link

Example pipeline for compensatecolors #179

Open gwaybio opened 1 year ago

gwaybio commented 1 year ago

@ErinWeisbart - thanks for pointing @jenna-tomkinson and I to the compensatecolors plugin!

We're very motivated to use this, but we're having trouble implementing (some of the documentation is sparse and difficult to follow). Would you be able to share (or point us to) an example pipeline that uses compensatecolors? We'd likely be able to contribute some of the missing pieces in the documentation. Thanks!

ErinWeisbart commented 1 year ago

Sorry, we haven't gotten to the point of documenting it yet as we haven't published anything with it yet. It is how we are currently balancing channels in pooled cell painting. This is the pipeline we use it in https://github.com/broadinstitute/pooled-cell-painting-image-processing/blob/master/pipelines/12cycles/7_BC_Preprocess.cppipe

Would love your contribution of documentation if/when you use it and I'm happy to answer any specific questions. @mccruz07 or @rsenft1 did you ever write up any protocol info for using/tuning compensatecolors?

ErinWeisbart commented 1 year ago

This is what we have that pipeline linked above tuned to do, though there are a LOT of other ways you can tune it.

Screenshot 2023-02-15 at 9 38 13 AM
gwaybio commented 1 year ago

Thanks @ErinWeisbart !

jenna-tomkinson commented 1 year ago

Hi @ErinWeisbart!

I am attempting to use this module in my own test pipeline (only LoadData and CompensateColors modules) and I am getting an error in Test Mode stating:

image

I would want to see the images to see if the color compensation is working the way I would hope based on the parameters I set.

Thank you in advance for your insight on this error!

ErinWeisbart commented 1 year ago

compensatecolors does not currently have a GUI display written into the module. If you want to see the compensated images in test mode you'll have to do so through another subsequent module or by saving out the images (or by coding that functionality in if you are really inspired ;)

jenna-tomkinson commented 1 year ago

Haha maybe in the future I can contribute! :laughing:

I am using the Crop module to view the images and I am coming across some weird results.

My goal is to perform color compensation on two channels that are likely to have a lot of signal overlap/bleedthrough. But when I use the module, I can this result where the Gasdermin channel looks like the mito channel (see below):

image image image

I also provided a screenshot of the parameters I have set. What am I setting wrong that is causing this weird result?

Thank you again for your help and guidance @ErinWeisbart!

ErinWeisbart commented 1 year ago

1) Look at the Orig images that are being fed into the module to make sure that they look as expected and there isn't a mistake in your metadata/image loading 2) They need to be in separate compensation classes

jenna-tomkinson commented 1 year ago

Got it! Looks like there is greater channel bleedthrough than I had anticipated. Good to know that for each channel it needs it's own class.

Thank you at @ErinWeisbart for all your help and support!