Running cellprofiler 2.0 on linux cluster


After successfully setting up Cellprofiler/CPCluster, I am now trying to set up Cell Profiler 2.0 to run on our cluster. So far, so good, the software and libraries are installed and the program runs. Now, I am intending to modify the script from the previous CPCluster release to run with Cell Profiler 2.0

The problem I observe is the Batch_data.mat data structure in Cell Profiler 2.0

batch_info = loadmat("%(datadir)s/Batch_data.mat"%(locals()))
num_sets = batch_info’handles’].Current.NumberOfImageSets

Now, I need to change the variables to correctly grab the number of image sets from Batch_data.mat. What should the new variable names be to get the right number?


You can probably reverse-engineer it from our BatchProfiler code. … hProfiler/

Look at, in particular.

The basic code is like this:

import cellprofiler.pipeline as cpp
pipeline = cpp.Pipeline()
image_set_list = pipeline.prepare_run(None)

Hi, thouis

Thanks for your help. I modified to find the number of images from the pipeline, which for our system is in the same directory with our Batch_data.mat file. I name this with the variable data_dir below. I added these lines to calculate num_sets:

import glob
import cellprofiler.pipeline as cpp
pipeline = cpp.Pipeline()

The count and load methods come from the cellprofiler/pipeline module. glob was needed to match the first found pipeline name.