EGA Download Client v3 - Quick Guide

Background to download

*** Prior to starting your download, please check that your dataset is available to download using the client by following this link : Datasets currently not present in the download Client . Please email EGA Helpdesk to request an Aspera download account for any datasets that are unavailable in the client. ***


Secondly, check that your dataset contains files with the .cip extension if it contains files with .gpg use this client to download


Overview

The new download client is python based and data is downloaded over secure https connections, instead of http. This allows EGA to send the data as unencrypted data (via encrypted connections); so, you don’t have to decrypt files after download. You can download files or datasets directly, without first having to make a request. Files are verified against the unencrypted MD5 after download (you can also get the unencrypted MD5 via REST call from the API directly).

The new client also supports segmenting (breaking a file into up to 4 segments and downloading them in parallel) and resume; so even if a file is downloaded as one continuous stream, the download will simply resume if there was an error or an interrupted connection.

*PLEASE NOTE THE NEW CLIENT DOES NOT SUPPORT THE DOWNLOADING OF FILES THAT END WITH THE SUFFIX ".gpg" – these will have to be downloaded using the previous version of the client, whose documentation can be found here

Downloading the Client
Files ready to use
  • At this point your files should be ready to us. Please contact the EGA Helpdesk for further queries




Obtaining the Download Client

Download the client (click on ‘clone' or 'download') that can be obtained from : ega github repository

Installing the client

Red fields need to be changed accordingly

1.Navigate to the directory where the client was downloaded to.

2.Select the appropriate installation script and follow on screen prompts.

Points to Notice
Three scripts are provided to install the required Python environment, based on the host operating system:

  Linux: debian_dependency_install.sh
  Linux (Red Hat): red_hat_dependency_install.sh
  Mac: osx_dependency_install.sh
Select the apropriate script, based on your host operating system and, from the console perform :
 sh  debian_dependency_install.sh  

3.Create a file called CREDENTIALS_FILE, in the directory where the client will run, and add the following text in exactly the same (JSON) format only use your own email address and EGA password.

Define the Credentials

Create a credentials file with the following JSON object in the directory where the client will run:

{
        "username": "my.email@domain",
        "password": "mypassword",
        "client_secret":"AMenuDLjVdVo4BSwi0QD54LL6NeVDEZRzEQUJ7hJOM3g4imDZBHHX0hNfKHPeQIGkskhtCmqAJtt_jm7EKq-rWw"
}

Installing the client for Windows users

1.Download Python 3

2.Install Python 3 following the prompt commands.

3.Verify the correct install from the terminal

$ python --version

4.Upgrade pip to the latest

python -m pip install --upgrade pip

5.Install ‘request’ module

python -m pip install requests

6.Install ‘’tqdm” module

python -m pip install tqdm


Using the Download Client

Note : <output> must be populated with the fullpath and the filename without the .cip extension such as :

 /Users/jeff/EGA/Download_client/3.0/Oxstat.tar.gz 

Red fields below need to be changed accordingly

Display datasets

python3 pyega3/pyega3.py -cf CREDENTIALS_FILE datasets

Display files in a dataset

python3 pyega3/pyega3.py -cf CREDENTIALS_FILE files EGAD00001000951 <output> 

Download a dataset

python3 pyega3/pyega3.py -cf CREDENTIALS_FILE fetch EGAD00001000951 <output> 

Download a single file

python3 pyega3/pyega3.py -cf CREDENTIALS_FILE fetch EGAF00000585895 <output> 

Download a file using 4 streams (only works for files):

python3 pyega3/pyega3.py -c 4 -cf CREDENTIALS_FILE fetch EGAF00001412793 <output> 


Positional Arguments

positional arguments:
  {datasets,files,fetch}
                        subcommands
    datasets            List authorized datasets
    files               List files in a specified dataset
    fetch               Fetch a dataset or file

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           Extra debugging messages
  -cf CREDENTIALS_FILE, --credentials-file CREDENTIALS_FILE
                        JSON file containing credentials
                        e.g.{'username':'user1','password':'toor','key':
                        'abc'}
  -c CONNECTIONS, --connections CONNECTIONS
                        Download using the specified number of connections


Reporting issues

If you have any issues with the client, please raise them on the ega github repository or contact the EGA Helpdesk .