Yeast cells segmentation and tracking



Hi Team,

I am currently using CP for segmenting and tracking yeast cells. The segmentation works well for the fluorescent chanell by using the module IdentifyPrimAutomatic with the Otsu global thresholding methos and intensity as a method to distinguish clumped cells. This turned to be the best method for segmentation after optimization with all the parameters (diameter, threshold correcting factor, filter size,etc…). However, some of the cells split to 2 objects in some of the images along the movies and this interferes with the subsequent tracking algorithm. Do you have an idea how I can solve it?

Other questions are related to the tracking module:

  1. Can I run the tracking from the end of the movie to its begining, because the cells are dividing during the acquisition time?
  2. When I tried to export to excell I’ve got the following error message:

There was a problem running the image analysis. Sorry, it is unclear what the problem is. It would be wise to close the entire CellProfiler program in case something strange has happened to the settings. The output file may be unreliable as well. Matlab says the error is: Index exceeds matrix dimensions. in the ExportToExcel module, which is module #05 in the pipeline.
CPwritemeasurements in E:\Cellprofiler\CellProfiler_1.0.5122_MATLAB\CPsubfunctions\CPwritemeasurements.m (329)
ExportToExcel in E:\Cellprofiler\CellProfiler_1.0.5122_MATLAB\Modules\ExportToExcel.m (124)
AnalyzeImagesButton_Callback in E:\Cellprofiler\CellProfiler_1.0.5122_MATLAB\CellProfiler.m (3829)
gui_mainfcn in E:\Cellprofiler\CellProfiler_1.0.5122_MATLAB\CellProfiler.m (5575)
CellProfiler in E:\Cellprofiler\CellProfiler_1.0.5122_MATLAB\CellProfiler.m (53)

Do you know how to solve it?

Thanks in advance,



Hi Maya,

To answer your questions:

  • Yes, there’s no reason why TrackObjects can’t a work with a movie played backwards as well as forwards.

  • However, at this point, we don’t have a means for tracking parent/child relationships between objects (i.e., splitting/merging) although this is being investigated.

  • Also, I notice that you are using version 5122, which is an older version. Version 5811 is the current release, so you may want to upgrade and see if you have better luck. Even so, the version of TrackObjects in the latest release is still in a beta version.

  • However, we have made some improvements in TrackObjects (and the rest of CellProfiler in general), although keeping track of parents/children is still not present. If you wish, I can compile the latest developers version and send it to you.



Hi Mark,

Thanks you for your fast reply.
As you suggested, I installed the newest version of CellProfiler, but I still get the same error for the export to excell module.
I would be happy to try the compiled developer’s version.

Here is the error:
There was a problem running the analysis module ExportToExcel which is number 05. Error using ==> fprintf
Function is not defined for ‘cell’ inputs.
CPwritemeasurements in E:\Cellprofiler\CellProfiler_5811Bugfix\CPsubfunctions\CPwritemeasurements.m (261)
ExportToExcel in E:\Cellprofiler\CellProfiler_5811Bugfix\Modules\ExportToExcel.m (123)
AnalyzeImagesButton_Callback in E:\Cellprofiler\CellProfiler_5811Bugfix\CellProfiler.m (4316)
gui_mainfcn in E:\Cellprofiler\CellProfiler_5811Bugfix\CellProfiler.m (6073)
CellProfiler in E:\Cellprofiler\CellProfiler_5811Bugfix\CellProfiler.m (55)

Moreover, when I tried to use the saveImages module to save the images from the tracking module I got the following error:

The images you have loaded in the SaveImages module are outside the 0-1 range, and you may be loosing data

The images were saved without the numbers of the identified objects, but only with the colors. This makes the observation of the tracked objects , as a movie, difficult. Is there any parameter that I have to change in order to save the entire tracked image?

Last question, how can I run the tracking module on the movie played bakcward? (I load the images as single images)

Thanks in advance for your help,



Hi Maya,

To run the tracking module on the movie played backwards, you will need to renumber/rename the image files such that they are read in the opposite alphanumeric order. This is not something that CellProfiler can do automatically; you would have to do it yourself somehow before loading them in CellProfiler.

I will private message you shortly about getting the compiled developers version to you.



Hi Mark,

Thanks a lot for your help.
It seems that the new version solved many bugs:

  1. The export to excel module works well
  2. The saveImages module creates the movies of the tracked objects with numbers on it.
  3. The most important one: in The tracking objects module there is a new parameter that defines the neighborhood of the tracking. This is very useful, because in the previous version, objects that disappeared reappeared in a new x-y location with the same ID several times, and now new objects get a new ID and not the one that was already exit, but its object disappeared.
  4. It is much easy now, when the data is in the double array format rather than a cell format - easy to write functions to analyze the data.

Many Thanks,



That’s great to hear! If you come across any bugs and/or features you’d like to see, please let us know!



Hi Mark,

We’ve been using cellprofiler for yeast cells segmentation and tracking and the software is very helpful and efficient. However, there are still some problems that we couldn’t find a good solution for them and we would like to have your advice.

  1. After segmenting the cells in each frame, each object is tracked over time along the frames. However, as some objects disappear during the movie the ID assignment is giving the same number to another objects that appear later in the movie, so the same object ID is used for different objects and it is really hard to follow. Is there any way to assign only new numbers for each new object?
  2. To create the data tracks for each object, it is necessary to first order all the data in the right order of the objects, as object ID is not staying in its index along the entire movie. For example, object 3 in frame 1 will be in index #1 but after new objects are formed near it the new object (for example 55) will get now the index 2 in the next frames and object 3 will be in index 4 from now on. in this case, when trying to extract the measurements for this specific object I will need to find its exact indices during all the frames. Is there an easier way to do that?
  3. Is there any way to find the daughter/mother relations in yeast? (we are trying to write something but it is not trivial)

Thanks in advance!



Hi Maya,

To answer your questions:

  1. This should have been handled in the code. If it’s not doing so correctly, then it’s a bug. I will look into it and get back to you.

  2. The object indices in CP are arranged by the order they are identified/labeled in a given image and not by the image-to-image tracking order for each object (since the identification is done before the tracking). If I understand you correctly, you want the objects to be output by the latter ordering and not the former. If this is the case, unfortunately, we do not have a straightforward means for ordering the objects in this way.

  3. At this point there is functionality for tracking progeny. Different methods exist in the literature but they tend to be particular to the application/experiment involved, and we have found that there is no “one size fits all” solution.



After some more thought, I realized I forgot to ask: are you exmaining the data in a spreadsheet or a database?

If it is in a spreadsheet, and you using a program like Excel, you can order the rows by the ObjectID first, and then by ImageNumber second. This should give you a sorted list of measurements ordered by the ObjectID and the images it appears in.

If it is a database, it should be straightforward to query it for all measurements associated with a given ObjectID and ordered by ObjectID and ImageNumber in much the same way as above.

Hope this helps,