.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "go-perl 3pm" .TH go-perl 3pm "2021-01-09" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" go\-perl \- perl modules for GO and other OBO ontologies .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 12 \& # ** FETCHING GRAPH OBJECTS FROM AN ONTOLOGY FILE ** \& use GO::Parser; \& my $parser = new GO::Parser({handler=>\*(Aqobj\*(Aq}); # create parser object \& $parser\->parse("gene_ontology.obo"); # parse file \-> objects \& my $graph = $parser\->handler\->graph; # get L object \& my $term = $graph\->get_term("GO:0001303"); # fetch a term by ID \& printf "Got term: %s %s\en", $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\en", $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 \- .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" go-perl is part of the go-dev code distribution. It is also available as a separate library in its own right. .PP 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 .PP http://www.geneontology.org .PP http://obo.sourceforge.net .PP go-perl provides the following functionality: .IP "parsers" 4 .IX Item "parsers" Biological ontologies and associated data come in assorted formats. See: .Sp GO::Parser .IP "handlers/writers" 4 .IX Item "handlers/writers" All parsers are \s-1XML\s0 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. .Sp If you are not interested in generating \s-1XML,\s0 you can use an object handler, which will give you objects for traversing an ontology; see below .IP "a graph-based object model" 4 .IX Item "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: .Sp GO::Model::Term \*(-- a node/term within an ontology .Sp GO::Model::Graph \*(-- collection of terms and the relationships between them .Sp GO::Model::Relationship \*(-- a typed relationship between two terms .Sp GO::Model::Xref \*(-- a database xref, for a term or any other object .Sp GO::Model::Association \*(-- an association between a term and a gene product .Sp GO::Model::GeneProduct \*(-- a gene or product of a gene or similar annotated entity .Sp GO::Model::Evidence \*(-- supporting evidence for an association .Sp GO::Model::Seq \*(-- a biological sequence of residues for a gene product .SS "\s-1SIMPLE PROGRAMMERS INTERFACE\s0" .IX Subsection "SIMPLE PROGRAMMERS INTERFACE" GO::Basic .PP simple procedural access to \s-1GO\s0 files .SH "SCRIPTS" .IX Header "SCRIPTS" These scripts come as part of the go-perl distribution .IP "map2slim" 4 .IX Item "map2slim" Given a \s-1GO\s0 slim file, and a current ontology (in one or more files), this script will map a gene association file (containing annotations to the full \s-1GO\s0) to the terms in the \s-1GO\s0 slim. The script can be used to either create a new gene association file, containing the most pertinent \s-1GO\s0 slim accessions, or in count-mode, in which case it will give distinct gene product counts for each slim term. .Sp for full instructions, see map2slim .IP "go\-dag\-summary.pl" 4 .IX Item "go-dag-summary.pl" Generates a summary of the \s-1DAG\s0 structure of an ontology file .Sp A row will be generated for every ontology in the file, with the following data columns: .Sp .Vb 7 \& 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 .Ve .Sp for full instructions, see go\-dag\-summary.pl .IP "go\-show\-paths\-to\-root.pl" 4 .IX Item "go-show-paths-to-root.pl" Will show all possible paths from a term to the root/top in the ontology .Sp for full instructions, see go\-show\-paths\-to\-root.pl .IP "go-apply-xslt" 4 .IX Item "go-apply-xslt" Will apply a \s-1GO XSL\s0 transform (by name) on an OBO-XML file .Sp For a full list of XSLs available, see .IP "go\-export\-graph.pl" 4 .IX Item "go-export-graph.pl" Writes an obo file out as an ascii-tree, a graphviz \s-1PNG\s0 or other format .Sp for full instructions, see go\-export\-graph.pl .IP "go\-show\-assocs\-by\-node.pl" 4 .IX Item "go-show-assocs-by-node.pl" given a \s-1GO\s0 ontology file and an association file and a term \s-1ID,\s0 will list all products associated to that \s-1ID\s0 .Sp for full instructions, see go\-show\-assocs\-by\-node.pl .IP "go\-filter\-subset.pl" 4 .IX Item "go-filter-subset.pl" Exports a subset of an ontology from a file. The subset can be based on a specified set of IDs, a preset \*(L"subset\*(R" filter in the ontology file (eg a \s-1GO\s0 \*(L"slim\*(R" or subset), or a user-defined filter. .Sp The subset can be exported in any format, including a graphical image .Sp for full instructions, see go\-filter\-subset.pl .IP "go2fmt.pl" 4 .IX Item "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. .Sp for full instructions, see go2fmt.pl .IP "go2chadoxml" 4 .IX Item "go2chadoxml" converts a file in any valid go/obo format to chadoxml. See also go2fmt.pl .IP "go2godb_prestore" 4 .IX Item "go2godb_prestore" converts a file in any valid go/obo format to an xml format that is isomorphic to the \s-1GO\s0 MySQL Db schema, and can be loaded with DBIx::DBStag. See also go2fmt.pl .IP "go2error_report" 4 .IX Item "go2error_report" converts a file in any valid go/obo format to error_report. See also go2fmt.pl .IP "go2obo_test (alias: go2obo)" 4 .IX Item "go2obo_test (alias: go2obo)" converts a file in any valid go/obo format to obo. See also go2fmt.pl .IP "go2obo_html" 4 .IX Item "go2obo_html" converts a file in any valid go/obo format to obo_html. See also go2fmt.pl .IP "go2obo_xml (alias: go2xml)" 4 .IX Item "go2obo_xml (alias: go2xml)" converts a file in any valid go/obo format to obo_xml. See also go2fmt.pl .IP "go2owl" 4 .IX Item "go2owl" converts a file in any valid go/obo format to owl. See also go2fmt.pl .IP "go2pathlist" 4 .IX Item "go2pathlist" converts a file in any valid go/obo format to pathlist. See also go2fmt.pl .IP "go2prolog" 4 .IX Item "go2prolog" converts a file in any valid go/obo format to prolog. See also go2fmt.pl .IP "go2rdfxml" 4 .IX Item "go2rdfxml" converts a file in any valid go/obo format to rdfxml. See also go2fmt.pl .IP "go2summary" 4 .IX Item "go2summary" converts a file in any valid go/obo format to summary. See also go2fmt.pl .IP "go2sxpr" 4 .IX Item "go2sxpr" converts a file in any valid go/obo format to sxpr. See also go2fmt.pl .IP "go2tbl" 4 .IX Item "go2tbl" converts a file in any valid go/obo format to tbl. See also go2fmt.pl .IP "go2text_html" 4 .IX Item "go2text_html" converts a file in any valid go/obo format to text_html. See also go2fmt.pl .SH "RELATED PACKAGES" .IX Header "RELATED PACKAGES" Download the full go-dev distribution for access to more functionality. go-perl is a subset of go-dev .PP go-dev includes the following: .IP "go-perl" 4 .IX Item "go-perl" This package .Sp http://www.godatabase.org/dev/go\-perl/doc/go\-perl\-doc.html .IP "go-db-perl" 4 .IX Item "go-db-perl" Database \s-1API\s0 for use in conjunction with go-perl .Sp Allows for loading of \s-1GO\s0 databases and fetching graph objects from the database .Sp http://www.godatabase.org/dev/go\-db\-perl/doc/go\-db\-perl\-doc.html .Sp GO::AppHandle .IP "amigo" 4 .IX Item "amigo" Ontology browser, written in perl .Sp Requires installation of both go-perl and go-db-perl .IP "java" 4 .IX Item "java" The DAG-Edit curation tool .Sp http://www.godatabase.org/dev .IP "xml" 4 .IX Item "xml" DTDs for the Obo-XML format, and \s-1XSL\s0 stylesheets for converting to and from Obo-XML format .Sp http://www.godatabase.org/dev/xml/doc/xml\-doc.html .IP "sql" 4 .IX Item "sql" Schema and \s-1SQL\s0 code for the \s-1GO\s0 database .Sp http://www.godatabase.org/dev/sql/doc/godb\-sql\-doc.html .SH "AUTHORS" .IX Header "AUTHORS" (C) Chris Mungall 2000\-2006 .PP This module is free software. You may distribute under the same terms as perl itself.