File preparation: EgaCryptor
EgaCryptor is a JAVA based client, which enables submitters to produce EGA compliant files by encrypting each file to be submitted and generating the encrypted and unencrypted md5sum for each file.
The resulting encrypted data and md5sum files may then be uploaded to your submission account using FTP or Aspera.
- Download the required JAR files.
- Extract 'EgaCryptor.zip'
To enable file encryption, unlimited strength JCE policy files must be installed if you are using JAVA JRE.
Installing the JCE policy files (due to licensing terms and conditions the required policy files must be downloaded direct from the ORACLE website) :
- Download the unlimited strength JCE policy files (JRE 6 / JRE 7/ JRE 8)
- Uncompress and extract the downloaded file.
- This will create a subdirectory called JCE. This directory contains the following files: README.txt, COPYRIGHT.html, local_policy.jar and US_export_policy.jar
- Install the two policy JAR files by replacing the existing ones in your <java- home> directory.
- The standard place for JCE jurisdiction policy JAR files is: <java-home>/lib/security [Unix] or <java-home>\lib\security [Win32]
<java-home> refers to the directory where the Java SE Runtime Environment (JRE) was installed.
For all file submissions, except Complete Genomics, each file has to be encrypted individually and md5sum (encrypted and unencrypted) values provided on a file by file basis.
For Complete Genomics submissions, the directory (containing the ASM, LIB and MAP subdirectories for the sample) should be compressed using tar or gzip. The compressed directory file should be encrypted and md5sum (encrypted and unencrypted) values provided. DO NOT ENCRYPT THE FILES WITHIN THE COMPRESSED TAR OR GZIP.
Specifying multiple named files to prepare:
e.g java -jar ../EgaCryptor.jar -file example1.bam example2.bam
Specifying all files within the source directory to prepare:
e.g java -jar ../EgaCryptor.jar -file *
Specifying a Complete Genomics directory to prepare:
e.g java -jar ../EgaCryptor.jar -file complete_genomics_directory
The output files (3 files per input file: encrypted file, unencrypted-file-md5 file, and encrypted-file-md5 file) are created in the same directory as the original file.
e.g example1.bam.gpg (encrypted file)
example1.bam.gpg.md5 (encrypted-file-md5 file)
example1.bam.md5 (unencrypted-file-md5 file)
All output files must then be uploaded to your submission account using Aspera or FTP.
Points to note:
Remember to provide the path to EgaCryptor.jar and run the command from within the directory the file/s are located.
EgaCryptor writes files to the source directory of your local file system, as a result you must have write-access permissions for the source directory.
I observe the following error: UnixFileSystem.createFileExclusively (Native Method)
The error is thrown by UNIX (“UnixFileSystem.createFileExclusively(Native Method)”). It appears that the user does not have write-access to the file system where the file to be uploaded is located.
EgaCryptor always writes MD5 checksums into files before uploading them to the server, and these files are created in the same location where the uploaded file itself resides.
Solution: address your directory permission issue and re-run the command.