Skip to content

Commit 6800249

Browse files
committed
remove galaxy submodule and use galaxy 19.09
1 parent c92bb75 commit 6800249

File tree

12 files changed

+146
-1883
lines changed

12 files changed

+146
-1883
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
galaxy/

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,10 @@ cd <dir>
2828
git checkout <tag/branch>
2929
```
3030

31-
Use git to initialize and clone submodule Galaxy:
31+
Install Galaxy and dependencies
3232

3333
```sh
34-
git submodule init
35-
git submodule update
36-
```
37-
38-
Create database and install dependencies required by Galaxy:
39-
40-
```sh
41-
cd galaxy
42-
sh install_dependencies.sh
43-
sh create_db.sh
34+
sh install-galaxy.sh
4435
```
4536

4637
You will not need to do anything beyond this as all necessary assets are

form.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
cluster: "owens"
33
form:
4-
- version
54
- bc_account
65
- bc_num_hours
76
- node_type
@@ -38,9 +37,3 @@ attributes:
3837
- [ "any", "any" ]
3938
- [ "hugemem", "hugemem" ]
4039
- [ "debug", "debug" ]
41-
version:
42-
widget: select
43-
label: "Galaxy version"
44-
help: "This defines the version of Galaxy you want to load."
45-
options:
46-
- [ "18.05"]

galaxy

Lines changed: 0 additions & 1 deletion
This file was deleted.

install-galaxy.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
cd "$(dirname "$0")"
2+
# Install Galaxy
3+
if [[ ! -e galaxy ]]; then
4+
git clone [email protected]:galaxyproject/galaxy.git
5+
fi
6+
7+
cd galaxy
8+
git checkout release_19.09
9+
10+
# Install dependencies
11+
# Retrieved from line 1-54 in https://github.com/galaxyproject/galaxy/blob/release_19.09/run.sh
12+
. ./scripts/common_startup_functions.sh
13+
14+
# If there is a file that defines a shell environment specific to this
15+
# instance of Galaxy, source the file.
16+
if [ -z "$GALAXY_LOCAL_ENV_FILE" ];
17+
then
18+
GALAXY_LOCAL_ENV_FILE='./config/local_env.sh'
19+
fi
20+
21+
if [ -f "$GALAXY_LOCAL_ENV_FILE" ];
22+
then
23+
. "$GALAXY_LOCAL_ENV_FILE"
24+
fi
25+
26+
GALAXY_PID=${GALAXY_PID:-galaxy.pid}
27+
GALAXY_LOG=${GALAXY_LOG:-galaxy.log}
28+
PID_FILE=$GALAXY_PID
29+
LOG_FILE=$GALAXY_LOG
30+
31+
parse_common_args $@
32+
33+
run_common_start_up
34+
35+
setup_python
36+
37+
if [ ! -z "$GALAXY_RUN_WITH_TEST_TOOLS" ];
38+
then
39+
export GALAXY_CONFIG_OVERRIDE_TOOL_CONFIG_FILE="test/functional/tools/samples_tool_conf.xml"
40+
export GALAXY_CONFIG_ENABLE_BETA_WORKFLOW_MODULES="true"
41+
export GALAXY_CONFIG_OVERRIDE_ENABLE_BETA_TOOL_FORMATS="true"
42+
export GALAXY_CONFIG_OVERRIDE_WEBHOOKS_DIR="test/functional/webhooks"
43+
fi
44+
45+
if [ -n "$GALAXY_UNIVERSE_CONFIG_DIR" ]; then
46+
python ./scripts/build_universe_config.py "$GALAXY_UNIVERSE_CONFIG_DIR"
47+
fi
48+
49+
set_galaxy_config_file_var
50+
51+
if [ "$INITIALIZE_TOOL_DEPENDENCIES" -eq 1 ]; then
52+
# Install Conda environment if needed.
53+
python ./scripts/manage_tool_dependencies.py init_if_needed
54+
fi

manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ category: Interactive Apps
44
subcategory: Servers
55
role: batch_connect
66
description: |
7-
This app will launch [Galaxy] on the [Owens cluster].
7+
This app will launch [Galaxy 19.09] on the [Owens cluster].
88
99
[Galaxy]: https://galaxyproject.org/
1010
[Owens cluster]: https://www.osc.edu/resources/technical_support/supercomputers/owens

submit.yml.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<%-
2-
props = ":ppn=1"
2+
ppn = num_cores.blank? ? 28 : num_cores.to_i
3+
props = case node_type
4+
when "hugemem"
5+
":ppn=48"
6+
else
7+
":ppn=#{ppn}"
8+
end
39
-%>
410
---
511
batch_connect:

template/before.sh.erb

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,83 @@
44
# Find available port to run server on
55
port=8080
66

7+
# Define Galaxy Variables
8+
export GALAXY_PATH="<%= BatchConnect::App.from_token(session.token).root.realpath.join("galaxy").to_s %>"
9+
export GALAXY_CONFIG_FILE="${PWD}/galaxy.yml"
10+
MOUNT="/node/${HOSTNAME}/8080=galaxy.webapps.galaxy.buildapp:uwsgi_app()"
11+
DATAROOT=${HOME}/.galaxy
12+
EMAIL="${USER}@osc.edu"
13+
export JOB_CONFIG_FILE_PATH="${PWD}/job_conf.xml"
14+
15+
echo "GALAXY location: '${GALAXY_PATH}'"
16+
echo "Data location: '${DATAROOT}'"
17+
18+
# Load the required environment
19+
<%-
20+
if context.node_type=="hugemem"
21+
ppn = 48
22+
elsif context.num_cores.blank?
23+
ppn = 28
24+
else
25+
ppn = context.num_cores.to_i
26+
end
27+
-%>
28+
29+
# Generate Galaxy job configuration file
30+
(
31+
umask 077
32+
cat > "${JOB_CONFIG_FILE_PATH}" << EOL
33+
<?xml version="1.0"?>
34+
<!-- A sample job config that explicitly configures job running the way it is configured by default (if there is no explicit config). -->
35+
<job_conf>
36+
<plugins>
37+
<plugin id="pbs" type="runner" load="galaxy.jobs.runners.pbs:PBSJobRunner"/>
38+
</plugins>
39+
<destinations default="pbs_default">
40+
<destination id="pbs_default" runner="pbs">
41+
<param id="Resource_List">walltime=5:00:00,nodes=1:ppn=<%= ppn %></param>
42+
<param id="-p">128</param>
43+
</destination>
44+
<destination id="other_cluster" runner="pbs">
45+
<param id="destination">@other.cluster</param>
46+
</destination>
47+
<destination id="long_jobs" runner="pbs">
48+
<param id="Resource_List">walltime=5:00:00,nodes=1:ppn=1</param>
49+
<param id="-p">128</param>
50+
<param id="Output_Path"></param>
51+
</destination>
52+
</destinations>
53+
</job_conf>
54+
EOL
55+
)
56+
57+
# Generate Galaxy configuration file
58+
(
59+
umask 077
60+
cat > "${GALAXY_CONFIG_FILE}" << EOL
61+
uwsgi:
62+
http: 0.0.0.0:8080
63+
buffer-size: 16384
64+
processes: 1
65+
threads: 4
66+
offload-threads: 2
67+
static-map: /static/style=static/style/blue
68+
static-map: /static=static
69+
static-map: /favicon.ico=static/favicon.ico
70+
master: false
71+
virtualenv: .venv
72+
pythonpath: lib
73+
mount: ${MOUNT}
74+
manage-script-name: true
75+
thunder-lock: false
76+
die-on-term: true
77+
hook-master-start: unix_signal:2 gracefully_kill_them_all
78+
hook-master-start: unix_signal:15 gracefully_kill_them_all
79+
py-call-osafterfork: true
80+
enable-threads: true
81+
galaxy:
82+
data_dir: ${DATAROOT}
83+
single_user: ${EMAIL}
84+
tool_dependency_dir: ${GALAXY_PATH}/database/dependencies
85+
EOL
86+
)

0 commit comments

Comments
 (0)