Automating pipelines in Matlab and general beginner help

Hi,

I just joined a research group at MGH. Many of the people here use Cell Profiler but not Matlab and I have been using Matlab for many years. I am trying to help them by automating the pipelines using Matlab. So far they have given me the pipeline (.cp file I think) and I have set up the image folders, input and output etc. I have seen posts about loading pipelines with commands such as:

open('<CellProfiler path>\Cellprofiler.exe -p <Pipeline path>\pipeline_example.cp -c -r -i <images path> -o <output path>')

I get errors when try this and I am assuming it is because I did not install the compiler correctly. There are so many versions of CellProfiler 1.0 and I was wondering if anyone could tell me exactly which one to download and where to save it and how to save and run the compiler. I think I’m just missing something here! I am using Matlab 2010a on a Windows Vista 64 PC and I checked that all image processing toolboxes were installed correctly. Please let me know is there is any other info I can give to help! And thank you so so much!

Bryan

[quote=“bhassell”]
I get errors when try this and I am assuming it is because I did not install the compiler correctly. There are so many versions of CellProfiler 1.0 and I was wondering if anyone could tell me exactly which one to download and where to save it and how to save and run the compiler. [/quote]

Since you’re posting in the CP 1.0 forum, I assume you downloaded one of the prior CP 1.0 (i.e., MATLAB) versions? However, the pipeline file you mention has the extension .cp which means it is a CP 2.0 file. So unless I’m mistaken, you may be using a newer pipeline with an old version of CP, which would explain the errors.

If so, you can (and should) install and use CP 2.0. You should then be able to use CP 2.0 in MATLAB with the command line arguments you mentioned earlier (CP 1.0 does not have that capability). If not, could you post what error messages you getting, so we can diagnose the issue?

Regards,
-Mark

Hi Mark,

Thanks so much for the reply. So per your advice, I downloaded CP 2.0 and the MCR_Installer both for Vista 64. So far I can get Matlab to open CP by

but when I add the other commands such as

I get the error

??? Error using ==> open at 99 File 'C:\Program Files\CellProfiler\Cellprofiler.exe -p C:\Users\BHassell\Documents\MATLAB\Multicolor041111.cp -c -r -i C:\Users\BHassell\Documents\MATLAB\ImageFolder -o C:\Users\BHassell\Documents\MATLAB\output' not found.
To me this looks like it obviously doesn’t recognize the ‘-p -i’ etc commands or that I am not using the complier correctly? Any thoughts? Was there something I was supposed to do before trying these commands either with the compiler or setting locations of certain files? Thanks so much for the help!

Bryan

Hi Bryan,

Rather than open, you should probably use the system command in MATLAB, which can take the full argument list. Just remember to use double-quotes (" ") around file paths with spaces.

As a side note, CP 2.0 is coded in Python, not MATLAB; the MCR installer is not needed.

Regards,
-Mark

Mark,

Thanks so much. I got it to work! Really appreciate your help!

Bryan