Skip to content

Commit 4adff0c

Browse files
committed
added code boxes
1 parent 74d657a commit 4adff0c

File tree

1 file changed

+43
-30
lines changed

1 file changed

+43
-30
lines changed

README.md

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# easy_gdb
1+
# Easy GDB
22

33
Welcome to easy GDB, this tool will help you to create your own genomic database with tools such as BLAST, Genome browser (JBrowse),
44
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
1616

1717
Lets install git to download the easy GDB code and PHP to be able to run the web.
1818
```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
2222
```
2323
#### Set up server
2424
In a server (not mandatory for local instalations) you would need to use Apache or Nginx webservers to host your application in a server.
2525

2626
```bash
27-
sudo apt-get install apache2
27+
sudo apt-get install apache2
2828

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
3434
```
3535

3636

3737
#### Install BLAST
3838
```bash
39-
apt-get install ncbi-blast+
39+
apt-get install ncbi-blast+
4040
```
4141

4242

@@ -46,21 +46,25 @@ To install Postgres you can follow the instructions at:
4646
https://www.postgresql.org/download/linux/ubuntu/
4747

4848
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
4954

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+
```
5858
##### In server
59+
```bash
5960
sudo service apache2 restart
61+
```
6062

6163
##### locally, stop local server and run again
6264

63-
php -S localhost:8000
65+
```bash
66+
php -S localhost:8000
67+
```
6468

6569
##### Set up easy_gdb database
6670
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
7074
```
7175

7276
##### Set up password
73-
sudo -u postgres psql postgres
74-
77+
78+
```bash
79+
sudo -u postgres psql postgres
80+
```
81+
7582
```sql
7683
\du
7784
\password postgres
@@ -87,17 +94,19 @@ CREATE DATABASE annot1;
8794

8895
##### Change role password
8996
##### Connect to postgres console and change password (not visible)
97+
```bash
9098
psql -h localhost -U postgres
91-
99+
```
92100
```sql
93101
\password web_usr
94102
type a new password
95103
\q
96104
```
97105

98106
##### Import annotation schema to database
107+
```bash
99108
example_db$ psql –U postgres –d annot1 –h localhost –a –f easy_gdb/scripts/create_tea_schema2.sql
100-
109+
```
101110

102111
#### Install Perl dependencies
103112
apt-get install cpanminus
@@ -109,7 +118,9 @@ example_db$ psql –U postgres –d annot1 –h localhost –a –f easy_gdb/scr
109118
#### load local-lib in Perl5lib
110119
apt-get install vim
111120
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+
113124
export PERL5LIB=/home/your_username/local-lib/lib/perl5:$PERL5LIB
114125
source ~/.bashrc
115126

@@ -127,26 +138,26 @@ in the link query_id will be replaced by the gene name or annotation term.
127138

128139

129140

130-
131141
## Set up easy GDB using the template example
132142

133143
mkdir example_db
134144
cd example_db
135145

146+
136147
git clone https://github.com/noefp/easy_gdb.git
137148

149+
138150
php -S localhost:8000
139151

140152
in web browser `localhost:8000/easy_gdb/`
141153

142154

143155
![easy GDB home](templates/egdb_img_samples/easy_gdb_home.png)
144-
Format: ![Alt Text](url)
145156

146157
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 .
150161

151162
open `example_db/easy_gdb/configuration_path.php` and set the configuration path
152163
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
300311

301312
data/easy_gdb_sample/trackList.json
302313

314+
```json
303315
{
304316
"category" : "02 Annotations",
305317
"compress" : 0,
@@ -318,6 +330,7 @@ data/easy_gdb_sample/trackList.json
318330
"type" : "CanvasFeatures",
319331
"urlTemplate" : "tracks/egdb_gene_models/{refseq}/trackData.json"
320332
}
333+
```
321334

322335
data/easy_gdb_sample/tracks.conf
323336

0 commit comments

Comments
 (0)