Per well Analysis with CP followed by R Graphics


Hello everyone,

**Is CP analyzing pictures in numerical/alphabetical order? **

I can’t find this information in any description or manual, but it’s crucial for my work. I’m getting quite desperate about this…
I’m trying to make a Pipeline for High Troughput Cardiomyocyte Cell size analysis. The pictures are taken with the GE Healthcare Incell Analyzer and the pictures names are for example
A - 1(fld 4 wv DAPI - DAPI).tif
A - 1(fld 4 wv TexasRed - TexasRed).tif
(Meaning picture number 4 from well A-1)
I usually take 25 pictures per well and I want to summarize these 25 pictures per well.

At the moment I want Cellprofiler to analyze a whole 96 well plate and afterwards I split the huge result txt table back to per well using R Graphics.
I tell R Graphics to summarize the first pack of 25 “ImageNumbers” to one well, and then proceed with the next 25.
But if Cell Profiler doesn’t analyze my pictures chronologically for sure, this won’t work.

Is there any module to make sure it will be analyzed in alphabetical/ numeric order ?
Or is there a method to directly summarize all the pictures for well A-1 with CellProfiler?

I’m sorry if this topic was already answered, but I didn’t find any matching results using the search function.

Thank you so much for your help!!!

Jennifer Fu


Hi Jennifer,

The order of the images processed can vary by operating system, as each can have their own listing order quirks (case-sensitive or not, how they respond to spaces, etc). So I would highly suggest that you not rely on the order in which the data are processed, but instead to use the metadata from your filenames or elsewhere.

To do this, start with the Metadata module, which I guess you are not utilizing now? It can be daunting at first, but you can use this regular expression for your filenames, using “Extract from file/folder names” option:

This will provide extra columns in your Per_Image table called Row, Col, Well (equal to concatenated RowCol), and Field.
Even better, you can use this extracted metadata in your ExportToDatabase module to calculate Per-well means, etc for all your measurements (though this does not work with ExportToSpreadsheet yet). But you could aggregate these yourself in R post-hoc much more safely, grouping by your plate/well metadata.

Hope that helps!


thank you for the quick answer.
My data contains columns and fields >9
e.g.A - 12(fld 22 wv TexasRed - TexasRed).tif
and with the code you gave me CP will only get the first digit, so I tried altering the code to this:
^(?P.*) - (?P[1-9]|[1-9][0-9])(fld (?P[1-9]|[1-9][0-9])
But CP still only takes the first digit of numbers.
I’m not too familiar with programming. Do you have an idea how to make it work for numbers with 2 digits, too?

Thank you very much :smile:


Hi Jennifer,

There is extensive (perhaps overwhelming!) help on our Metadata module Help page, accessed through the application, or here. But for now, try this small change to get columns of one or two numbers for the metadata named “Col” and “Field”:

^(?P<Row>.*) - (?P<Col>[0-9]{1,2})\(fld (?P<Field>[0-9]{1,2}) wv
or for any number of digits:

^(?P<Row>.*) - (?P<Col>[0-9]*)\(fld (?P<Field>[0-9]*) wv
Let us know if that helps.


Thanks again :smile: It all works fine now. :smile: