CellProfiler-Analyst icon indicating copy to clipboard operation
CellProfiler-Analyst copied to clipboard

JIRA [IMG-182] Wizard tool to rename paths in CPA

Open braymp opened this issue 12 years ago • 5 comments

For use if your images move say from bcb/ to bcbimage/ or you need to convert the paths from unix to windows, or just replace a whole chunk of the path with something else because the files were moved. The wizard would actually be changing stuff in the DB- but createmastertablewizard already does this so it's not unheard of.

braymp avatar May 22 '13 13:05 braymp

Did you envision this a menu option within CPA? Perhaps it should instead be a data tool in CellProfiler? After all, people might have and use a database created by CP even though they are not using CPA.

ljosa avatar May 24 '13 11:05 ljosa

Talked things over with @LeeKamentsky and @dlogan. We thought that this tool would be most appropriate in CPA.

Reasons:

  • Having this tool in CP as a data tool doesn't quite fit the typical model as for the other tools (i.e, ask for the measurements file and do something to it/display something from it)
  • Bad paths are most damaging for CPA users. Users who are using the db but not using CPA most likely just care about the measurements/metadata but not the image locations themselves.
  • CPA users are less likely to accidentally blow themselves up than naive CP users :-)

We see it as a menu option (probably under the 'Advanced' item) with a simple dialog: "String to find" with an editbox, "String to replace" with an editbox, and OK/Cancel buttons. Any cols with "Image_PathName" would be searched and changed.

braymp avatar May 24 '13 14:05 braymp

Having just written a command line tool for the Institut Curie to do exactly this, it's easier to select an image from the DB, present its path, and have the user find the path to that image's new location.

It's useful to do common path element discovery at that point, so that only the root that changed is modified, since many experiments have multiple directories, and it's a pain to change them all one by one.

On Fri, May 24, 2013 at 10:11 AM, Mark Bray [email protected]:

Talked things over with @LeeKamentsky https://github.com/LeeKamentskyand @dlogan https://github.com/dlogan. We thought that this tool would be most appropriate in CPA.

Reasons:

  • Having this tool in CP as a data tool doesn't quite fit the typical model as for the other tools (i.e, ask for the measurements file and do something to it/display something from it)
  • Bad paths are most damaging for CPA users. Users who are using the db but not using CPA most likely just care about the measurements/metadata but not the image locations themselves.
  • CPA users are less likely to accidentally blow themselves up than naive CP users :-)

We see it as a menu option (probably under the 'Advanced' item) with a simple dialog: "String to find" with an editbox, "String to replace" with an editbox, and OK/Cancel buttons. Any cols with "Image_PathName" would be searched and changed.

— Reply to this email directly or view it on GitHubhttps://github.com/CellProfiler/CellProfiler-Analyst/issues/35#issuecomment-18407049 .

thouis avatar May 24 '13 22:05 thouis

This is still an issue http://forum.cellprofiler.org/t/change-path-names-in-cpa-properties-file-and-db-file/3589

jhung0 avatar Jun 08 '16 03:06 jhung0

As a temporary solution, @bethac07 shared this code with me that updates the path information in an sqlite database:

UPDATE MyExperiment_Per_Image SET Image_PathName_DNA = REPLACE(Image_PathName_DNA,'/my/old/path/to/images' , 'C:\my\new\path\to\images' ) WHERE Image_PathName_DNA LIKE '%/my/old/path/to/images%'

karhohs avatar Oct 17 '16 14:10 karhohs