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: database/expression-database/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ All files pertaining the expression database live within this directory.
6
6
7
7
#### Schema
8
8
9
-
All network data is stored within the fall2021 schema on our Postgres database.
9
+
All network data is stored within the gene_expression schema on our Postgres database.
10
10
11
-
The schema is located within this directory at the top level in the file `schema.sql`. It defines the tables located within the fall2021 schema.
11
+
The schema is located within this directory at the top level in the file `schema.sql`. It defines the tables located within the gene_expression schema.
-- FOREIGN KEY (gene_id, ncbi_geo_id, pubmed_id) REFERENCES fall2021.degradation_rate(gene_id, ncbi_geo_id, pubmed_id) -- not sure if we want to link the generated production rate to it's original degradation rate
70
+
-- FOREIGN KEY (gene_id, ncbi_geo_id, pubmed_id) REFERENCES gene_expression.degradation_rate(gene_id, ncbi_geo_id, pubmed_id) -- not sure if we want to link the generated production rate to it's original degradation rate
Copy file name to clipboardExpand all lines: database/network-database/README.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ All files pertaining the network database live within this directory.
6
6
7
7
### Schema
8
8
9
-
All network data is stored within the spring2022_network schema on our Postgres database.
9
+
All network data is stored within the gene_regulatory_network schema on our Postgres database.
10
10
11
-
The schema is located within this directory at the top level in the file `schema.sql`. It defines the tables located within the spring2022_network schema.
11
+
The schema is located within this directory at the top level in the file `schema.sql`. It defines the tables located within the gene_regulatory_network schema.
12
12
13
13
Usage:
14
14
To load to local database
@@ -32,10 +32,13 @@ Within the scripts directory, there are the following files:
This script (`generate_network.py`) is a two-for-one. It first uses the yeastmine service from the SGD database to query for all regulator genes relating to Saccharomyces cerevisiae. From there it gets all all of the targets for each regulator gene. We then construct two networks from these connections (a regulator by regulator matrix as well as a regulator by target matrix). We also construct the processed loader files, so that they are ready to load using `loader.py`.
This script (`loader.py`) is to be used to load your preprocessed genes into the database.
53
56
@@ -62,6 +65,35 @@ To load to production database
62
65
```
63
66
python3 loader.py | psql <address to database>
64
67
```
68
+
#### Network Generator (and data preprocessor) (FOR UPDATES TO EXISTING DATABASE ONLY)
69
+
70
+
This script (`generate_new_network_verion.py`) is similar to its counterpart `generate_network.py`. It gets all existing genes in the database using the environment variable 'DB_URL'. You can set this environment variable on the terminal right before the command. It uses the yeastmine service from the SGD database to query for all regulator genes relating to Saccharomyces cerevisiae. From there it gets all all of the targets for each regulator gene. We then construct two networks from these connections (a regulator by regulator matrix as well as a regulator by target matrix). We then see if the genes in the newly constructed network have any updates (i.e a gene's standard name was set or a new gene was added to the database). We also construct the processed loader files, so that they are ready to load using `loader_updates.py`.
71
+
72
+
The resulting network matrices are located in `script-results/networks` and the resulting processed loader files are located within `script-results/processed-loader-files`
73
+
74
+
Make sure to have all dependencies installed beforehand or you will recieve errors. (pip3 install intermine, tzlocal, etc. [see file for all imports]
75
+
76
+
Usage:
77
+
```
78
+
DB_URL="postgresql://[<db_user>:<password>]@<address to database>/<database name>" python3 generate_new_network_version.py
79
+
```
80
+
#### Database Loader (FOR UPDATES TO EXISTING DATABASE ONLY)
81
+
82
+
This script (`loader_updates.py`) is to be used to load your preprocessed genes into the database.
83
+
84
+
This program generates direct SQL statements from the source files generated by the network generator in order to populate a relational database with those files’ data as well as make any needed updates to existing genes within the database. If necessary you will be prompted to enter a password.
0 commit comments