-
-
Save krzemienski/555a9409b0acd80b3afbcaf7a48e6bb2 to your computer and use it in GitHub Desktop.
Install ascp on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## How to install ascp, in a gist. | |
## Check for latest link: http://downloads.asperasoft.com/en/downloads/8?list | |
wget -qO- https://download.asperasoft.com/download/sw/connect/3.9.8/ibm-aspera-connect-3.9.8.176272-linux-g2.12-64.tar.gz | tar xvz | |
## run it | |
chmod +x ibm-aspera-connect-3.9.8.176272-linux-g2.12-64.sh | |
./ibm-aspera-connect-3.9.8.176272-linux-g2.12-64.sh | |
## add it to the path now and in the future | |
export PATH=$PATH:~/.aspera/connect/bin/ | |
echo 'export PATH=$PATH:~/.aspera/connect/bin/' >> ~/.bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Some helper functions to put in .bash_profile | |
# download SRR from NCBI SRA via Aspera Connect | |
# Usage: | |
# | |
# $ get-srr SRR304976 | |
# | |
get-srr () { | |
SRR=${1} | |
SRR_6=$(echo $SRR | cut -c1-6) | |
# Tune the ascp parameters for your bandwidth! | |
ascp -i ~/.aspera/connect/etc/asperaweb_id_dsa.openssh \ | |
-k 2 -T -l200m \ | |
anonftp@ftp.ncbi.nlm.nih.gov:/sra/sra-instant/reads/ByRun/sra/SRR/${SRR_6}/${SRR}/${SRR}.sra \ | |
. | |
} | |
# download all SRRs listed in a file | |
get-srr-all () { | |
while read srr; do | |
get-srr $srr | |
done <${1} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment