diff --git a/README.md b/README.md index 0e5d4d7..c72e655 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,79 @@ # SEAL db - Simple, Efficient And Lite database for NGS +![seal.gif](docs/img/seal.gif) + +SEAL db is a Python project that provides a simple, efficient, and lightweight +database for Next Generation Sequencing (NGS) data. SEAL db is built with the +Flask framework and uses PostgreSQL as the backend database. It includes a web +interface that allows users to upload and query NGS data. + +__Please report any issue [here](https://github.com/mobidic/SEAL/issues/new)__ + ## Installation -First of all clone the repo : +To install SEAL db, first clone the repository from GitHub: + ```bash git clone https://github.com/mobidic/seal.git ``` +SEAL db requires several dependencies to be installed, which can be done either +with Conda or manually. + ### Install dependencies #### With Conda -Please install conda ([documentation here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)) +To install dependencies with Conda, first install Conda if it is not already installed. Conda installation instructions can be found ([here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)) + +After installing Conda, create a new environment using the environment.yml file +provided with SEAL db: `conda env create -f environment.yml` -#### VEP +#### Installing VEP > __If you have install all dependencies from conda you need to activate your -environment by launching this command :__ `conda activate seal` +environment by launching this command:__ `conda activate seal` -You need to complete VEP installation (https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#installer) : -`vep_install -a cf -s homo_sapiens -y GRCh37 -c /output/path/to/GRCh37/vep --CONVERT` +After installing dependencies, you need to install VEP (Variant Effect +Predictor), which is used by SEAL db to annotate variants. The installation +instructions for VEP can be found +[here](https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#installer). + +For conda environment: -##### Plugins +`vep_install -a cf -s homo_sapiens -y GRCh37 -c /output/path/to/GRCh37/vep --CONVERT` -Install VEP plugins (https://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html) : +After installing VEP, you need to install several VEP plugins that are used by +SEAL db: - dbNSFP - MaxEntScan - SpliceAI - dbscSNV - GnomAD +The installation instructions for VEP plugins can be found ([here](https://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html)). + *__A more complete guide will be written soon__* -### Configuration of the app +### Configuration + +After installing dependencies and VEP, you need to configure the app by editing +two files: +- `seal/static/vep.config.json` +- `seal/config.yaml` -- Please edit file `seal/static/vep.config.json` and replace those variable: - - `{dir_vep}` => `/path/to/vep` - - `{dir_vep_plugins}` => `/path/to/vep/plugins` - - `{GnomAD_vcf}` => `/path/to/gnomad.vcf` - - `{fasta}` => `/path/to/genome.fa.gz` +In `seal/static/vep.config.json`, replace the following variables with the appropriate paths: +- `{dir_vep}` => `/path/to/vep` +- `{dir_vep_plugins}` => `/path/to/vep/plugins` +- `{GnomAD_vcf}` => `/path/to/gnomad.vcf` +- `{fasta}` => `/path/to/genome.fa.gz` -- Please edit file `seal/config.yaml` : - - create your secret app key. - - you can edit following what you need +In `seal/config.yaml`, create your secret app key and edit other settings as +needed. -### Initialise Database +### Initialization of the database > If you install all dependencies with conda make sure to activate the > environment : @@ -54,65 +81,61 @@ Install VEP plugins (https://www.ensembl.org/info/docs/tools/vep/script/vep_plug > conda activate seal > ``` -> __This section is a bit tricky. We work on it to simplify the process.__ +> comment line on `seal/__init__.py` (see [#26](https://github.com/mobidic/SEAL/issues/26)) +> ```python +> # from seal import routes +> # from seal import schedulers +> # from seal import admin +> ``` + +To initialise the database, start the database server and run the following +commands: -- Start database server ```bash initdb -D ${PWD}/seal/seal.db pg_ctl -D ${PWD}/seal/seal.db -l ${PWD}/seal/seal.db.log start +python insertdb.py +flask --app seal --debug db init +flask --app seal --debug db migrate -m "Init DataBase" ``` -- Issue [#26](https://github.com/mobidic/SEAL/issues/26) - - comment line on `seal/__init__.py` - ```python - # from seal import routes - # from seal import schedulers - # from seal import admin - ``` -- Initialize database + +> uncomment line on `seal/__init__.py` (see [#26](https://github.com/mobidic/SEAL/issues/26)) +> ```python +> from seal import routes +> from seal import schedulers +> from seal import admin +> ``` The database will be intialise with an admin user : - - username : `admin` - - password : `password` -```bash -python insertdb.py -flask db init -flask db migrate -m "Init DataBase" -``` -- __[Optional]__ Add Gene as Region (usefull to create _in-silico_ panels) +- username : `admin` +- password : `password` + +Optionally, you can also add gene regions and OMIM data to the database. + ```bash wget -qO- http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/ncbiRefSeq.txt.gz | gunzip -c - | awk -v OFS="\t" '{ if (!match($13, /.*-[0-9]+/)) { print $3, $5-2000, $6+2000, $13; } }' - | sort -u > ncbiRefSeq.hg19.sorted.bed python insert_genes.py ``` -- __[Optional]__ Add OMIM (for transmission and relative diseases) __/!\ YOU NEED AN OMIM ACCESS TO DOWNLOAD FILE__ ```bash wget -qO- https://data.omim.org/downloads/{{YOUR API KEY}}/genemap2.txt python insert_OMIM.py ``` -- Issue [#26](https://github.com/mobidic/SEAL/issues/26) - - uncomment line on `seal/__init__.py` - ```python - from seal import routes - from seal import schedulers - from seal import admin - ``` -### Launch the app +### Launching the App -Now you can launch the app : +Finally, to launch the app, run the following command: ``` flask --app seal --debug run ``` -__Please report any issue [here](https://github.com/mobidic/SEAL/issues/new)__ - ## Tips & Tricks -Here are listed some usefull *Tips & Tricks*. +Here are some useful *Tips & Tricks* working with SEAL: - Update database ```bash -flask db migrate -m "message" -flask db upgrade +flask --app seal --debug db migrate -m "message" +flask --app seal --debug db upgrade ``` - Start/Stop the datatabase server ```bash diff --git a/docs/img/seal.gif b/docs/img/seal.gif new file mode 100644 index 0000000..774211e Binary files /dev/null and b/docs/img/seal.gif differ