Cellprofiler: Examples for command line use of Cell Profiler in docs

Created on 28 Mar 2017  路  17Comments  路  Source: CellProfiler/CellProfiler

I've been chatting with @AnneCarpenter about the potential for incorporating cell imaging into a class that we teach ( http://github.com/greenelab/GCB535 ). Ideally this is something like a 1-week module where the days are roughly as follows:

  • Day 1: Students use the CellProfiler interface to identify optimal parameters for their experiments.
  • Day 2: Students apply the parameters from Day 1 via command line CellProfiler to analyze multiple images or image sets.
  • Day 3: Students analyze the resulting output in R to identify ??? (depends on the data used what the experimental question is).

To roughly outline way Day 2 would look like, I need to understand how CellProfiler works from the command line. I found these docs, which seemed to be the updated CellProfiler command line, but they were sparse enough that I struggled to understand how this is expected to be used:
https://github.com/CellProfiler/CellProfiler/wiki/Adapting-CellProfiler-to-a-LIMS-environment

I also poked around the issues. While #2044 seems to talk about the interface itself, it didn't mention docs. Are there docs on CellProfiler's CLI that I couldn't find?

Thanks!

Documentation

Most helpful comment

Nice to see that CP is being used for a class! I'd say the main args you'd need are:

  • -r to run the given pipeline
  • -c to run without the UI
  • -p followed by the location of the pipeline file created in Day 1
  • -i followed by the location of the input images (i.e., the Default Input Folder)
  • -o followed by the folder that the output will end up in (i.e., the Default Output Folder)

I'm assuming here that you'll be setting up the Input modules to establish the channel names in CP, rather than using an input CSV of image locations (which is what the LIMS page refers to for the most part). If so, I think the above is pretty much all you'll need.

All 17 comments

Nice to see that CP is being used for a class! I'd say the main args you'd need are:

  • -r to run the given pipeline
  • -c to run without the UI
  • -p followed by the location of the pipeline file created in Day 1
  • -i followed by the location of the input images (i.e., the Default Input Folder)
  • -o followed by the folder that the output will end up in (i.e., the Default Output Folder)

I'm assuming here that you'll be setting up the Input modules to establish the channel names in CP, rather than using an input CSV of image locations (which is what the LIMS page refers to for the most part). If so, I think the above is pretty much all you'll need.

@braymp : I hate to admit that I'm a total CellProfiler novice. I have a quick question about -r - is this a generic option that just says to run whatever I pass with -p or does it mean something beyond that?

We definitely ought to provide input files and instructions for running headless (for a simple case like the example pipeline). It's surprising to me this hasn't come up before!
I'm not sure where it should live, maybe the Dev wiki?

p.s. Day 1 hopefully will be the lesson David Julian prepared and tested.

I agree - I have looked at it briefly and it seems pretty well defined. I need some more time to dig in & an understanding of what command line on day 2 will accomplish.

@cgreene: Yes, it just directs CP to run an analysis using the supplied pipeline.

I forgot to mention that cellprofiler --help is also useful re: explanation.

See also these explanations: https://github.com/CellProfiler/CellProfiler/wiki/Adapting-CellProfiler-to-a-LIMS-environment#cmd

(Are these switches up to date @0x00b1 @mcquin ? No particular reason to think not, I just don't know that they've been changed since Lee edited them)

I believe all of those switches are still the same.

Would he also want the -b switch to keep CellProfiler from recompiling?

I guess that might be true. I didn't mention them due to https://github.com/CellProfiler/CellProfiler/issues/2046; I wasn't sure if this made it into 2.2.0.

cellprofiler --help doesn't show a -b option. @0x00b1: can you confirm?

Regarding images to use, I'd suggest using (a subset of) the image set associated with our recent eLife paper. The images are here:
http://idr-demo.openmicroscopy.org/webclient/?show=screen-1751

And you can read more about the images and goals of the experiment here (nice PDF should appear any day now):
https://elifesciences.org/content/6/e24060

You really could take a single 384-well plate of illumination-corrected images, process them in CP, create profiles using cytominer, and then cluster profiles based on similarity.

I think if @0x00b1 or @mcquin can confirm that the command line options here are up to date we are all set and this can be closed (one query was whether cellprofiler --help shows a -b option):

https://github.com/CellProfiler/CellProfiler/wiki/Adapting-CellProfiler-to-a-LIMS-environment#cmd

Can confirm that -b is definitely not up-to-date anymore. I can self-assign cleaning this page up, though I'd appreciate a second look from one of the SWEs when I do.

I'm happy to review @bethac07

馃檱 Thank you!

Better 3.5 years late than never, I guess! Feel free to edit or provide input as you need. :)

Was this page helpful?
0 / 5 - 0 ratings