diff --git a/compose/gbrowse/README.md b/compose/gbrowse/README.md index fd6bd9e..99f081b 100644 --- a/compose/gbrowse/README.md +++ b/compose/gbrowse/README.md @@ -118,3 +118,38 @@ $ chown -R www-data.www-data volvox ``` [gbrowse-admin-tutorial]: http://cloud.gmod.org/gbrowse2/tutorial/tutorial.html + +Configuring gbrowse_syn +----------------------- + +### Create a MySQL database + +Connect to a MySQL instance and create `rice_synteny` database: + +``` +$ docker-compose run --no-deps --rm db mysql -h db -u root --password=my-secret-pw +mysql> CREATE USER gbrowsero IDENTIFIED BY 'gbrowseropass' ; +mysql> CREATE DATABASE rice_synteny ; +mysql> GRANT SELECT ON rice_synteny.* TO gbrowsero@'%'; +mysql> exit +``` + +### Load alignment into database + +Launch a gbrowse container: + +``` +$ docker-compose run --no-deps --rm gbrowse /bin/bash +$ cd /var/lib/gbrowse2/databases/gbrowse_syn/alignments +$ gzip -d rice.aln.gz +$ zcat rice.aln.gz perl | /usr/local/bin/gbrowse_syn_load_alignments_msa.pl -u root -p my-secret-pw --dsn='dbi:mysql:database=rice_synteny;host=db' -f clustalw -v -c - +``` + +Then reach `gbrowse_syn` from this [link][local-gbrowse_syn]. More information on +`gbrowse_syn` could be found [here][gbrowse_syn] and [here][gbrowse_syn_help]. More information on loading alignments +and `gbrowse_syn` scripts in general could be found [here][gbrowse_syn-script] + +[local-gbrowse_syn]: http://localhost:10080/gb2/gbrowse_syn/ +[gbrowse_syn]: http://gmod.org/wiki/GBrowse_syn +[gbrowse_syn_help]: http://gmod.org/wiki/GBrowse_syn_Help +[gbrowse_syn-script]: http://gmod.org/wiki/GBrowse_syn_Script diff --git a/compose/gbrowse/gbrowse/conf.d/GBrowse.conf b/compose/gbrowse/gbrowse/conf.d/GBrowse.conf index 42c048f..f47ac26 100644 --- a/compose/gbrowse/gbrowse/conf.d/GBrowse.conf +++ b/compose/gbrowse/gbrowse/conf.d/GBrowse.conf @@ -4,7 +4,7 @@ [GENERAL] config_base = /etc/gbrowse2 # overridden by environment variable GBROWSE_CONF -htdocs_base = /usr/local/apache2/htdocs/gbrowse2 +htdocs_base = /var/www/html/gbrowse2 url_base = /gbrowse2 tmp_base = /var/tmp/gbrowse2 persistent_base = /var/lib/gbrowse2 diff --git a/compose/gbrowse/gbrowse/conf.d/synteny/oryza.synconf.disabled.conf b/compose/gbrowse/gbrowse/conf.d/synteny/oryza.synconf similarity index 91% rename from compose/gbrowse/gbrowse/conf.d/synteny/oryza.synconf.disabled.conf rename to compose/gbrowse/gbrowse/conf.d/synteny/oryza.synconf index c630367..ed67372 100644 --- a/compose/gbrowse/gbrowse/conf.d/synteny/oryza.synconf.disabled.conf +++ b/compose/gbrowse/gbrowse/conf.d/synteny/oryza.synconf @@ -2,7 +2,7 @@ description = BLASTZ alignments for Oryza sativa # The synteny database -join = dbi:mysql:database=rice_synteny;host=localhost;user='www-data' +join = dbi:mysql:database=rice_synteny;host=db;user=gbrowsero;password=gbrowseropass # This option maps the relationship between the species data sources, names and descriptions # The value for "name" (the first column) is the symbolic name that gbrowse_syn users to identify each species. @@ -15,7 +15,7 @@ join = dbi:mysql:database=rice_synteny;host=localhost;user='www-data' source_map = rice rice_synteny "Domesic Rice (O. sativa)" wild_rice wild_rice_synteny "Wild Rice" -tmpimages = /var/tmp/gbrowse2 +tmpimages = tmp imagewidth = 800 stylesheet = /gbrowse2/css/gbrowse_transparent.css cache time = 1 diff --git a/compose/gbrowse/gbrowse/conf.d/synteny/rice_synteny.conf b/compose/gbrowse/gbrowse/conf.d/synteny/rice_synteny.conf index a619dc8..c08a10f 100644 --- a/compose/gbrowse/gbrowse/conf.d/synteny/rice_synteny.conf +++ b/compose/gbrowse/gbrowse/conf.d/synteny/rice_synteny.conf @@ -6,7 +6,7 @@ db_args = -adaptor memory # Web site configuration info -tmpimages = /var/tmp/gbrowse2 +tmpimages = tmp [EG] feature = gene:ensembl diff --git a/compose/gbrowse/gbrowse/conf.d/synteny/wild_rice_synteny.conf b/compose/gbrowse/gbrowse/conf.d/synteny/wild_rice_synteny.conf index 04e9b64..0e9d88f 100644 --- a/compose/gbrowse/gbrowse/conf.d/synteny/wild_rice_synteny.conf +++ b/compose/gbrowse/gbrowse/conf.d/synteny/wild_rice_synteny.conf @@ -6,7 +6,7 @@ db_args = -adaptor memory # Web site configuration info -tmpimages = /var/tmp/gbrowse2 +tmpimages = tmp ################## TRACK CONFIGURATION #################### # the remainder of the sections configure individual tracks