GO::IO::ObanOwl(3) dump GO terms as xml


my $apph = GO::AppHandle->connect(-d=>$go, -dbhost=>$dbhost);
my $term = $apph->get_term({acc=>00003677});
#### ">-" is STDOUT
my $out = new FileHandle(">-");

my $xml_out = GO::IO::XML->new(-output=>$out);


    my $apph = GO::AppHandle->connect(-d=>$go, -dbhost=>$dbhost);
    my $term = $apph->get_node_graph(-acc=>00003677, -depth=>2);
    my $out = new FileHandle(">-");  
    my $xml_out = GO::IO::XML(-output=>$out);
    $xml_out->draw_node_graph($term, 3677);


Utility class to dump GO terms as xml. Currently you just call start_ducument, then draw_term for each term, then end_document.

If there's a need I'll add draw_node_graph, draw_node_list, etc.


    Usage   - my $xml_out = GO::IO::XML->new(-output=>$out);
    Returns - None
    Args    - Output FileHandle

Initializes the writer object. To write to standard out, do:

my $out = new FileHandle(``>-''); my $xml_out = new GO::IO::XML(-output=>$out);


    Usage   - $xml_out->xml_header;
    Returns - None
    Args    - None

start_document prints the ``Content-type: text/xml'' statement. If creating a cgi script, you should call this before start_document.


    Usage   - $xml_out->start_document(-timestamp=>$time);
    Returns - None
    Args    - optional: timestamp string, pre-formatted

start_ducument takes care of the fiddly bits like xml declarations, namespaces, etc. It draws the initial tags and leaves the document ready to add go:term nodes.


    Usage   - $xml_out->end_document();

Call this when done.


    Usage   - $xml_out->draw_node_graph(-graph=>$graph);
    Returns - None
    Args    -graph=>$node_graph, 
            -focus=>$acc,                      ## optional
            -show_associations=>"yes" or "no"  ## optional


    Usage   - $xml_out->draw_term();
    Returns - None
    Args    -term=>$term, 
            -is_focus=>"yes" or "no",    ## optional
            -show_associations=>"yes" or "no",    ## optional
            -show_terms=>"yes" or "no",    ## optional, just draws associations

sub characters

  This is simply a wrapper to XML::Writer->characters
  which strips out any non-ascii characters.

sub dataElement

  This is simply a wrapper to XML::Writer->dataElement
  which strips out any non-ascii characters.