Difference between revisions of "File access through predefined profiles"

From Dynamo
Jump to navigation Jump to search
(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...")
 
Line 1: Line 1:
  
This system is used when you work frequently with filenames that represent the same file as seen by different filesystems.
+
This system is used when you work frequently with filenames that represent the same file as seen by different file systems.
 +
 
 +
== Name of a file in different systems  ==
  
 
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
 
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
Line 16: Line 18:
 
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 <tt>strrep</tt> 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.
 
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 <tt>strrep</tt> 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:
+
However, you might have a problem when you use databasing options in ''Dynamo''  that store absolute paths.  
 +
 
 +
=== Example: tomogram names in catalogues ===
 +
 
 +
A  frequently happening example are the tomograms and models in the [[catalogue]]. If you produced your catalogue in the linux machine, your tomograms will look like:
  
 
  <pre>/links/tomograms/tomob001ts0001.mrc
 
  <pre>/links/tomograms/tomob001ts0001.mrc
  /links/tomograms/tomob001ts0002,mrc </tt>
+
  /links/tomograms/tomob001ts0002,mrc </pre>
  
 
... so that if you access them from your Mac system, the catalogue will think that the files don't exist.  
 
... 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.
 
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.
 +
 +
== Global file access profiles ==
 +
 +
''Dynamo''  includes a more convenient system to handle this situation: the ''global file access profiles''.  The user can define profiles that express the equivalence of same mount points as viewed in the different machines. Whenever ''Dynamo'' looks for a file expressed with an absolute path, it will automatically

Revision as of 10:32, 25 June 2018

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

Name of a file in different systems

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.

Example: tomogram names in catalogues

A frequently happening example 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.

Global file access profiles

Dynamo includes a more convenient system to handle this situation: the global file access profiles. The user can define profiles that express the equivalence of same mount points as viewed in the different machines. Whenever Dynamo looks for a file expressed with an absolute path, it will automatically