GBrowse
GBrowse
GBrowse and LDAS
Contents
Introductory reading
Donlin (2009) Using the Generic Genome Browser (GBrowse). Curr Protoc Bioinformatics Chapter 9:Unit 9.9. (pmid: 19957275) |
Dowell et al. (2001) The distributed annotation system. BMC Bioinformatics 2:7. (pmid: 11667947) |
GBrowse
GBrowse:viewing annotations
Viewing anotations in GBrowse is actually quite straightforward.
If you study the section on third-party annotations in the GBrowse tutorial, you will notice that you can load GFF files from a remote server. So all you actually need to do is write a cgi-script that uploads a GFF formatted record. Try the following: put the following file into your /usr/local/apache/cgi-bin directory, call it annotest:
#!/usr/bin/perl -w use strict; print"Content-type: text/plain\n"; # MIME header print "\n"; # Blank line: payload begins here print "ctgA example motif 1 15000 . + . Motif mxy ; Note \"this is a test\""; exit;
Note the special MIME type text/plain!
Now first execute this by typing into your browser:
http://localhost/cgi-bin/annotest
Then acess the GBrowse tutorial volvox example and type the same URL into the URL field for "Add remote annotations"...
This shows the principle. Of course, to do something useful, we would like to send some parameters with the request. Type the following script and save it as /usr/local/apache/cgi-bin/annotate. Set the right ownership (sudo chown root annotate) and permissions (sudo chmod 755 annotate).
#!/usr/bin/perl -w # reads input from CGI in the form # http://localhost/cgi-bin/annotate?id=ctgA;start=1020;end=12250;accession=1XYZ:20..250 # returns an annotation in GFF format; # cf. http://www.sanger.ac.uk/Software/formats/GFF/GFF_Spec.shtml use strict; use CGI; my $input = CGI->new(); my $acc_ID = 'XXX'; my $acc_start = '000'; my $acc_end = '000'; my $accession=$input->param('accession'); if ($accession =~ m/^([^:]+):(\d+)\.\.(\d+)$/) { $acc_ID = $1; $acc_start = $2; $acc_end = $3; } my $seqid = $input->param('id'); my $source = "Annotbot"; my $type = "region"; # cf. SOFA ontology # http://cvs.sourceforge.net/viewcvs.py/song/ontology/sofa.ontology my $start = $input->param('start'); my $end = $input->param('end'); my $score = 0.0; my $strand = '-'; my $phase = 0; my @attributes; $attributes[0]= "$type \"Test annotation\";"; $attributes[1]= "Note \"Accession No. $acc_ID from $acc_start to $acc_end\";"; print"Content-type: text/plain\n"; # MIME header print "\n"; # Blank line: payload begins here print "$seqid\t"; print "$source\t"; print "$type\t"; print "$start\t"; print "$end\t"; print "$score\t"; print "$strand\t"; print "$phase\t"; foreach my $att (@attributes) { print $att; } exit;
Then try this out by typing the following into your browser
http://localhost/cgi-bin/annotate?id=ctgA;start=1020;end=1250;accession=1XYZ:20..250
... and finally paste this into the "remote annotations" field of the Volvox example database. Then try changing some of the parameters.
Gbrowse installation
(Outdated: written 2006)
Refer to http://www.gmod.org/ to ensure the installation instructions are current.
- Download
- 1. navigate to the GMOD download pages on sourceforge
- 2. Find the most recent version of the Generic-Genome-Browser (1.64 as of this writing). Download this compressed archive.
- 3. open a terminal session, navigate to your download directory and type the usual (remember to use the tab key for filename completion :-):
gunzip Generic-Genome-Browser-1.64.tar.gz tar -xvf Generic-Genome-Browser-1.64.tar cd Generic-Genome-Browser-1.64
- Compile
Before you continue, read through the entire page of installatio information. There is information on how to install into non-default directories and how to install without requiring root access, and this may be useful for your specific situation. If you decide to go the default way, it is simply a question of typing:
perl Makefile.PL make sudo make install make clean
- Test
The installation instruction page discuss a quick test run with data that is supplied in the installation. Point your browser to http://localhost/cgi-bin/gbrowse (of course your Apache server has to be running for this to work).
More instructions and a more detailed tutorial are found at http://localhost/gbrowse/tutorial/tutorial.html .
LDAS
Notes for using the LDAS server.
/usr/local/mysql/bin/mysqladmin -uroot -p create dicty /usr/local/mysql/bin/mysql -uroot -p dicty mysql> grant all privileges on dicty.* to developer@localhost; mysql> grant file on *.* to developer@localhost; mysql> grant select on dicty.* to nobody@localhost; mysql> quit;
Test installation by typing into browser:
localhost/cgi-bin/das/dsn
LDAS installation
(Outdated: written 2006)
- Download
- 1. navigate to the download directory for LDAS:
- 2. Find the most recent LDAS version - it is 1.12 as of this writing and should be aliased to LDasServer.tar.gz. Download this compressed archive.
- 3. open a terminal session, navigate to your download directory and type the usual:
gunzip LDasServer.tar.gz tar -xvf LDasServer.tar cd LDasServer-1.12
- Compile
The compile and installation for LDAS is standard and all of the prerequisites should be installed by now (except for the optional Apache mod perl). Refer to the LDAS documentation page. Contrary to this information Bio::DB::GFF should already have been installed with the main BioPerl installation. To confirm this, type
perl -e "use Bio::DB::GFF"
if this causes an error, you need to install that package separately.
Type:
sudo perl Makefile.PL
Contrary to normal usage, you have to sudo this script since it creates a subdirectory to apache/conf and you may not normally have write access. You'll have to remember where your apache directories are located ... also I prefer to keep applications I install in /usr/local/bin, not in the (default) /usr/bin/. Then type
make make test sudo make install make clean
Then follow the specific instructions on the LDAS documentation page for configuration and test.
- That should be all
Further reading and resources
GMOD Generic Model Organism Database project [ link ] [ page ] Expand... | ![]() |