1
- # easy_gdb
1
+ # Easy GDB
2
2
3
3
Welcome to easy GDB, this tool will help you to create your own genomic database with tools such as BLAST, Genome browser (JBrowse),
4
4
file downloads, sequence extraction, annotation search, bulk annotation extraction and gene list lookup.
@@ -16,27 +16,27 @@ In most of the servers is probable that some of the tools needed are already ins
16
16
17
17
Lets install git to download the easy GDB code and PHP to be able to run the web.
18
18
``` bash
19
- sudo apt-get update
20
- apt-get install git
21
- apt-get install php
19
+ sudo apt-get update
20
+ apt-get install git
21
+ apt-get install php
22
22
```
23
23
#### Set up server
24
24
In a server (not mandatory for local instalations) you would need to use Apache or Nginx webservers to host your application in a server.
25
25
26
26
``` bash
27
- sudo apt-get install apache2
27
+ sudo apt-get install apache2
28
28
29
- cd /etc/apache2/
30
- sudo cp 000-default.conf easy_gdb.conf
31
- sudo a2dissite 000-default.conf
32
- sudo a2ensite easy_gdb.conf
33
- systemctl reload apache2
29
+ cd /etc/apache2/
30
+ sudo cp 000-default.conf easy_gdb.conf
31
+ sudo a2dissite 000-default.conf
32
+ sudo a2ensite easy_gdb.conf
33
+ systemctl reload apache2
34
34
```
35
35
36
36
37
37
#### Install BLAST
38
38
``` bash
39
- apt-get install ncbi-blast+
39
+ apt-get install ncbi-blast+
40
40
```
41
41
42
42
@@ -46,21 +46,25 @@ To install Postgres you can follow the instructions at:
46
46
https://www.postgresql.org/download/linux/ubuntu/
47
47
48
48
The next commands worked well at the time this documentation was writen:
49
+ ``` bash
50
+ sudo sh -c ' echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
51
+ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
52
+ sudo apt-get update
53
+ sudo apt-get -y install postgresql-10
49
54
50
- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
51
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
52
- sudo apt-get update
53
- sudo apt-get -y install postgresql-10
54
-
55
- sudo apt-get install libpq-dev
56
- sudo apt-get install php7.2-pgsql
57
-
55
+ sudo apt-get install libpq-dev
56
+ sudo apt-get install php7.2-pgsql
57
+ ```
58
58
##### In server
59
+ ``` bash
59
60
sudo service apache2 restart
61
+ ```
60
62
61
63
##### locally, stop local server and run again
62
64
63
- php -S localhost:8000
65
+ ``` bash
66
+ php -S localhost:8000
67
+ ```
64
68
65
69
##### Set up easy_gdb database
66
70
open the file ` example_db/egdb_files/egdb_template_conf/database_access.php `
@@ -70,8 +74,11 @@ function getConnectionString(){return "host=localhost dbname=annot1 user=web_usr
70
74
```
71
75
72
76
##### Set up password
73
- sudo -u postgres psql postgres
74
-
77
+
78
+ ``` bash
79
+ sudo -u postgres psql postgres
80
+ ```
81
+
75
82
``` sql
76
83
\du
77
84
\password postgres
@@ -87,17 +94,19 @@ CREATE DATABASE annot1;
87
94
88
95
##### Change role password
89
96
##### Connect to postgres console and change password (not visible)
97
+ ``` bash
90
98
psql -h localhost -U postgres
91
-
99
+ ```
92
100
``` sql
93
101
\password web_usr
94
102
type a new password
95
103
\q
96
104
```
97
105
98
106
##### Import annotation schema to database
107
+ ``` bash
99
108
example_db$ psql –U postgres –d annot1 –h localhost –a –f easy_gdb/scripts/create_tea_schema2.sql
100
-
109
+ ```
101
110
102
111
#### Install Perl dependencies
103
112
apt-get install cpanminus
@@ -109,7 +118,9 @@ example_db$ psql –U postgres –d annot1 –h localhost –a –f easy_gdb/scr
109
118
#### load local-lib in Perl5lib
110
119
apt-get install vim
111
120
vim ~/.bashrc
112
- (add the line below at the end of the file. Remember to change your user name)
121
+
122
+ Add the line below at the end of the file. Remember to change your user name.
123
+
113
124
export PERL5LIB=/home/your_username/local-lib/lib/perl5:$PERL5LIB
114
125
source ~/.bashrc
115
126
@@ -127,26 +138,26 @@ in the link query_id will be replaced by the gene name or annotation term.
127
138
128
139
129
140
130
-
131
141
## Set up easy GDB using the template example
132
142
133
143
mkdir example_db
134
144
cd example_db
135
145
146
+
136
147
git clone https://github.com/noefp/easy_gdb.git
137
148
149
+
138
150
php -S localhost:8000
139
151
140
152
in web browser ` localhost:8000/easy_gdb/ `
141
153
142
154
143
155
![ easy GDB home] ( templates/egdb_img_samples/easy_gdb_home.png )
144
- Format: ![ Alt Text] ( url )
145
156
146
157
example_db$ mkdir egdb_files
147
- cd egdb_files
148
- cp -r ../easy_gdb/templates/egdb_template_conf .
149
- cp -r ../easy_gdb/templates/egdb_img_samples .
158
+ example_db$ cd egdb_files
159
+ egdb_files$ cp -r ../easy_gdb/templates/egdb_template_conf .
160
+ egdb_files$ cp -r ../easy_gdb/templates/egdb_img_samples .
150
161
151
162
open ` example_db/easy_gdb/configuration_path.php ` and set the configuration path
152
163
path to ` example_db/egdb_files/egdb_template_conf `
@@ -300,6 +311,7 @@ The variable `$max_lookup_input` (in `easyGDB_conf.php`) controls the maximum nu
300
311
301
312
data/easy_gdb_sample/trackList.json
302
313
314
+ ``` json
303
315
{
304
316
"category" : " 02 Annotations" ,
305
317
"compress" : 0 ,
@@ -318,6 +330,7 @@ data/easy_gdb_sample/trackList.json
318
330
"type" : " CanvasFeatures" ,
319
331
"urlTemplate" : " tracks/egdb_gene_models/{refseq}/trackData.json"
320
332
}
333
+ ```
321
334
322
335
data/easy_gdb_sample/tracks.conf
323
336
0 commit comments