1
1
# Laxy
2
+
2
3
![ Docker test] ( https://github.com/MonashBioinformaticsPlatform/laxy/workflows/Docker%20test/badge.svg?branch=master )
4
+ [ ![ DOI] ( https://zenodo.org/badge/104432675.svg )] ( https://zenodo.org/badge/latestdoi/104432675 )
3
5
4
6
_ Laxy_ is a web application designed to simplify launching routine genomic pipeline analyses.
5
7
@@ -25,6 +27,7 @@ docker-compose --compatibility -f docker-compose.yml -f docker-compose.local-dev
25
27
The Laxy frontend is a Vue Single-Page Application that runs in the browser and communicates with a Laxy backend server.
26
28
27
29
### Development
30
+
28
31
``` bash
29
32
cp -n .env.example .env
30
33
cd laxy_frontend
@@ -47,14 +50,14 @@ These variables are used by the Webpack (`dotenv-webpack`) build to substitute r
47
50
48
51
## Backend
49
52
50
- The Laxy backend is a RESTful web service for managing pipeline jobs across various compute resources.
53
+ The Laxy backend is a RESTful web service for managing pipeline jobs across various compute resources.
51
54
It is based on Django and Celery.
52
55
53
56
### Setup
54
57
55
58
Dependencies:
56
59
57
- * Python 3.6+
60
+ - Python 3.6+
58
61
59
62
``` bash
60
63
# Create a Python virtual environment, install package dependencies
@@ -66,11 +69,13 @@ pip install -U -r requirements-dev.txt
66
69
```
67
70
68
71
Run tests:
72
+
69
73
``` bash
70
74
./manage.py test --noinput
71
75
```
72
76
73
77
Create a user and database on Postgres (run ` psql ` ):
78
+
74
79
``` postgresql
75
80
CREATE ROLE laxy WITH LOGIN PASSWORD 'blablafooword';
76
81
CREATE DATABASE laxy;
@@ -80,16 +85,18 @@ GRANT ALL PRIVILEGES ON DATABASE laxy TO laxy;
80
85
81
86
Configuration is taken from a ` .env ` file.
82
87
Environment variables (eg ` LAXY_* ` ) will override any variables defined in ` .env ` .
88
+
83
89
``` bash
84
90
# Copy the example settings environment and edit as required,
85
- # including the database name and password above.
91
+ # including the database name and password above.
86
92
cp -n .env.example .env
87
93
vi .env
88
94
```
89
95
90
96
(To manually source the ` .env ` file into your login shell for some purpose, do ` export $(grep -v '^#' .env | xargs) ` ).
91
97
92
98
Initialize the database, create an admin user:
99
+
93
100
``` bash
94
101
./manage.py migrate --no-input --run-syncdb
95
102
# ./manage.py migrate contenttypes
@@ -109,25 +116,29 @@ Initialize the database, create an admin user:
109
116
```
110
117
111
118
### Run
119
+
112
120
``` bash
113
121
source venv/bin/activate
114
122
DEBUG=yes python3.6 manage.py runserver 0.0.0.0:8000
115
123
```
116
124
117
125
#### Run Celery
126
+
118
127
``` bash
119
128
celery -A laxy worker -B -E -Ofair -l info \
120
129
--statedb=laxy_celery_worker.state
121
130
```
122
131
123
132
#### Run Celery Flower to monitor work queue
133
+
124
134
``` bash
125
135
FLOWER_BASIC_AUTH=user:pass celery -A laxy flower --port=5555
126
136
```
127
137
128
- OpenAPI / Swagger API (via drf_openapi):
129
- * Docs: http://localhost:8000/swagger/v1/
130
- * JSON: http://localhost:8000/swagger/v1/?format=openapi
138
+ OpenAPI / Swagger API (via drf_openapi):
139
+
140
+ - Docs: http://localhost:8000/swagger/v1/
141
+ - JSON: http://localhost:8000/swagger/v1/?format=openapi
131
142
132
143
DRF CoreAPI docs: http://localhost:8000/coreapi/
133
144
@@ -142,20 +153,20 @@ See notes on [running under Docker Compose](docs/docker.md)
142
153
Reference genomes currently follow the naming and path layout used by iGenomes eg ` Homo_sapiens/Ensembl/GRCh38 ` .
143
154
This is currently both the internal genome ID used by Laxy and the relative path where the downloaded genome is stored.
144
155
145
- * Add the genome to the frontend in ` laxy_frontend/src/config/genomics/genomes.ts `
146
- * Add the genome to the backend in ` laxy_backend/data/genomics/genomes.py `
147
- * (Optional but recommended): Add on-demand downloading of the genome to the appropriate ` run_job.sh ` script
148
- (eg via the ` download_ref_urls ` bash function). Otherwise pre-install it at the correct path.
149
-
156
+ - Add the genome to the frontend in ` laxy_frontend/src/config/genomics/genomes.ts `
157
+ - Add the genome to the backend in ` laxy_backend/data/genomics/genomes.py `
158
+ - (Optional but recommended): Add on-demand downloading of the genome to the appropriate ` run_job.sh ` script
159
+ (eg via the ` download_ref_urls ` bash function). Otherwise pre-install it at the correct path.
160
+
150
161
This is documented here in the hopes it can be streamlined in the future (eg via simple genome 'service').
151
162
152
163
#### Adding a new pipeline version
153
164
154
- Currently only possible for ` rnasik ` , and ugly around the edges.
165
+ Currently only possible for ` rnasik ` , and ugly around the edges.
155
166
This process will be refined as pipeline are made more modular/pluggable.
156
167
157
168
Create a directory ` laxy_backend/templates/job_scripts/rnasik/{version}/input ` , where ` {version} ` is the new pipeline version.
158
- Create a ` conda_environment.yml ` file in this directory. Follow the examples for other versions, changing the
169
+ Create a ` conda_environment.yml ` file in this directory. Follow the examples for other versions, changing the
159
170
appropriate version numbers for packages and the environment name.
160
171
161
172
Add the version number to the ` pipeline_versions ` list in ` laxy_frontend/src/components/PipelineParams.vue ` .
0 commit comments