/easyascp

Easy use of command line aspera connect (ascp) for ENA downloads

Primary LanguageShell

easyascp

Easy use of command line Aspera Connect (ascp) for ENA downloads

1. Download IBM aspera connect

as per instructions: https://www.ibm.com/aspera/connect/

2. Find installation location of 'ascp' and 'asperaweb_id_dsa.openssh'

2a. Mac

~/Applications/Aspera\ Connect.app/Contents/Resources/ascp

~/Applications/Aspera\ Connect.app/Contents/Resources/asperaweb_id_dsa.openssh

2a. Ubuntu

/home/$USER/.aspera/connect/bin/ascp

/home/$USER/.aspera/connect/etc/asperaweb_id_dsa.openssh

3. Create script

Substitute in locations of 'ascp' and 'asperaweb_id_dsa.openssh' where appropriate

easyascp (Ubuntu)

#!/bin/bash
# shortcut for ascp downloads
new_ftp=$(echo $1 | sed 's/ftp.sra.ebi.ac.uk\//era-fasp@fasp.sra.ebi.ac.uk:/g')
/home/$USER/.aspera/connect/bin/ascp -QT -l 300m -P33001 -i /home/$USER/.aspera/connect/etc/asperaweb_id_dsa.openssh $new_ftp .

easyascp (Mac)

#!/bin/bash
# shortcut for ascp downloads
new_ftp=$(echo $1 | sed 's/ftp.sra.ebi.ac.uk\//era-fasp@fasp.sra.ebi.ac.uk:/g')
~/Applications/Aspera\ Connect.app/Contents/Resources/ascp -QT -l 300m -P33001 -i ~/Applications/Aspera\ Connect.app/Contents/Resources/asperaweb_id_dsa.openssh $new_ftp .

Example easyascp script in this repo is for Mac

Note that you may want to change the max transfer rate for ascp: -l 300m

3.b Add easyascp to your $PATH

Add script folder location to your .bashrc or .bash_profile e.g. export PATH="/Users/$USER/SOFTWARE_DIRECTORY/easyascp:$PATH"

Change permissions so file is executable chmod +x /Users/$USER/SOFTWARE_DIRECTORY/easyascp/easyascp

4. Run easyascp

easyascp ftp.sra.ebi.ac.uk/vol1/fastq/SRR881/000/SRR8810710/SRR8810710.fastq.gz