Another basic question

cellprofiler

#1

I want to use the cell classifier in CellProfiler Analyst. I use the ExportToDatabase module in CellProfiler, but then when I try to open the “DefaultDB_SETUP.SQL” file in CPAnalyst I get an error message: No driver for specified database. I have mySQL installed, but I have never used it before. Is there a basic step that I am unaware of?


#2

Hi,

You need to run the “*_SETUP.SQL” file at the terminal prompt first. Please read the Help file for ExportToDatabase (toward the bottom) for detailed instructions.

Let us know if those instructions are clear and work for you.
David


#3

I read the help, but I still can’t get it to work. I have attached a picture of what I have done in cmd.exe. After that, I went to “File -> Open Properties” and selected the file “New2DB_SETUP.SQL” in “C:\Documents and Settings\Work\Desktop\NEW OUTPUT” and received the same error message. Could someone please post a more detailed outline of how to import data in CPAnalyst? Thank you.



#4

Hi,

I believe the problem here is that you’re trying to load New2DB_SETUP.SQL as a properties file into CPAnalyst (CPA). You have already accomplished what you need to do with the setup script New2DB_SETUP.SQL. Now you need to setup a CPAnalyst Properties file manually, and this file is different from the .SQL file

Here’s the basic outline of getting CP data into CPA:

(1) Run CP with ExportToDatabase.
This outputs your data as .CSV files
(2) Following the ExportToDatabase Help Steps #1-4, at the terminal prompt, run mysql and execute “. _SETUP.SQL”.
This SETUP script uploads the .CSV files into your mysql database. You can now exit mysql.
(3) Execute CPA.
(4) Load and edit a CPA properties file.
To do this, find a pre-existing Properties file and modify it, either within CPA or in a text editor. The Properties file is just a simple text file with settings for your database name, table names, port info, IP address, column names, etc. Read the CPA Manual for more info. I suggest downloading the CPA example data set and Properties file from cellprofiler.org/examples.htm to practice.
(5) File -> Save Properties file
This is important! Your settings changes are not kept unless specifically saved.
(6) Display -> Image
This tests whether your database is properly connecting to your images
(7) Run Analyze -> Classifier

You have done #1-3, however you still need to setup a Properties file. Note that you must be very careful setting up your Properties file, otherwise you will get generic “Cannot connect to database” errors.

Also note, that for Windows machines, a bug was found in CPconvertsql.m. I don’t think this is the problem that you were having, but it may also apply to you. Please refer to this page for a possible solution: CellProfiler SQL output file paths improperly escaped

Hope this helps!
David