Page MenuHomec4science

Cell Profiler
Updated 2,509 Days AgoPublic

Changing file paths from Database file

It is currently the case that the paths to the analysed images using Cell Profiler are all absolute, which makes moving or sharing the data for use in Cell Profiler Analyst difficult.

We provide a Python 3.5 script that will modify the resulting SQLite database in the following way:

  1. It will look for the image_table and image_names values from the Experiment_Properties table
  2. It will modify the Image_PathName_?? column of 'image_table' to reflect the new location of the images for each ?? which corresponds to the image_names
  3. It will modify the path of db_sqlite_file in the Experiment_Properties table.
WARNING: Make a copy of your database before using the script, as it will be overwritten.
WARNING: All images are assumed to be in the same folder. If this is not your case, Cell Profiler Analyst will no longer find your images.

Download

https://c4science.ch/diffusion/3881/browse/master/ChangeImagePaths.py

Last Author
oburri
Last Edited
Jun 6 2017, 11:28

Event Timeline

oburri created this document.Jun 6 2017, 11:11
oburri edited the content of this document. (Show Details)
oburri edited the content of this document. (Show Details)Jun 6 2017, 11:24
oburri edited the content of this document. (Show Details)
oburri edited the content of this document. (Show Details)Jun 6 2017, 11:28
oburri added a project: Cell Profiler Tools.