is it possible to specify annotation columns outside CPA (for instance in setup.SQL or in ?

this would be really important, because then we could automatically mark all wells that contain controls for all plates!

doing this manually for all plates is not really an option…


Hi Tischi,

We usually handle this for large scale experiments by manually uploading a separate database table with all our Per_Image metadata columns (compound/hairpin/control, dose, etc). Then the simplest method is to JOIN the tables by adding the metadata columns onto the Per_Image table. CPA then has access to these columns fro GROUP or FILTER operations.

This is the procedure we use for MySQL databases, at least, and though I have limited experience with sqlite, I assume the same procedure would be useful.

The other, equivalent method would be to use LoadData instead of LoadImages, and add metadata columns directly into the CSV that is used.

But, to your question, yes, I don’t see why you couldn’t add (manually, or via custom scripts) to your Setup.SQL database queries to JOIN pre-configured metadata tables that contain your Control wells.

Does that help?

Hi David,

in fact i already do have all the necessary Metadata columns in the per_image table.

what i would like to do is to select them in:

Plate Viewer…Annotation: Annotation Column

to highlight, for instance all wells, that share a specific Metadata.

in my version of CPA one can only manually click on Wells in the Annotation tool.

Best, Tischi

basically i can use my Metadata in

Plate Viewer…Filter

but i would like to use it in the same way in

Plate Viewer…Annotation

(because then i can still see the values of the other wells)

…a guess:

maybe if a column in the per_image table starts with the letters:


then it qualifies as an Annotation column?!

if that is true, what would i have to put in empty rows?




starting a column name with



but “” does not work for no annotation…

maybe NaN?

thank you for your help!

(This is just a copy of the reply on the CP-dev mailing list)

Hi Tischi,

NULL should work. I can’t say that I know the code for CPA Annotation, but using CPA PlateViewer, I added an annotation “test”, which adds a column prepended with “User_” by default. This is using a MySQL database, but the logic should be the same. A new column with this syntax gets added to the Per_Image table:

`User_test` varchar(255) DEFAULT NULL
Note that I chose “Text” (vs. Number) as the type, as you would like also.

What happens when you try and add the annotation manually first, via PlateViewer?


Also note that to use the Annotation tool, you need to:
(1) Open PLate Viewer
(2) Click “Add” in the Annotation section
(3) Enter your new metadata text (which will get “User_” prepended to it)
(4) Choose Text or Number for the data type
(5) Now click on any well that has data, and then enter the Value (“Control”, “Treatment_X”) into the “Label:” textbox
(6) If you now click on “Show values on plate”, this value should be shown in the PLateViewer window

At this point, a new column in your database should exist with a syntax similar to what I posted in my previous message.

Hope this helps,

Hey Tischi,

It sounds like this has gotten off track. The annotation tools in CPA are for manually adding annotation columns to your data. The tools aren’t really meant to be used for visualization.

Reading your comments carefully, I can see that you’re using the annotation view as a hack to visualize boolean data types (ie: control or not) while looking at other values at the same time (clever clever) :wink:

As it seems you have discovered, the “magic” encoding for user-created columns is that they start with “User_” and values default to NULL in the database. Sorry for the confusion, but since we don’t let users edit other data in the database, we need to distinguish between user-created columns and measurement columns.