Running CPA locally on database made by cluster computing

Dear all,

I am new to CellProfiler Analyst and ran into some problems using it on a database that I generated using cluster computing. The problem is that the database refers to the cluster root path, which doesn’t work locally.

I am using the CreateBatchFiles module in CellProfiler 2.2.0 and there I specify the local root path and cluster root path, which are different (please see the screenshot below).


I use the ExportToDatabase module to generate the database and properties file for Cell Profiler Analyst.
The automatically generated properties file uses the cluster root path to state the location of the database (screenshot below). I already figured out that I need to manually change that to the local root path, since I want to run CPA 2.2.1 locally.


However, the database itself also seems to refer to the cluster root path for all of my images.
When trying to train a classifier, images can’t be loaded. The error message states that CPA tries to access them through the cluster root path, which doesn’t work locally (see screenshot of error message below.)


Is there a way to change the settings in either CP or CPA, so that the database refers to the local root path?

Best regards,

I found a workaround by manually altering the database. In case anyone else runs into this problem in the future, here is how I did it (I am using mac and sqlite, with CellProfiler 2.2.0 and CellProfiler Analyst 2.2.1):

I first made a copy of my database, on which I then worked.

In the terminal:

#start sqlite


#open your database

.open /yourpath/yourdatabase.db

#find out which tables are inside your database. for me, the table ending in “_Per_Image” was relevant.


#get a list of the column names of your table. for me all columns starting in “Image_PathName_” were relevant

.schema tablename

#change all occurrences of the cluster root path into the local root path. For me, g is the cluster root path, Volumes is the local root path.

UPDATE yourtablename SET Image_PathName_yourimagechannelname = replace( Image_PathName_yourimagechannelname, ‘/g/’, ‘/Volumes/’ ) WHERE Image_PathName_yourimagechannelname LIKE ‘/g/%’;

Repeat for all relevant columns.

I then also changed the path and filename in the properties file to point to my edited database.