sratoolkit/2.10.7 to download dbGAP data

Due to Aspera license limitations, users have to install the software under their home to user the software. 

Start interactive job, and create working folder and load sratoolkit modue

For example, for user abc123, the working directory will be

srun --pty -p interactive -t 0-12:0:0 --mem 2000MB -n 1 /bin/bash mkdir /n/scratch/users/${USER:0:1}/${USER}/testDbGaP cd /n/scratch/users/${USER:0:1}/${USER}/testDbGaP module load sratoolkit/2.10.7

Configure sratoolkit. Only need to do this once:

# Configure sratoolkit vdb-config --interactive # Directly press x key to quit # By default, sratoolkit uses working diretory as cache. It is better to use scratch instead: echo /repository/user/main/public/root = \"/n/scratch/users/${USER:0:1}/${USER}/ncbi\" >> ~/.ncbi/user-settings.mkfg

Downoading dbGaP repository Key and upload to O2:

# Upload the dbGaP repository Key to O2: scp ~/Download/prj_phs710EA_test.ngc $

Use sratoolkit prefetch, which try ascp then http,  to download sra data, then convert the data from .sra to .fastq format