Recently I had to download some files from dbGAP, I’m posting the procedure here before I forget.

  1. I had to install the Aspera client extension, this doesn’t work on Chrome anymore so I had to use Safari.

  2. I had to get a “.ngc” file from my PI. This is the key that is used to decrypt the files from SRA. There is one file for every project under the PI’s account.

  3. Download sra-toolkit from here, other architecture downloads links are listed here.

  4. Import the key with vdb-config -i This will import the key and put it in the ~/.ncbi/ folder. Leave the other settings as they are.

  5. cd to the folder that was listed under vdb-config as your project directory, in my case it was cd ~/ncbi/dbGaP-10794/. If you don’t cd here before decrypting you will get weird errors like:
    2016-05-16T22:05:40 vdb-decrypt.2.6.2 err: path not found while opening directory within file system module - unable to obtain a password
    2016-05-16T22:05:40 vdb-decrypt.2.6.2: exiting: RC(rcFS,rcDirectory,rcOpening,rcPath,rcNotFound) (834996504)
    
  6. Run the decrypt command as bin/vdb-decrypt ./path_to_aspera_download