Skip to content

Commit

Permalink
updated blast installation
Browse files Browse the repository at this point in the history
  • Loading branch information
mgiulini committed Mar 23, 2024
1 parent 921e21e commit 0af455e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions install_blast_deps.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
#!/bin/bash
CWD="$(pwd)"
echo "Current working directory: ${CWD}"
DB_DIR=${CWD}/db
SRC_DIR=${CWD}/src
OS=$(uname -s)

echo "Operating System: ${OS}"
echo "Downloading BLAST+ executables and swissprot database..."

#======================================================================#
echo "Downloading BLAST+..."
cd "${SRC_DIR}" || exit

if [ "${OS}" == "Darwin" ]; then
# if the OS is Darwin or Mac OS X, download the Mac OS X version of BLAST+
# if the OS is Linux, download the Linux version of BLAST+
if [ "${OS}" == "Darwin" ] || [ "${OS}" == "Mac OS X" ]; then
# Do something under Mac OS X platform
BLAST_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.13.0+-x64-macosx.tar.gz"
echo "Downloading BLAST+ for Mac OS X..."
BLAST_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.15.0/ncbi-blast-2.15.0+-x64-macosx.tar.gz"
elif [ "${OS}" == "Linux" ]; then
# Do something under GNU/Linux platform
BLAST_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.13.0+-x64-linux.tar.gz"
BLAST_URL="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.15.0/ncbi-blast-2.15.0+-x64-linux.tar.gz"
fi

wget "$BLAST_URL" >/dev/null 2>&1

tar -xzf ncbi-blast-2.13.0+-x64-*.tar.gz
rm ncbi-blast-2.13.0+-x64-*.tar.gz
tar -xzf ncbi-blast-2.15.0+-x64-*.tar.gz
rm ncbi-blast-2.15.0+-x64-*.tar.gz
#======================================================================#
echo "Downloading SwissProt DB..."
cd "$DB_DIR" || exit
Expand Down

0 comments on commit 0af455e

Please sign in to comment.