Scripting cellprofiler on windows

Just thought I would note that you can script CellProfiler on windows too in case anyone wants to do so.

Here’s how I did it:

  1. Created a *.bat file in my favorite text editor (Notepad++) titled “cellprofiler_20110610_set.bat”
  2. Typed in the following lines:

cd "c:\program files\cellprofiler" CellProfiler -c -r -i "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\CapG_RNAi_5day" -o "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\CapG_RNAi_5day\Segmentation" -p "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\just_getting_segmentation.cp" CellProfiler -c -r -i "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\Cul1_RNAi_6day" -o "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\Cul1_RNAi_6day\Segmentation" -p "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\just_getting_segmentation.cp" CellProfiler -c -r -i "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\SK_control_RNAi_6day" -o "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\SK_control_RNAi_6day\Segmentation" -p "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\just_getting_segmentation.cp" CellProfiler -c -r -i "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\SkpA_RNAi_6day" -o "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\SkpA_RNAi_6day\Segmentation" -p "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\just_getting_segmentation.cp" CellProfiler -c -r -i "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\Smc2_RNAi_5day" -o "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\Smc2_RNAi_5day\Segmentation" -p "C:\Users\Scott\Dropbox\Condensin Stuff\6-10-2011\just_getting_segmentation.cp"
3) Double-clicked the *.bat file to launch the script

Ta da! You can now process multiple image sets without having to learn python/linux stuff! :smiley:

*Potential gotcha: Don’t forget the quotations around the path names; otherwise, CP will still run but do nothing