File access through predefined profiles

From Dynamo
Revision as of 11:08, 25 June 2018 by Daniel Castaño (talk | contribs) (Created page with " This system is used when you work frequently with filenames that represent the same file as seen by different filesystems. For example, you may have a tomogram stored in a f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This system is used when you work frequently with filenames that represent the same file as seen by different filesystems.

For example, you may have a tomogram stored in a fileshare that can be seen in different file systems. Let's say that in your linux machine, you see it as

/links/tomograms/myTomogram.mrc

and in your Mac machine, you see it as:

/Volumes/external/tomograms/myTomogram.mrc.

In this example,we assume that /links and /Volumes/external are different mount points (one defined in the unix machine and the other one in the mac machine) that point to the same location.

When you are are working on the different systems, each naming is coherent. The problem occurs when you are working in one system, and you need to refer to file names expressed in the convention of the other system.

In many situations, you can just use string replacing methods of your favorite parsing system (Perl, awk, etc). In Matlab (or Dynamo standalone) you can just use the convenient strrep function. For instance, if you have a text file with file names (viewed from the unix system) to visit in a loop, producing the equivalent list with the names of the same files as viewed from the Mac is trivial.

However, you might have a problem when you use databasing options in Dynamo that store absolute paths. An examples are the tomograms and models in the catalogue. If you produced your catalogue in the linux machine, your tomograms will look like:

/links/tomograms/tomob001ts0001.mrc
 /links/tomograms/tomob001ts0002,mrc 

... so that if you access them from your Mac system, the catalogue will think that the files don't exist. 

One think that can be done is to use the option in the  calatogue gui to  "relink" the tomograms (and linking elements in the models) to the mac convention. This works, but is rather tedious. Moreover, it also means that afterwards the catalogue  will not recognise the tomogram files when accessed through the linux machine.