Last active
September 24, 2024 06:04
-
-
Save mfansler/71f09c8b6c9a95ec4e759a8ffc488be3 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. | |
## The URI below is not persistent! | |
## Check for latest link: https://www.ibm.com/aspera/connect/ | |
wget -qO- https://ak-delivery04-mul.dhe.ibm.com/sar/CMA/OSA/0a07f/0/ibm-aspera-connect_4.1.0.46-linux_x86_64.tar.gz | tar xvz | |
## run it | |
chmod +x ibm-aspera-connect_4.1.0.46-linux_x86_64.sh | |
./ibm-aspera-connect_4.1.0.46-linux_x86_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 \ | |
[email protected]:/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} | |
} |
@Shicheng-Guo no, you need to use the one included in the ascp
installation. It should be at .aspera/connect/etc/asperaweb_id_dsa.openssh
, which installs to the user home if following the install script I provided.
Download a connector from https://www.ibm.com/aspera/connect/
@hmkim yes, thanks. Since IBM apparently does not persist the download links, one almost always has to go through the site to get a working URL. I try to update the one in the Gist occasionally, but with NCBI phasing out aspera, I revisit this infrequently.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here, Can I use the private key generated by
ssh-keygen -f ./private.openssh
because I cannot find the private key for
ascp
or the primary private key has been set aKey passphrase
and he forget it (manager).