100 likes | 227 Views
GBrowse-related work at ApiDB. Haiming Wang ApiDB Bioinformatics Resource Center Dr. Jessica Kissinger Group GMOD Nov 2007. Same database schema – GUS Multi-species – comparative analysis Graphical for protein data. Database adaptor vs GFF. Pros: Live interactive with database
E N D
GBrowse-related work at ApiDB Haiming Wang ApiDB Bioinformatics Resource Center Dr. Jessica Kissinger Group GMOD Nov 2007
Same database schema – GUS • Multi-species – comparative analysis • Graphical for protein data
Database adaptor vs GFF Pros: • Live interactive with database • Flexible with database schema – GUS, Chado • Support complex data type, e.g. synteny, protein data Cons: • Relatively slow – database tuning + bulkSubfeatures • Familiar with SQL
Database Adaptor for GBrowse • Based on the Chado adaptor • Separate queries into a separate config file • Segment->Feature->SubFeature • [GENERAL] • description = PlasmoDB Release 5.3 • db_adaptor = DAS::GUS • database = dbi:Oracle:sid=crypto;host=rad.rcc.uga.edu;port=1521 • user = gususer • pass = pass • db_args = -sqlfile =>$ENV{DOC_ROOT}.'/gbrowse.conf/plasmodb.xml'
features segment
Synteny Browser - SynView Steve Fisher will present it in details later
init_code = sub hover { use HTML::Template; my ($name, $data) = @_; my $tmpl = HTML::Template=>new(filename=>$ENV{ROOT}.'/gbrowse/hover.tmpl'); $tmpl->param(DATA => [ map {{@$_ > 1 ? (KEY=>$_->[0], VALUE => $_->[1]):(SINGLE => $_->[0])}} @$data]); my $str = $tmpl->output; $str =~ s/'/\\'/g; return qq{" onMouseOver="$cmd;return escape('$str')}; } link_target = sub { my $f = shift; my $name = $f->name; my $start = $f->start; my $stop = $f->stop; my ($freq) = $f->get_tag_values('RawCount'); my ($tag) = $f->get_tag_values('Sequence'); my @data; push @data, [ 'Location:' => "$start..$stop" ]; push @data, [ 'Sequence:' => $tag ]; push @data, [ 'Library:' => $lib ]; push @data, [ 'Frequency:' => $freq]; return hover( "Sage Tag - Temp ID $name", \@data); }
Future Works • Performance tuning – SQL, bulksubfeatures, AJAX tooltips • Unification with web inferface WDK • All projects share same gbrowse configuration • Be able to divide the .conf and .xml files into sub files • Be able to include/exclude based on project • Re-using sql and perl across tracks, e.g. duplicate code