ExportToExcel won't work when using the "LoadImages" module

cellprofiler

#1

Hi,

I’m currently using Cell Profiler 1.0.6031 with Windows Vista 32-bit and I’m using the program to identify and subtract bright mitochondrial spots from cells and then am making measurements of the cells and exporting them subsequently to excel in a batch processing pipeline. The program works great and I’m happy with the images. My problem is that while for processing a single image, the pipeline works fantastically, however when all I change in the pipeline is “LoadSingleImage” to “LoadImages” and ensure that the rest of the pipeline is conserved, I get an error message as follows below. The processing works fine, it’s only the exporting the data, and this only when using the “LoadImages module”. The actual file that is exported using “LoadImages” records only intensity data from the first image and still it looks like it’s for only one cell and not all of them. The error message is:

There was a problem running the analysis module ExportToExcel which is number 17. Error using ==> fprintf

Function is not defined for ‘cell’ inputs.

Stack:
CPwritemeasurements in C:\Users\Owner\Downloads\CompiledCellProfilerVista325811Bugfix\CompiledCellProfiler\CellProfiler_mcr\CPsubfunctions\CPwritemeasurements.m (261)
ExportToExcel in C:\Users\Owner\Downloads\CompiledCellProfilerVista325811Bugfix\CompiledCellProfiler\CellProfiler_mcr\Modules\ExportToExcel.m (123)
AnalyzeImagesButton_Callback in C:\Users\Owner\Downloads\CompiledCellProfilerVista325811Bugfix\CompiledCellProfiler\CellProfiler_mcr\CellProfiler\CellProfiler.m (10442)
gui_mainfcn in C:\Users\Owner\Downloads\CompiledCellProfilerVista325811Bugfix\CompiledCellProfiler\CellProfiler_mcr\CellProfiler\CellProfiler.m (12182)
CellProfiler in C:\Users\Owner\Downloads\CompiledCellProfilerVista325811Bugfix\CompiledCellProfiler\CellProfiler_mcr\CellProfiler\CellProfiler.m (57)

My pipeline that I am using is:

LoadSingleImage <–> LoadImages - it works with “LoadSingleImage” but not with "LoadImages"
SmoothKeepingEdges
IdentifyPrimAutomatic - to identify all cells in the image
IdentifyPrimAutomatic - to identify the bright mitochondrial spots
ExpandOrShrink - to expand the mitochondrial spots to be subtracted
MaskImage
MaskImage
ApplyThreshold
ApplyThreshold
ImageMath - To get a binary mask of the cells with the mitochondrial spots subtracted
IdentifyPrimAutomatic - to define cells that do not touch the border
MaskImage -
ApplyThreshold
ImageMath - to ensure the cells to be measured do not touch the border
ImageMath - to combine the mask with the original image and export the data
MeasureObjectIntensity - of the cells with the bright mitochondrial spots gone
ExportToExcel PROBLEM SPOT??*
TrackObjects - to label the cells numerically for manual data validation
SaveImages - for data validation
SaveImages - for data validation

Any idea why ExportToExcel works for a single image but not when processed in a series of images?

Thanks,

Peter


How to save/export outlines coordinates?
#2

Hi Peter,

My guess here is that this is due to a bug in TrackObjects for the 6027 version. The identification labels for tracking, unlike other Measurements, are being written out as characters instead of numbers. The exporting function does not account for this, and fails as a result.

The reason as to why LoadImages causes this error is that using LoadSingleImage will cause your pipeline to execute for only one cycle, but LoadImages will execute for multiple cycles (however many images you are using). The export of the TrackObjects data does not occur in the first cycle (since there is nothing to track) but on the following cycles (when there is a successor frame to actually begin the tracking process). So if your pipeline is only one cycle long, it won’t error since there’s no tracking data.

Are you using TrackObjects just for labeling or for actually tracking the spots? If the former, there are other ways you can do this without using TrackObjects. If the latter, the upcoming release of CellProfiler (in the next week?) will have fixed this bug.

Regards,
-Mark


#3

Hi Mark,

Thanks for the reply. I think you are right about the TrackObjects module being the problem: I tried removing it from the pipeline and I got no error messages. In response to your question, I really only am using TrackObjects for the purpose of labeling objects on the saved images that correspond to the data in the excel file in order to manually validate the processing after the fact. You mentioned there was another way of displaying the object identifiers on the image, how else could I do that while still keeping the excel data?

Peter


#4

[quote=“plf”]Hi Mark,
You mentioned there was another way of displaying the object identifiers on the image, how else could I do that while still keeping the excel data?
[/quote]

Hi Peter,

It is not straightforward, but it can be done with a workaround. You can use Relate to relate the objects to themselves, and then use DisplayDataOnImage to display the labels of the parents (which is the same as the object labels themselves). To do this in DisplayDataOnImage, select the object, then “Other…” for category and type “Parent.” Leave the feature as ‘1’ and it should then work.

Regards,
-Mark


#5

Quick question: If you go to Help > Getting Started, what version do you see at top of the window?
-Mark


#6

Thanks Mark, it looks like it works. The version of Cell Profiler that I am using is 6.0.6031 on Windows Vista.

Cheers,
Peter