Ewan Birney > bioperl-gui-0.7 > GO_Browser

Download:
bioperl-gui-0.7.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME

Bio::Tk::GO_Browser.pm - Simplistic browser for GO ontology terms

AUTHORS

Mark Wilkinson (mwilkinson@gene.pbi.nrc.ca) Plant Biotechnology Institute, National Research Council of Canada. Copyright (c) National Research Council of Canada, October, 2000.

DISCLAIMER

Anyone who intends to use and uses this software and code acknowledges and agrees to the following: The National Research Council of Canada (herein "NRC") disclaims any warranties, expressed, implied, or statutory, of any kind or nature with respect to the software, including without limitation any warranty or merchantability or fitness for a particular purpose. NRC shall not be liable in any event for any damages, whether direct or indirect, consequential or incidental, arising from the use of the software.

SYNOPSIS

 use GO_Browser;
 use Tk;
 use strict;

 Begin();

 MainLoop;

 sub Begin {

  my $Textbox;
  my $GO;
        
  # create new main window.
  my $mw = MainWindow->new(-title => "GO Ontology Browser");
                
  # create new textbox with scrollbars
  $Textbox = $mw->Scrolled("Text", -background => "black")->pack(-fill => "both", -expand => 1);
                
  # alternate method to create new textbox, NOT RECOMMENDED!!
  #$Textbox = $mw->Text(-background => "black")->pack;                  
                
  # create new GO browser
  $GO = GO_Browser->new($Textbox, TopWindow => $mw);
                
                        
  # set up binding of button-2 to retrieve information
    $Textbox->bind("<Button-2>" => sub {        
       my $acc = $GO->GOAcc;
       my $term = $GO->Term;
       my $def = $GO->Definition;
       print "Acc = $acc Term = $term Def = $def\n\n";
    });
        
 }

DESCRIPTION and ACKNOWLEDGEMENTS

Fills a Tk::Text widget with a browsable display of the GO ontology (http://www.geneontology.org/). Items in red are "branches", while items in green are "leaves" of the GO ontology tree. Double-clicking branches moves you up and down the tree. Middle-clicking on any element records the clicked-upon term and definition (if available) and this event can be trapped by the top-level windowing system to retrieve this info for whatever external application you are building.

Unlike previous versions, this browser connects directly to the GO ontology database. Therefore it requires no pre-downloading and parsing of the XML files (halleluja!)

Because it is connecting "live" there is sometimes a small delay while the query is being sent over the net. The number of queries required for the browser has been mitigated as much as possible by some clever left-joins written by Dave Block (dblock@gene.pbi.nrc.ca). Thanks Dave!

CONTACT

Mark Wilkinson (mwilkinson@gene.pbi.nrc.ca)

Options

 $GO = GO_Browser->new(
   $Textbox,            # the Tk Text widget
   TopWindow => $mw,   # the top-level window (or undef)
   GO_IP => "headcase.lbl.gov",  # the IP address of your GO database
   GO_dbName => "go"   # the name of the GO database
 );

Methods

 $GO->GOAcc     # returns Accession number of the middle-clicked term
 $GO->Term   # returns the Term name of the middle-clicked term
 $GO->Definition  # returns the associated definition