Exporting reference data for use in external applications
The Reference Data Manager can export a reference data set. This can be very useful, e.g. when using the external applications framework. In this situation, one might be interested in using the reference data from the workbench in the external application, instead of having to obtain the relevant data by other means, and making them available to the external application.To export a reference data set, the following conditions must be satisfied:
- The External Applications Client Plugin must be installed
- The workbench must be connected to a server
- There must be at least one import/export location on the server
- The reference data set to be exported must be fully downloaded to the CLC_References reference data location on the server
- The user is currently managing reference data on the server (as opposed to locally)
If those conditions are satisfied, there will be an enabled "Export..." button in the details pane for the reference data set (figure 13.13).
Figure 13.13: The "Export..." button in the reference data manager.
Pressing the export button results in the dialog for selecting the export location shown in figure 13.14.
Figure 13.14: Selecting the export location when exporting reference data in the reference data manager
The root of an import/export location should be selected, as the tools and scripts using the exported reference data might not be able to find them otherwise. In the screenshot shown in figure 13.14, it would probably be correct to select the folder CLC_ImportExport.
The export is intended to be executed only once for each Reference Data Set, as Reference Data Sets do not change over time. If a Reference Data Set needs to be updated, a new version will be created in the Reference Data Manager. This new version will be downloaded to a new version folder in the CLC_References folder in the persistence, and accordingly it will be exported to a new version folder on the import/export location.
The directory structure for the exported references is the same as for the "normal" references:
Figure 13.15: The structure of the exported reference data.
If the export is invoked twice for a given Reference Data Set, new files will be created in the same folder and next to the files that were exported in the first export.
For example, if the Reference Data element "Clinvar" already has been exported, then there might be a folder called /homo_sapiens/clinvar/20131203 with the file Clinvar_20131203.vcf If the export is invoked again, then the folder will contain two identical files with difference names: Clinvar_20131203.vcf and Clinvar_20131203.1.vcf. The second file will not be used.
No special permissions are required to export reference data, but administrator rights are required to delete reference data. If it becomes necessary to delete exported reference data, an administrator, super user, or some user with administrator rights, must do this. Deletion of exported data has to be done through the operation system, it cannot be done through the Workbench, nor the CLC server.