Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
galaxyproject
GitHub Repository: galaxyproject/training-material
Path: blob/main/bin/data_libarary_download.sh
1677 views
1
#!/bin/bash
2
set -e
3
4
# set API key and galaxy instance
5
6
API_KEY=${GALAXY_DEFAULT_ADMIN_KEY:-fakekey}
7
galaxy_instance="http://localhost:8080"
8
9
# setting up conda
10
GALAXY_CONDA_PREFIX=/tool_deps/_conda export PATH=$GALAXY_CONDA_PREFIX/bin/:$PATH
11
12
if [ "$1" = '-d' ];
13
then
14
if [ "$(head -n 1 /tutorials/data-library_all.yaml)" != "{}" ];
15
then
16
echo "Starting Galaxy in the background"
17
#this is needed to use ephermeris
18
startup &
19
galaxy-wait -g $galaxy_instance
20
echo "Downloading data from data-library_all.yaml"
21
setup-data-libraries -i '/tutorials/data-library_all.yaml' -g $galaxy_instance -a $API_KEY -v
22
#because galaxy runs in the background, it stops running after the data is downloaded. A second startupcommand is needed:
23
startup
24
else
25
echo "No data libraries to install"
26
echo "Starting Galaxy"
27
startup
28
fi
29
30
else
31
echo "Use '-d' parameter to download tutorial data."
32
echo "Starting Galaxy"
33
startup
34
fi
35