go-perl(3pm) | User Contributed Perl Documentation | go-perl(3pm) |
go-perl - perl modules for GO and other OBO ontologies
# ** FETCHING GRAPH OBJECTS FROM AN ONTOLOGY FILE ** use GO::Parser; my $parser = new GO::Parser({handler=>'obj'}); # create parser object $parser->parse("gene_ontology.obo"); # parse file -> objects my $graph = $parser->handler->graph; # get L<GO::Model::Graph> object my $term = $graph->get_term("GO:0001303"); # fetch a term by ID printf "Got term: %s %s\n", $term->acc, $term->name; my $ancestor_terms = $graph->get_recursive_parent_terms($term->acc); foreach my $anc_term (@$ancestor_terms) { printf " Ancestor term: %s %s\n", $anc_term->acc, $anc_term->name; } # ** FROM THE COMMAND LINE ** (requires go-dev/xml) go2xml gene_ontology.obo | xsltproc $GO_ROOT/xml/xsl/my-transform.xsl -
go-perl is part of the go-dev code distribution. It is also available as a separate library in its own right.
go-perl is a collection of perl modules for working with ontologies and data, in particular the Gene Ontology and other Open Bio-Ontologies. For background on these projects, see
http://www.geneontology.org
http://obo.sourceforge.net
go-perl provides the following functionality:
GO::Parser
If you are not interested in generating XML, you can use an object handler, which will give you objects for traversing an ontology; see below
GO::Model::Term -- a node/term within an ontology
GO::Model::Graph -- collection of terms and the relationships between them
GO::Model::Relationship -- a typed relationship between two terms
GO::Model::Xref -- a database xref, for a term or any other object
GO::Model::Association -- an association between a term and a gene product
GO::Model::GeneProduct -- a gene or product of a gene or similar annotated entity
GO::Model::Evidence -- supporting evidence for an association
GO::Model::Seq -- a biological sequence of residues for a gene product
GO::Basic
simple procedural access to GO files
These scripts come as part of the go-perl distribution
for full instructions, see map2slim
A row will be generated for every ontology in the file, with the following data columns:
input filename total no of terms total no of relationships total no of paths avg no of paths per term (p/t) maximum no of paths for any term ID of term with maximum no of paths
for full instructions, see go-dag-summary.pl
for full instructions, see go-show-paths-to-root.pl
For a full list of XSLs available, see <http://www.godatabase.org/xml/xsl>
for full instructions, see go-export-graph.pl
for full instructions, see go-show-assocs-by-node.pl
The subset can be exported in any format, including a graphical image
for full instructions, see go-filter-subset.pl
for full instructions, see go2fmt.pl
Download the full go-dev distribution for access to more functionality. go-perl is a subset of go-dev
go-dev includes the following:
http://www.godatabase.org/dev/go-perl/doc/go-perl-doc.html
Allows for loading of GO databases and fetching graph objects from the database
http://www.godatabase.org/dev/go-db-perl/doc/go-db-perl-doc.html
GO::AppHandle
Requires installation of both go-perl and go-db-perl
http://www.godatabase.org/dev
http://www.godatabase.org/dev/xml/doc/xml-doc.html
http://www.godatabase.org/dev/sql/doc/godb-sql-doc.html
(C) Chris Mungall 2000-2006
This module is free software. You may distribute under the same terms as perl itself.
2021-01-09 | perl v5.32.0 |