-
Clone this repository (with
git clone) -
Put data in
input_data/. There are 3 type of files:input_data/gene/result_gene_<phecode>.txt.gz- format: tab-delimited, including a header row
- columns:
GeneName,Start_Pos,End_Pos,NumofRareVariants,MAC_Case,MAC_Control,Case,Control,p.value - eg,
A3GALT2 1:33306784:I:6 1:33312867:C:T 44 11 732.000087726994 114 11286 0.365819488062416
- columns:
- format: tab-delimited, including a header row
input_data/variant/result_singlevariant_<phecode>.txt.gz- format: tab-delimited, including a header row
- columns:
GeneName,SNP,MAF,MAC_Case,MAC_Control,p.value - eg,
A3GALT2 1:33306784:I:6 1.1e-04 0 5 8.3e-01
- columns:
- format: tab-delimited, including a header row
input_data/phenotype-info.csv(already included in repo)
-
Run
python3 -m pip install -r requirements.txt(or, if running for only your own user,python3 -m pip --user install -r requirements.txt) -
Run
python3 make_sqlite3_db.py(inside thegenes-sitesubdirectory) to produceassoc.db -
Run
python3 make_tables.pyto producestatic/phenotypes.jsonandstatic/genes.json -
Run
python3 make_variant_sqlite3_db.pyto producevariant.db -
Run the server using one of these:
python3 serve.py(insecure and slow, for development/debugging)gunicorn serve:app -k gevent -w4 --bind 0.0.0.0:5000(fast, for production)
Then open http://localhost:5000 in your web browser to access the site. If you are running the site on a remote computer, first start an ssh tunnel (like
ssh -L 5000:localhost:5000 <user>@<server>) if on Mac/Linux or follow directions if on Windows. -
To deploy your changes to the server:
- If you changed the data in
input_data, copy them to the server's directory/home/pjvandehaar/genes-site/input_data. - If you changed the files
assoc.db,static/phenotypes.json,static/genes.json, orvariant.db, copy them to/home/pjvandehaar/genes-site/genes-siteon the server (and replace the files currently there), or just run the commands to re-generate them on the server. - Run
git pushto push your code to GitHub, and then on the server runcd /home/pjvandehaar/genes-site && sudo git pull && sudo systemctl restart gunicorn-genes-site.
- If you changed the data in
leeshawn/genes-site
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|