NAME
GO::IO::go_assoc;
SYNOPSIS
my $apph = GO::AppHandle->connect(-d=>$go, -dbhost=>$dbhost);
my $term = $apph->get_term({acc=>00003677});
#### ">-" is STDOUT
my $out = new FileHandle(">-");
my $ga_out = GO::IO::go_assoc->new(-output=>$out);
$ga_out->write_term($term);
OR:
my $apph = GO::AppHandle->connect(-d=>$go, -dbhost=>$dbhost);
my $graph = $apph->get_node_graph(-acc=>00003677, -depth=>2);
my $out = new FileHandle(">-");
my $ga_out = GO::IO::go_assoc->new(-output=>$out);
$ga_out->write_graph($graph);
DESCRIPTION
Utility class to dump GO terms as OBD XML. Currently, you just call start_document, write_term for each term, then end_document.
new
Usage - my $ga_out = new GO::IO::go_assoc(-output=>$out);
Returns - Output emitter.
Args - Output FileHandle
Initializes the writer object. To write to standard out, do:
my $out = new FileHandle(">-"); my $ga_out = new GO::IO::go_assoc($out);
cgi_header
Usage - $ga_out->cgi_header;
Returns - None
Args - None
cgi_header prints the "Content-type: text/plain" statement. If creating a CGI script, you should call this before further action.
write_graph
Usage - $ga_out->write_graph(-graph=>$graph);
Returns - None
Args -graph=>$graph,
-deep=>1 or 0, # optional, default 0.
-qualifier=>1 or 0, # optional, default 1.
-with=>1 or 0, # optional, default 1.
-object_name=>1 or 0, # optional, default 1.
-object_synonym=>1 or 0, # optional, default 1.
write_term_list
Usage - $ga_out->write_term_list();
Returns - None
Args -term_listref=>$term_listref,
-deep=>1 or 0, # optional, default 0.
-qualifier=>1 or 0, # optional, default 1.
-with=>1 or 0, # optional, default 1.
-object_name=>1 or 0, # optional, default 1.
-object_synonym=>1 or 0, # optional, default 1.
write_term
Usage - $ga_out->write_term();
Returns - None
Args -term=>$term,
-deep=>1 or 0, # optional, default 0.
-qualifier=>1 or 0, # optional, default 1.
-with=>1 or 0, # optional, default 1.
-object_name=>1 or 0, # optional, default 1.
-object_synonym=>1 or 0, # optional, default 1.