comparison docker/alphafold/scripts/download_all_data.sh @ 1:6c92e000d684 draft

"planemo upload for repository https://github.com/usegalaxy-au/galaxy-local-tools commit a510e97ebd604a5e30b1f16e5031f62074f23e86"
author galaxy-australia
date Tue, 01 Mar 2022 02:53:05 +0000
parents
children
comparison
equal deleted inserted replaced
0:7ae9d78b06f5 1:6c92e000d684
1 #!/bin/bash
2 #
3 # Copyright 2021 DeepMind Technologies Limited
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # Downloads and unzips all required data for AlphaFold.
18 #
19 # Usage: bash download_all_data.sh /path/to/download/directory
20 set -e
21
22 if [[ $# -eq 0 ]]; then
23 echo "Error: download directory must be provided as an input argument."
24 exit 1
25 fi
26
27 if ! command -v aria2c &> /dev/null ; then
28 echo "Error: aria2c could not be found. Please install aria2c (sudo apt install aria2)."
29 exit 1
30 fi
31
32 DOWNLOAD_DIR="$1"
33 DOWNLOAD_MODE="${2:-full_dbs}" # Default mode to full_dbs.
34 if [[ "${DOWNLOAD_MODE}" != full_dbs && "${DOWNLOAD_MODE}" != reduced_dbs ]]
35 then
36 echo "DOWNLOAD_MODE ${DOWNLOAD_MODE} not recognized."
37 exit 1
38 fi
39
40 SCRIPT_DIR="$(dirname "$(realpath "$0")")"
41
42 echo "Downloading AlphaFold parameters..."
43 bash "${SCRIPT_DIR}/download_alphafold_params.sh" "${DOWNLOAD_DIR}"
44
45 if [[ "${DOWNLOAD_MODE}" = reduced_dbs ]] ; then
46 echo "Downloading Small BFD..."
47 bash "${SCRIPT_DIR}/download_small_bfd.sh" "${DOWNLOAD_DIR}"
48 else
49 echo "Downloading BFD..."
50 bash "${SCRIPT_DIR}/download_bfd.sh" "${DOWNLOAD_DIR}"
51 fi
52
53 echo "Downloading MGnify..."
54 bash "${SCRIPT_DIR}/download_mgnify.sh" "${DOWNLOAD_DIR}"
55
56 echo "Downloading PDB70..."
57 bash "${SCRIPT_DIR}/download_pdb70.sh" "${DOWNLOAD_DIR}"
58
59 echo "Downloading PDB mmCIF files..."
60 bash "${SCRIPT_DIR}/download_pdb_mmcif.sh" "${DOWNLOAD_DIR}"
61
62 echo "Downloading Uniclust30..."
63 bash "${SCRIPT_DIR}/download_uniclust30.sh" "${DOWNLOAD_DIR}"
64
65 echo "Downloading Uniref90..."
66 bash "${SCRIPT_DIR}/download_uniref90.sh" "${DOWNLOAD_DIR}"
67
68 echo "Downloading UniProt..."
69 bash "${SCRIPT_DIR}/download_uniprot.sh" "${DOWNLOAD_DIR}"
70
71 echo "Downloading PDB SeqRes..."
72 bash "${SCRIPT_DIR}/download_pdb_seqres.sh" "${DOWNLOAD_DIR}"
73
74 echo "All data downloaded."