Export per-object Classifications


Hi All,

I am using CPA 2.2.1 for counting cells with specific nuclear morphology. The classification goes smoothly, but I am wondering if there is a way to use CPA to add a column that indicates the classification result (positive or negative) in the original object measurements file (generated by CP with csv format)?

Update: I just tried to add class_table=xxx in my properties file. It gives me the object classification. However, for each object, it generates one “negative or positive” and multiple “None” (see attached). I would greatly appreciate if someone knows what to do here.



I’m not really sure why you’re getting multiple rows per image/object pair- did you do multiple rounds of classification before adding the class table maybe? I’ve never seen that behavior before so it’s hard to know where to start.

In any case, you can’t directly add the class table back to the per object table as far as I know, but you can either do it with a SQL query (easier to automate, but you have to already be pretty familiar with SQL) or export the class table as a CSV - I’d do the latter, you can then in Excel sort by the class_number column, delete all your random extra rows (since they’ll all have a value of ‘None’ rather than a numeric value), then sort again by ObjectNumber then ImageNumber- you’ll now have a single row per Image/Object pair, which should be sorted appropriately so that you can copy and paste it into your object spreadsheet.