NAME
go-perl - perl modules for GO and other OBO ontologies
SYNOPSIS
# ** 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", $term->acc, $term->name;
}
# ** FROM THE COMMAND LINE ** (requires go-dev/xml)
go2xml gene_ontology.obo | xsltproc $GO_ROOT/xml/xsl/my-transform.xsl -
DESCRIPTION
go-perl is part of the go-dev code distribution. It is also available as a seperate 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:
- parsers
-
Biological ontologies and associated data come in assorted formats. See:
- handlers/writers
-
All parsers are XML event based - they emit Obo-XML, which can be caught by different handlers. Some of these handlers effectively transform the parsed file into a different format or summary.
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
- a graph-based object model
-
Biological ontologies typically have graph-based structures (DAGs). go-perl provides a perl object model representing ontologies and associations to ontologies. Classes include:
GO::Model::Term -- a concept within an ontology
GO::Model::Graph -- collection of relationships between terms
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
SIMPLE PROGRAMMERS INTERFACE
simple procedural access to GO files
SCRIPTS
These scripts come as part of the go-perl distribution
- map2slim
-
Given a GO slim file, and a current ontology (in one or more files), this script will map a gene association file (containing annotations to the full GO) to the terms in the GO slim. The script can be used to either create a new gene association file, containing the most pertinent GO slim accessions, or in count-mode, in which case it will give distinct gene product counts for each slim term.
for full instructions, see scripts::map2slim
- go2fmt.pl
-
generic file converter. This will convert any go/obo formatted file such as ontology files and association files and write output in some other format or report. See the full list of convenience scripts below.
for full instructions, see scripts::go2fmt
- go2chadoxml
-
converts a file in any valid go/obo format to chadoxml. See also go2fmt.pl
- go2error_report
-
converts a file in any valid go/obo format to error_report. See also go2fmt.pl
- go2obo_test (alias: go2obo)
-
converts a file in any valid go/obo format to obo. See also go2fmt.pl
- go2obo_html
-
converts a file in any valid go/obo format to obo_html. See also go2fmt.pl
- go2obo_xml (alias: go2xml)
-
converts a file in any valid go/obo format to obo_xml. See also go2fmt.pl
- go2owl
-
converts a file in any valid go/obo format to owl. See also go2fmt.pl
- go2pathlist
-
converts a file in any valid go/obo format to pathlist. See also go2fmt.pl
- go2prolog
-
converts a file in any valid go/obo format to prolog. See also go2fmt.pl
- go2rdfxml
-
converts a file in any valid go/obo format to rdfxml. See also go2fmt.pl
- go2summary
-
converts a file in any valid go/obo format to summary. See also go2fmt.pl
- go2sxpr
-
converts a file in any valid go/obo format to sxpr. See also go2fmt.pl
- go2tbl
-
converts a file in any valid go/obo format to tbl. See also go2fmt.pl
- go2text_html
-
converts a file in any valid go/obo format to text_html. See also go2fmt.pl
RELATED PACKAGES
Download the full go-dev distribution for access to more functionality. go-perl is a subset of go-dev
go-dev includes the following:
- go-perl
-
This package
http://www.godatabase.org/dev/go-perl/doc/go-perl-doc.html
- go-db-perl
-
Database API for use in conjunction with go-perl
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
- amigo
-
Ontology browser, written in perl
Requires installation of both go-perl and go-db-perl
- java
-
The DAG-Edit curation tool
http://www.godatabase.org/dev
- xml
-
DTDs for the Obo-XML format, and XSL stylesheets for converting to and from Obo-XML format
http://www.godatabase.org/dev/xml/doc/xml-doc.html
- sql
-
Schema and SQL code for the GO database
http://www.godatabase.org/dev/sql/doc/godb-sql-doc.html
AUTHORS
(C) Chris Mungall 2000-2004
This module is free software. You may distribute under the same terms as perl itself.