Difference between revisions of "GBrowse syn Tutorial"
(→Setting up the Alignment Database) |
|||
Line 28: | Line 28: | ||
* First, update {{CPAN|Bio::Graphics}} | * First, update {{CPAN|Bio::Graphics}} | ||
<div class="indent"> | <div class="indent"> | ||
− | $ | + | $ sudo cpan -i Bio::Graphics |
</div> | </div> | ||
* Then install GBrowse 2 from CPAN. | * Then install GBrowse 2 from CPAN. | ||
Line 69: | Line 69: | ||
2) Give read-only (SELECT privileges in SQL) to the default apache user <tt>www-data</tt>. We can do this for all of the MySQL databases, since they are all for web applications | 2) Give read-only (SELECT privileges in SQL) to the default apache user <tt>www-data</tt>. We can do this for all of the MySQL databases, since they are all for web applications | ||
<pre> | <pre> | ||
− | mysql | + | mysql> GRANT SELECT on *.* TO 'www-data'@'localhost'; |
Query OK, 0 rows affected (0.00 sec) | Query OK, 0 rows affected (0.00 sec) | ||
− | mysql | + | mysql> quit |
</pre> | </pre> | ||
3) Decompress the sample alignment data and load the database. You need to have root-level access (be a sudoer) for some of the steps below. | 3) Decompress the sample alignment data and load the database. You need to have root-level access (be a sudoer) for some of the steps below. | ||
<pre> | <pre> | ||
− | $ | + | $ cd /var/www/gbrowse2/databases/gbrowse_syn/alignments/ |
− | $ | + | $ sudo gunzip rice.aln.gz |
Have a look at the first few lines of the data: | Have a look at the first few lines of the data: | ||
− | $ | + | $ head -20 rice.aln |
CLUSTAL W(1.81) multiple sequence alignment W(1.81) | CLUSTAL W(1.81) multiple sequence alignment W(1.81) | ||
Line 107: | Line 107: | ||
4) Load the database with the script <tt>gbrowse_syn_load_alignments_msa.pl</tt>, which is automatically installed along with GBrowse. See the <span class=pops>[http://gmod.org/wiki/GBrowse_syn_Scripts GBrowse_syn scripts]</span> page for details on the options for the script. | 4) Load the database with the script <tt>gbrowse_syn_load_alignments_msa.pl</tt>, which is automatically installed along with GBrowse. See the <span class=pops>[http://gmod.org/wiki/GBrowse_syn_Scripts GBrowse_syn scripts]</span> page for details on the options for the script. | ||
− | $ | + | $ gbrowse_syn_load_alignments_msa.pl -u root -p gmodamericas2010 -d rice_synteny -c -v rice.aln |
There are 1800 alignment blocks, so this will take a little while to run. | There are 1800 alignment blocks, so this will take a little while to run. | ||
Line 191: | Line 191: | ||
1) Make sure the temporary image directory specified in the config files exists and is world-writable | 1) Make sure the temporary image directory specified in the config files exists and is world-writable | ||
<div class="indent"> | <div class="indent"> | ||
− | $ | + | $ sudo mkdir /var/www/tmp |
− | $ | + | $ sudo mkdir /var/www/tmp/gbrowse2 |
− | $ | + | $ sudo chmod 777 /var/www/tmp/gbrowse2 |
</div> | </div> | ||
2) Renaming the configuration file | 2) Renaming the configuration file | ||
<div class="indent"> | <div class="indent"> | ||
− | $ | + | $ cd /etc/gbrowse2/synteny |
− | $ | + | $ sudo mv oryza.synconf.disabled oryza.synconf |
</div> | </div> | ||
Line 228: | Line 228: | ||
<pre> | <pre> | ||
− | $ | + | $ mysql -uroot -pgmodamericas2010 |
− | mysql | + | mysql> create database rice; |
Query OK, 1 row affected (0.00 sec) | Query OK, 1 row affected (0.00 sec) | ||
− | mysql | + | mysql> create database wild_rice; |
Query OK, 1 row affected (0.00 sec) | Query OK, 1 row affected (0.00 sec) | ||
Line 242: | Line 242: | ||
<pre> | <pre> | ||
− | $ | + | $ cd /var/www/gbrowse2/databases/gbrowse_syn/rice |
− | $ | + | $ bp_seqfeature_load.pl -u root -p gmodamericas2010 -d rice -c -f rice.gff3 |
loading rice.gff3... | loading rice.gff3... | ||
Building object tree... | Building object tree... | ||
Line 251: | Line 251: | ||
load time: 11.99s | load time: 11.99s | ||
− | $ | + | $ cd ../wild_rice |
− | $ | + | $ bp_seqfeature_load.pl -u root -p gmodamericas2010 -d wild_rice -c -f wild_rice.gff3 |
loading wild_rice.gff3... | loading wild_rice.gff3... | ||
Building object tree... | Building object tree... | ||
Line 269: | Line 269: | ||
# to | # to | ||
− | + | db_args = -dsn dbi:mysql:rice | |
</pre> | </pre> | ||