You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-24Lines changed: 18 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,19 @@ Backend part of the OmicsPred Project
8
8
## Roles
9
9
Manage import, querying and retrieval of the OmicsPred metadata:
10
10
11
-
* Scripts to import the metadata and generate the genetic scoring files (app [imports](https://github.com/OmicsPred/omicspred_backend/tree/main/imports))
* Scripts to import the metadata and generate the genetic scoring files (app [imports](https://github.com/OmicsPred/omicspred_backend/tree/main/imports) -> [README](https://github.com/OmicsPred/omicspred_backend/tree/main/imports/README.md))
12
+
* Scripts to export the metadata and data (app [exports](https://github.com/OmicsPred/omicspred_backend/tree/main/exports))
13
+
* Access the databases (apps [omicspred](https://github.com/OmicsPred/omicspred_backend/tree/main/omicspred), [plot](https://github.com/OmicsPred/omicspred_backend/tree/main/plot)) *[read & write]*
13
14
* Provide private (accessible by the website) and public REST APIs (app [rest_api](https://github.com/OmicsPred/omicspred_backend/tree/main/rest_api)) *[read only]*
14
15
* Build and query the search engine (app [search_es](https://github.com/OmicsPred/omicspred_backend/tree/main/search_es)) using ElasticSearch *[read & write]*
15
16
16
17
## Softwares / tools
17
18
18
-
19
19
| Tool | Role | Version |
20
20
| ---- | ---- | ------- |
21
-
|[PostgreSQL](https://www.postgresql.org/)| Database to store and query metadata | >= 15|
22
-
|[ElasticSearch](https://www.elastic.co/)| Server used as search engine |7.xx (e.g. 7.17) |
23
-
|[Django ](https://www.djangoproject.com/)| Python framework to communicate with the database, the ElasticSearch indexes and build a REST API |5.2.x (e.g. 5.2.5) |
21
+
|[PostgreSQL](https://www.postgresql.org/)| Database to store and query metadata | >= 18|
22
+
|[ElasticSearch](https://www.elastic.co/)| Server used as search engine |8.xx (e.g. 8.19) |
23
+
|[Django ](https://www.djangoproject.com/)| Python framework to communicate with the database, the ElasticSearch indexes and build a REST API |6.0.x (e.g. 6.0.7) |
24
24
25
25
26
26
## Setup
@@ -43,27 +43,18 @@ Go to root of the repository (e.g. `cd .../omicspred_backend`)
43
43
44
44
* Create **ElasticSearch** indexes
45
45
46
-
* Main indexes
47
-
48
-
```bash
49
-
python manage.py search_index --rebuild -f
50
-
```
51
-
52
-
* Phenotype index
46
+
```bash
47
+
python manage.py search_index --create
48
+
```
53
49
54
-
* In *search_es/indexes.py*, comment all the lines and uncomment the PhenotypeDocument line
55
-
* In *applications/models.py*, replace the line `applications_db = 'applications'` by `applications_db = 'default'`
56
-
* In *config/settings.py*:
57
-
* Comment the `DATABASE[‘default’]` items
58
-
* Rename `DATABASE[‘applications’]` by `DATABASE[‘default’]`
59
-
* Run script
50
+
> [!WARNING]
51
+
> The indexing of the scores takes few hours (2-3h)!
60
52
61
-
```bash
62
-
python manage.py search_index --rebuild -f
63
-
```
53
+
To rebuild existing OmicsPred indexes:
64
54
65
-
> [!WARNING]
66
-
> Do not forget to revert all these changes after generating the Phenotype search index!
55
+
```bash
56
+
python manage.py search_index --rebuild -f
57
+
```
67
58
68
59
* For **local** deployment, run the command:
69
60
@@ -95,6 +86,9 @@ To run the tests manually, run the command:
95
86
python manage.py test
96
87
```
97
88
89
+
> [!NOTE]
90
+
> This runs the REST API, exports and imports tests
0 commit comments