[med-svn] r1589 - in trunk/packages/libgo-perl/trunk: . debian debian/libgo-perl debian/libgo-perl/usr debian/libgo-perl/usr/bin debian/libgo-perl/usr/share debian/libgo-perl/usr/share/man debian/libgo-perl/usr/share/man/man1 debian/libgo-perl/usr/share/man/man3 debian/libgo-perl/usr/share/perl5 debian/libgo-perl/usr/share/perl5/GO debian/libgo-perl/usr/share/perl5/GO/Handlers debian/libgo-perl/usr/share/perl5/GO/IO debian/libgo-perl/usr/share/perl5/GO/Model debian/libgo-perl/usr/share/perl5/GO/Parsers debian/libgo-perl/usr/share/perl5/GO/xsl

charles-guest at alioth.debian.org charles-guest at alioth.debian.org
Fri Mar 14 08:28:00 UTC 2008


Author: charles-guest
Date: 2008-03-14 08:27:59 +0000 (Fri, 14 Mar 2008)
New Revision: 1589

Added:
   trunk/packages/libgo-perl/trunk/debian/
   trunk/packages/libgo-perl/trunk/debian/changelog
   trunk/packages/libgo-perl/trunk/debian/compat
   trunk/packages/libgo-perl/trunk/debian/control
   trunk/packages/libgo-perl/trunk/debian/copyright
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-apply-xslt
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-dag-summary.pl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-export-graph.pl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-export-prolog.pl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-filter-subset.pl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-show-assocs-by-node.pl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-show-paths-to-root.pl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2chadoxml
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2error_report
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2fmt.pl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2godb_prestore
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_html
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_text
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_xml
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2owl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2pathlist
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2prolog
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2rdf
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2rdfxml
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2summary
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2sxpr
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2tbl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2text_html
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2xml
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/map2slim
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-dag-summary.pl.1p
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-export-graph.pl.1p
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-filter-subset.pl.1p
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-show-assocs-by-node.pl.1p
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-show-paths-to-root.pl.1p
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go2fmt.pl.1p
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/map2slim.1p
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Basic.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::base.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_def.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_ont.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_xref.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::godb_prestore.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obj.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_godb_flat.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_html.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_text.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::owl.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::owl_to_obo_text.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::summary.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::tbl.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::text_html.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::xsl_base.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Analysis.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Blast.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Dotty.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::OBDXML.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::ObanOwl.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::RDFXML.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::go_assoc.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Association.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::CrossProduct.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::DB.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Evidence.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GeneProduct.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Graph.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GraphIterator.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GraphNodeInstance.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::LogicalDefinition.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Modification.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Ontology.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Path.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Property.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Relationship.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Restriction.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Root.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Seq.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Species.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Term.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::TreeIterator.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Xref.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::ObjCache.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::ObjFactory.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ParserEventNames.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::base_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::generic_tagval_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_assoc_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_def_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_ids_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_ont_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_xref_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::locuslink_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::mesh_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::mgi_assoc_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ncbi_taxon_names_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ncbi_taxonomy_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obj_emitter.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obo_text_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obo_xml_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::owl_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::references_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::refgenomes_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::unknown_format_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::xrf_abbs_parser.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Utils.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/go-perl.3pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Basic.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/abstract_prolog_writer.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/abstract_sql_writer.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/base.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_def.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_ont.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_xref.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/godb_prestore.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/lexanalysis.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/lexanalysis2sql.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj_storable.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj_yaml.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_godb_flat.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_html.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_sxpr.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_text.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_xml.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/owl.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/owl_to_obo_text.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/pathlist.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/prolog.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/rdf.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/summary.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/sxpr.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/tbl.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/text_html.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/xml.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/xsl_base.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Analysis.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Blast.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Dotty.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/OBDXML.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/ObanOwl.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/RDFXML.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/XML.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/go_assoc.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Association.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/CrossProduct.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/DB.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Evidence.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GeneProduct.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Graph.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GraphIterator.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GraphNodeInstance.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/LogicalDefinition.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Modification.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Ontology.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Path.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Property.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Relationship.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Restriction.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Root.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Seq.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Species.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Term.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/TreeIterator.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Xref.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/ObjCache.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/ObjFactory.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ParserEventNames.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/base_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/generic_tagval_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_assoc_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_def_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_ids_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_ont_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_xref_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/locuslink_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/mesh_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/mgi_assoc_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ncbi_taxon_names_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ncbi_taxonomy_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_emitter.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_storable_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_yaml_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_text_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_xml_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/owl_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/references_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/refgenomes_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/unknown_format_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/xrf_abbs_parser.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Utils.pm
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/chadoxml_to_oboxml.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/ipr_to_oboxml.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_filter.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_chadoxml.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_dig.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_godb_prestore.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_obd_prestore.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_obotext.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_owl.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_racer.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_simple_owl.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_summary_table.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/owl_to_oboxml.xsl
   trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/go-perl.pod
   trunk/packages/libgo-perl/trunk/debian/rules
   trunk/packages/libgo-perl/trunk/debian/watch
Log:
[svn-inject] Applying Debian modifications to trunk


Property changes on: trunk/packages/libgo-perl/trunk/debian
___________________________________________________________________
Name: mergeWithUpstream
   + 1

Added: trunk/packages/libgo-perl/trunk/debian/changelog
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/changelog	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/changelog	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,5 @@
+libgo-perl (0.07-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #)
+
+ -- Charles Plessy <charles-debian-nospam at plessy.org>  Mon, 26 Nov 2007 14:56:58 +0900

Added: trunk/packages/libgo-perl/trunk/debian/compat
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/compat	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/compat	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1 @@
+5

Added: trunk/packages/libgo-perl/trunk/debian/control
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/control	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/control	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,24 @@
+Source: libgo-perl
+Section: perl
+Priority: optional
+Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
+Uploaders: Charles Plessy <charles-debian-nospam at plessy.org>,
+Build-Depends: debhelper (>= 5), dpatch
+Build-Depends-Indep: perl
+Standards-Version: 3.7.2
+Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libgo-perl/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libgo-perl/
+Homepage: http://search.cpan.org/~cmungall/go-perl-0.07/
+
+Package: libsvg-perl
+Architecture: all
+Depends: ${perl:Depends}, libyaml-perl, libdigest-perl, libxml-libxml-perl, libxml-libxslt-perl, libxml-writer-perl, libgraphviz-perl
+Description: parses all Gene Ontology files formats and types
+ This is a collection of perl code for dealing with Gene Ontologies (GO) and
+ Open Biomedical Ontologies (OBO) style ontologies. It is part of the `go-dev'
+ distribution, but this Debian package is made from the CPAN archive. This
+ package contains both scripts (which can be used with no knowledge of perl),
+ and libraries which will be of use to perl programmers using GO or OBO.
+ .
+ It also depends on http://search.cpan.org/~cmungall/Data-Stag/
+ Dependencies checked with find . -name '*pm' | xargs grep use.*\; | cut -f2- -d' ' | sort | uniq | less

Added: trunk/packages/libgo-perl/trunk/debian/copyright
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/copyright	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/copyright	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,36 @@
+NOT FROM GO
+
+
+This package was debianized by David Paleino <d.paleino at gmail.com> on
+Sat, 16 Jun 2007 08:43:06 +0200.
+
+It was downloaded from http://search.cpan.org/~ronan/SVG-2.34/
+
+Upstream Author:
+
+    Ronan Oger <ronan at roasp.com>
+
+Copyright: 
+
+    (c) 2001-2005, Ronan Oger, RO IT Systems, GmbH
+    <http://www.roitsystems.com>
+    <http://www.prosvg.com>
+
+License:
+
+	This software is released under the same terms as Perl.
+	
+	Perl is free software; you can redistribute it and/or modify it under the
+	terms of either:
+	  a) the GNU General Public License as published by the Free Software
+	     Foundation; either version 1, or (at your option) any later version,
+	     or
+	  b) the "Artistic License" which comes with Perl.
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL', 
+while the complete text of the Artistic License can be found in
+`/usr/share/common-licenses/Artistic'.
+
+The Debian packaging is (C) 2007, David Paleino <d.paleino at gmail.com> and
+is licensed under the GPL, see above.

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-apply-xslt
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-apply-xslt	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-apply-xslt	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,104 @@
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+# TODO: allow other xslt processors; eg xalan
+if (system("which xsltproc > /dev/null")) {
+    print <<EOM
+You need xsltproc (part of libxslt) for this.
+
+See http://www.godatabase.org/dev/xml/xsl
+
+[This script can easily be modified so that other xslt processors can
+be used; eg java Xalan. I believe xsltproc to be the fastest. If you would
+like this script to be extended to use a different xslt processor, please
+email the gmod-ontol-sw-devel list]
+
+EOM
+;
+    exit 1;
+}
+if (!@ARGV || $ARGV[0] =~ /^\-\-help/) {
+    print usage();
+    exit 0;
+}
+my $xsl = shift @ARGV;
+my @files = ();
+while ($ARGV[0] && $ARGV[0] !~ /^\-(.+)/) {
+    push(@files, shift @ARGV);
+}
+
+if (!$xsl) {
+    print "You must specify an XSLT logical name!\n";
+    exit 1;
+}
+#if (!@files) {
+#    print "You must specify an xml file to process!\n";
+#    exit 1;
+#}
+if (!@files) {
+  @files = ('-');
+}
+
+# if GO_ROOT is set then this specifies the location of the xslt dir
+#  if it is not set, assume we are using an installed version of go-perl,
+#  in which case, the xslts will be located along with the perl modules
+my $xslt_file;
+my $GO_ROOT = $ENV{GO_ROOT};
+if ($GO_ROOT) {
+    # env var takes precedence;
+    # developers should use this
+    $xslt_file = "$GO_ROOT/xml/xsl/$xsl.xsl";
+}
+
+# default location is with perl modules
+if (!$xslt_file || !-f $xslt_file) {
+    # user-mode; xsl will be wherever the GO modules are installed
+    require "GO/Parser.pm";
+    my $dir = $INC{'GO/Parser.pm'};
+    $dir =~ s/Parser\.pm/xsl/;
+    $xslt_file = "$dir/$xsl.xsl";
+}
+
+if (!-f $xslt_file) {
+    print <<EOM
+I expected to find a file: "$xslt_file"
+
+You may need to download the XSLT files from the go-dev distribution;
+see
+
+  http://www.godatabase.org/dev/xml/xsl
+
+Set the env var GO_ROOT to point to the directory containing the "xml"
+rdirectory
+
+EOM
+;
+    exit 1;
+}
+system("xsltproc @ARGV $xslt_file @files");
+exit 0;
+
+sub usage {
+    print <<EOM
+go-apply-xslt XSLT-NAME [XML FILE...] [XSLTPROC-OPTIONS...]
+
+processes Obo-XML files through an XSLT pipeline
+
+examples:
+
+  go-apply-xslt oboxml_to_owl my.obo-xml
+  go-apply-xslt oboxml_filter my.obo-xml --stringparam namespace cell
+
+If your input format is not obo-xml, you can transform it in a pipeline:
+
+  go2obo_xml so.obo | go-apply-xslt text_html -
+
+Which is the same as:
+
+  go2xml -x text_html so.obo
+
+EOM
+  ;
+}

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-dag-summary.pl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-dag-summary.pl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-dag-summary.pl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,188 @@
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+# POD docs at end of file
+
+use strict;
+use Getopt::Long;
+use FileHandle;
+use GO::Parser;
+use Data::Stag;
+
+$|=1;
+
+my $opt = {};
+GetOptions($opt,
+	   "help|h",
+           "format|p=s",
+	   "err|e=s",
+           "use_cache",
+	  );
+
+if ($opt->{help}) {
+    system("perldoc $0");
+    exit;
+}
+
+my $errf = $opt->{err};
+my $errhandler = Data::Stag->getformathandler('xml');
+if ($errf) {
+    $errhandler->file($errf);
+}
+else {
+    $errhandler->fh(\*STDERR);
+}
+
+my @files = GO::Parser->new->normalize_files(@ARGV);
+while (my $fn = shift @files) {
+    eval {
+        summarise_file($fn);
+    };
+    if ($@) {
+        $errhandler->err_event(exception=>"$@");
+    }
+}
+
+sub summarise_file {
+    my $fn = shift;
+    my %h = %$opt;
+    my $fmt;
+    if ($fn =~ /\.obo/) {
+        $fmt = 'obo_text';
+    }
+    if ($fn =~ /\.ont/) {
+        $fmt = 'go_ont';
+    }
+    if ($fmt && !$h{format}) {
+        $h{format} = $fmt;
+    }
+    $h{handler} = 'obj';
+    my $parser = new GO::Parser(%h);
+    $parser->litemode(1);
+    $parser->use_cache(1) if $opt->{use_cache};
+    $parser->errhandler($errhandler);
+    $parser->parse($fn);
+    my $g = $parser->handler->graph;
+    my %counts = ();
+    my %ns_h=();
+    foreach my $t (@{$g->get_all_terms}) {
+        next if $t->is_obsolete;
+        my $ns = $t->term_type;
+        if (!$ns) {
+            if ($fn =~ /\/(.*)\.\w+/) {
+                $ns = $1;
+            }
+            else {
+                $ns = $fn;
+            }
+        }
+        $ns_h{$ns}=1;
+        my $acc = $t->acc;
+        $counts{term}->{$ns}++;
+        my $parent_rels = $g->get_parent_relationships($acc);
+        $counts{relationship}->{$ns} += scalar(@$parent_rels);
+        my $paths = $g->paths_to_top($acc);
+        my $n_paths = scalar(@$paths);
+        $counts{path}->{$ns} += $n_paths;
+        if ($n_paths >= $counts{pathmax}->{$ns}) {
+            $counts{pathmax}->{$ns} = $n_paths;            
+            $counts{pathmaxacc}->{$ns} = $acc;            
+            $counts{pathmaxname}->{$ns} = $t->name;            
+        }
+
+
+    }
+    foreach my $ns (keys %ns_h) {
+        printf "%s\n",
+          join("\t",
+               $fn,
+               $ns,
+               (map {$counts{$_}->{$ns}} qw(term relationship path)),
+               $counts{path}->{$ns}/$counts{term}->{$ns},
+               (map {$counts{$_}->{$ns}} qw(pathmax pathmaxacc pathmaxname)),
+              );
+    }
+}
+$errhandler->finish;
+exit 0;
+
+
+__END__
+
+=head1 NAME
+
+go-dag-summary
+
+=head1 SYNOPSIS
+
+  go-dag-summary ontology/gene_ontology.obo
+
+=head1 DESCRIPTION
+
+Summarises an ontology
+
+=head1 ARGUMENTS
+
+=head3 -e ERRFILE
+
+writes parse errors in XML - defaults to STDERR
+(there should be no parse errors in well formed files)
+
+=head3 -p FORMAT
+
+determines which parser to use; if left unspecified, will make a guess
+based on file suffix. See below for formats
+
+=head2 -use_cache
+
+If this switch is specified, then caching mode is turned on.
+
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the ".cache" suffix.
+
+The next time you parse the file, this program will automatically
+check for the existence of the ".cache" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+
+
+=head1 OUTPUT
+
+One row per ontology
+
+Each row has the following columns
+
+=over
+
+=item input filename
+
+=item total no of terms
+
+=item total no of relationships
+
+=item total no of paths
+
+=item avg no of paths per term (p/t)
+
+=item maximum no of paths for any term
+
+=item ID of term with maximum no of paths
+
+NOTE: obsolete terms are not included
+
+=back
+
+=head2 DOCUMENTATION
+
+L<http://www.godatabase.org/dev>
+
+=head2 SEE ALSO
+
+L<http://www.fruitfly.org/~cjm/obol/doc/go-complexity.html>
+
+=cut
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-export-graph.pl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-export-graph.pl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-export-graph.pl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,99 @@
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+use strict;
+use GO::Basic;
+use GO::Dotty::Dotty;
+
+use Getopt::Long;
+
+my $w = 'text';
+my $use_cache;
+my $fmt;
+GetOptions("write|w=s"=>\$w,
+           "use_cache"=>\$use_cache,
+           "format|parser|p=s"=>\$fmt,
+           "help|h"=>sub{system("perldoc $0");exit 0},
+          );
+
+my $graph = parse({format=>$fmt,
+                   use_cache=>$use_cache},shift @ARGV);
+my $subgraph = $graph->subgraph({@ARGV});
+unless ($subgraph->term_count) {
+    print STDERR "No matching terms for: @ARGV\n";
+    exit 1;
+}
+
+if ($w eq 'text') {
+    $subgraph->to_text_output;
+}
+elsif ($w eq 'obo') {
+    $subgraph->to_obo;
+}
+else {
+    my $graphviz =
+      GO::Dotty::Dotty::go_graph_to_graphviz( $subgraph,
+                                              {node => {shape => 'box'},
+                                              });
+    print $graphviz->as_png;
+}
+
+exit 0;
+
+__END__
+
+=head1 NAME
+
+go-export-graph.pl
+
+=head1 SYNOPSIS
+
+  go-export-graph.pl -w png ontology/gene_ontology.obo | display -
+
+  go-export-graph.pl ontology/gene_ontology.obo 'acc' GO:0007610
+
+  go-export-graph.pl ontology/so.obo 'name' 'protein'
+
+=head1 DESCRIPTION
+
+exports a graph as an indented ascii tree, PNG or OBO file
+
+=head1 ARGUMENTS
+
+after the file name you can optionally specify query constraint pairs; eg
+
+ acc GO:0007610
+ name 'cysteine biosynthesis'
+
+=head1 OPTIONS
+
+=head3 -w EXPORT_FORMAT
+
+one of B<text>, B<obo> or B<png>
+
+=head2 -use_cache
+
+If this switch is specified, then caching mode is turned on.
+
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the ".cache" suffix.
+
+The next time you parse the file, this program will automatically
+check for the existence of the ".cache" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+
+=head2 DOCUMENTATION
+
+L<http://www.godatabase.org/dev>
+
+=head2 SEE ALSO
+
+L<go2fmt.pl>
+
+=cut
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-export-prolog.pl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-export-prolog.pl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-export-prolog.pl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -w
+
+eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+use strict;
+use GO::Parser;
+use Getopt::Long;
+use Data::Dumper;
+
+my $opt = {};
+GetOptions($opt,
+           "format|p=s",
+           "handler|h=s",
+           "force_namespace=s",
+           "replace_underscore",
+           "litemode|l",
+           "multifile",
+           "expand|e");
+
+my @fns = @ARGV;
+
+my $fmt = $opt->{format};
+
+my $parser =
+  new GO::Parser (format=>$fmt, handler=>'prolog');
+if ($opt->{force_namespace}) {
+    $parser->force_namespace($opt->{force_namespace});
+}
+if ($opt->{replace_underscore}) {
+    $parser->replace_underscore(' ');
+}
+$parser->litemode(1) if $opt->{litemode};
+if ($opt->{multifile}) {
+    print <<EOM
+:- multifile class/2, subclass/2, restriction/3, def/2, belongs/2.
+restriction(id,type,to):- fail.
+EOM
+      ;
+}
+$parser->parse (@fns);

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-filter-subset.pl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-filter-subset.pl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-filter-subset.pl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,199 @@
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+# POD docs at end of file
+
+use strict;
+use Getopt::Long;
+use FileHandle;
+use GO::Parser;
+use Data::Stag;
+
+$|=1;
+
+my $opt = {};
+GetOptions($opt,
+	   "help|h",
+           "format|p=s",
+	   "err|e=s",
+           "subset=s",
+           "id=s@",
+           "partial",
+           "to=s",
+           "namespace=s",
+           "filter_code=s",
+           "use_cache",   # auto pass-through
+	  );
+
+if ($opt->{help}) {
+    system("perldoc $0");
+    exit;
+}
+
+my $filter_sub;
+
+# functional-programming style filters
+if ($opt->{filter_code}) {
+    $filter_sub = eval $opt->{filter_code};
+}
+if ($opt->{namespace}) {
+    die "cannot use filter_code combined with namespace option" 
+      if $filter_sub;
+    $filter_sub = sub {
+        shift->namespace eq $opt->{namespace};
+    };
+}
+
+my $errf = $opt->{err};
+my $errhandler = Data::Stag->getformathandler('xml');
+if ($errf) {
+    $errhandler->file($errf);
+}
+else {
+    $errhandler->fh(\*STDERR);
+}
+
+my @ids = @{$opt->{id} || []};
+my $subset = $opt->{subset};
+my $partial = $opt->{partial};
+
+if (!defined $partial) {
+    $partial = 1 if $subset;
+}
+
+
+my @files = GO::Parser->new->normalize_files(@ARGV);
+if (!@files) {
+    print STDERR "You must specify at least one ontology file!\n";
+    exit 1;
+}
+while (my $fn = shift @files) {
+    my $fn = shift;
+    my %h = %$opt;
+    my $fmt;
+    if ($fn =~ /\.obo/) {
+        $fmt = 'obo_text';
+    }
+    if ($fmt && !$h{format}) {
+        $h{format} = $fmt;
+    }
+    $h{handler} = 'obj';
+    my $parser = new GO::Parser(%h);
+    $parser->litemode(1) if $opt->{litemode};
+    $parser->errhandler($errhandler);
+    $parser->parse($fn);
+    my $g = $parser->handler->graph;
+
+    my @terms = map {$g->get_term($_) || die("no such id:$_")} @ids;
+    if ($subset) {
+        my $terms_in_subset =
+          $g->get_terms_by_subset($subset);
+        push(@terms, @$terms_in_subset);
+    }
+    if ($filter_sub) {
+        push(@terms,
+             grep {$filter_sub->($_)} @{$g->get_all_terms});
+    }
+    my $subg = $g->subgraph_by_terms(\@terms,{partial=>$partial});
+    $subg->export({format=>$opt->{to} || 'obo'});
+}
+$errhandler->finish;
+exit 0;
+
+__END__
+
+=head1 NAME
+
+go-filter-subset.pl - extracts a subgraph from an ontology file
+
+=head1 SYNOPSIS
+
+  go-filter-subset.pl -id GO:0003767 go.obo
+
+  go-filter-subset.pl -id GO:0003767 -to png go.obo | xv -
+
+  go-filter-subset.pl -filter_code 'sub{shift->name =~ /transcr/}' go.obo
+
+=head1 DESCRIPTION
+
+Exports a subset of an ontology from a file. The subset can be based
+on a specified set of IDs, a preset "subset" filter in the ontology
+file (eg a GO "slim" or subset), or a user-defined filter.
+
+The subset can be exported in any format, including a graphical image
+
+=head1 ARGUMENTS
+
+=over
+
+=item -id ID
+
+ID to use as leaf node in subgraph. All ancestors of this ID are
+included in the exported graph (unless -partial is set)
+
+Multiple IDs can be passed
+
+  -id ID1 -id ID2 -id ID3 ....etc
+
+=item -subset SUBSET_ID
+
+Extracts a named subset from the ontology file. (only works with obo
+format files). For example, a specific GO slim
+
+ONLY terms belonging to the subset are exported - the -partial option
+is automatically set
+
+=item -namespace NAMESPACE
+
+only terms in this namespace
+
+=item -filter_code SUBROUTINE
+
+B<advanced option>
+
+A subroutine with which the L<GO::Model::Term> object is tested for
+inclusion in the subgraph (all ancestors are automatically included)
+
+You should have an understanding of the go-perl object model before
+using this option
+
+Example:
+
+  go-filter-subset -filter_code 'sub {shift->namespace eq 'molecular_function'}' go.obo
+
+(the same things can be achieved with the -namespace option)
+
+=item -partial
+
+If this is set, then only terms that match the user query are
+included. Parentage is set to the next recursive parent node in the
+filter
+
+For example, with the -subset option: if X and Y belong to the subset,
+and Z does not, and X is_a Z is_a Y, then the exported graph withh
+have X is_a Y
+
+=item -use_cache
+
+If this switch is specified, then caching mode is turned on.
+
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the ".cache" suffix.
+
+The next time you parse the file, this program will automatically
+check for the existence of the ".cache" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+
+=back
+
+=head2 DOCUMENTATION
+
+L<http://www.godatabase.org/dev>
+
+=cut
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-show-assocs-by-node.pl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-show-assocs-by-node.pl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-show-assocs-by-node.pl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,122 @@
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+# POD docs at end of file
+
+use strict;
+use Getopt::Long;
+use FileHandle;
+use GO::Parser;
+use Data::Stag;
+
+$|=1;
+
+my $opt = {};
+GetOptions($opt,
+	   "help|h",
+           "format|p=s",
+	   "err|e=s",
+           "id=s@",
+           "names",
+           "use_cache",
+           "count",
+	  );
+
+if ($opt->{help}) {
+    system("perldoc $0");
+    exit;
+}
+
+my $errf = $opt->{err};
+my $errhandler = Data::Stag->getformathandler('xml');
+if ($errf) {
+    $errhandler->file($errf);
+}
+else {
+    $errhandler->fh(\*STDERR);
+}
+
+my @ids = @{$opt->{id} || []};
+if (!@ids) {
+    print STDERR "specify id list with -id ID option\n";
+    exit 1;
+}
+
+my $outer_parser = new GO::Parser({handler=>'obj'});
+my $handler = $outer_parser->handler;
+my @files = GO::Parser->new->normalize_files(@ARGV);
+while (my $fn = shift @files) {
+    my $fn = shift;
+    my %h = %$opt;
+    my $fmt;
+    if ($fn =~ /\.obo/) {
+        $fmt = 'obo_text';
+    }
+    if ($fn =~ /\gene_assoc/) {
+        $fmt = 'go_assoc';
+    }
+    if ($fmt && !$h{format}) {
+        $h{format} = $fmt;
+    }
+    my $parser = new GO::Parser(%h);
+    $parser->handler($handler);
+    #$parser->litemode(1);
+    $parser->errhandler($errhandler);
+    $parser->parse($fn);
+}
+my $g = $handler->graph;
+
+foreach my $id (@ids) {
+    if ($opt->{count}) {
+        my $prods = $g->deep_product_list($id);
+        printf STDERR "Count: %d\n", scalar(@$prods);
+    } else {
+        my $assocs = $g->deep_association_list($id);
+        foreach my $assoc (@$assocs) {
+            my $prod = $assoc->gene_product;
+            my $evs = $assoc->evidence_list;
+            my @codes = map {$_->code} @$evs;
+            printf "%s %s %s\n", "@codes", $prod->xref->as_str, $prod->symbol;
+        }
+    }
+}
+$errhandler->finish;
+exit 0;
+
+__END__
+
+=head1 NAME
+
+go-show-assocs-by-node.pl - find association for a GO term
+
+=head1 SYNOPSIS
+
+  go-show-assocs-by-node.pl -id GO:0008021 gene_ontology.obo gene_associations.fb
+
+=head1 DESCRIPTION
+
+
+=head1 ARGUMENTS
+
+=head3 -c
+
+performs a count of gene products, rather than listing them
+
+=head3 -e ERRFILE
+
+writes parse errors in XML - defaults to STDERR
+(there should be no parse errors in well formed files)
+
+=head3 -p FORMAT
+
+determines which parser to use; if left unspecified, will make a guess
+based on file suffix. See below for formats
+
+=head2 DOCUMENTATION
+
+L<http://www.godatabase.org/dev>
+
+=cut
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-show-paths-to-root.pl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-show-paths-to-root.pl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go-show-paths-to-root.pl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,134 @@
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+# POD docs at end of file
+
+use strict;
+use Getopt::Long;
+use FileHandle;
+use GO::Parser;
+use Data::Stag;
+
+$|=1;
+
+my $opt = {};
+GetOptions($opt,
+	   "help|h",
+           "format|p=s",
+	   "err|e=s",
+           "id=s@",
+           "names",
+           "use_cache",
+	  );
+
+if ($opt->{help}) {
+    system("perldoc $0");
+    exit;
+}
+
+my $errf = $opt->{err};
+my $errhandler = Data::Stag->getformathandler('xml');
+if ($errf) {
+    $errhandler->file($errf);
+}
+else {
+    $errhandler->fh(\*STDERR);
+}
+
+my @ids = @{$opt->{id} || []};
+if (!@ids) {
+    print STDERR "specify id list with -id ID option\n";
+    exit 1;
+}
+
+my @files = GO::Parser->new->normalize_files(@ARGV);
+while (my $fn = shift @files) {
+    my $fn = shift;
+    my %h = %$opt;
+    my $fmt;
+    if ($fn =~ /\.obo/) {
+        $fmt = 'obo_text';
+    }
+    if ($fmt && !$h{format}) {
+        $h{format} = $fmt;
+    }
+    $h{handler} = 'obj';
+    my $parser = new GO::Parser(%h);
+    $parser->litemode(1);
+    $parser->errhandler($errhandler);
+    $parser->parse($fn);
+    my $g = $parser->handler->graph;
+
+    foreach my $id (@ids) {
+        my $t = $g->get_term($id);
+        if (!$t) {
+            next;
+        }
+        printf "%s %s\n", $id, $t->name;
+        my $paths = $g->paths_to_top($id) || [];
+        foreach my $path (@$paths) {
+            printf "  PATH: %s\n",
+              $path->to_text($opt->{names} ? () : ('acc'));
+        }
+    }
+}
+$errhandler->finish;
+exit 0;
+
+__END__
+
+=head1 NAME
+
+go-show-paths-to-root.pl - shows all possible paths from a term to the top
+
+=head1 SYNOPSIS
+
+  go-show-paths-to-root.pl -id GO:0008021 ontology/gene_ontology.obo
+  go-show-paths-to-root.pl -names -id GO:0008021 ontology/gene_ontology.obo
+
+=head1 DESCRIPTION
+
+traverses DAG showing all paths (terms and intervening relationships)
+to the root
+
+This script is purely file based; it needs to parse the ontology each time
+
+Subsequent parses can be speeded up using the use_cache option
+
+If you wish to use the GO MySQL db, see the script
+go-db-show-paths-to-root.pl in the go-db-perl distribution
+
+=head1 ARGUMENTS
+
+=head3 -e ERRFILE
+
+writes parse errors in XML - defaults to STDERR
+(there should be no parse errors in well formed files)
+
+=head3 -p FORMAT
+
+determines which parser to use; if left unspecified, will make a guess
+based on file suffix. See below for formats
+
+=head2 -use_cache
+
+If this switch is specified, then caching mode is turned on.
+
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the ".cache" suffix.
+
+The next time you parse the file, this program will automatically
+check for the existence of the ".cache" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+
+=head2 DOCUMENTATION
+
+L<http://www.godatabase.org/dev>
+
+=cut
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2chadoxml
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2chadoxml	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2chadoxml	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w xml $@ | go-apply-xslt oboxml_to_chadoxml  - -stringparam default_idspace `basename $1`

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2error_report
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2error_report	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2error_report	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+use strict;
+use Getopt::Long;
+use Data::Stag;
+use FileHandle;
+
+my $opt = {};
+GetOptions($opt,
+           "format|p=s",
+           "datatype|t=s",
+	   "err|e=s",
+           "handler_args|a=s%",
+           "handler|h=s");
+
+use GO::Parser;
+
+my $errf = $opt->{err};
+my $errhandler = Data::Stag->getformathandler('xml');
+if ($errf) {
+    $errhandler->file($errf);
+}
+else {
+    $errhandler->fh(\*STDOUT);
+}
+foreach my $f (@ARGV) {
+    my $parser = new GO::Parser($opt);
+    $parser->errhandler($errhandler);
+    $parser->parse($f);
+}

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2fmt.pl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2fmt.pl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2fmt.pl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,269 @@
+#!/usr/bin/perl
+
+eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+# POD docs at end of file
+
+use strict;
+use Getopt::Long;
+use FileHandle;
+use Data::Stag;
+use GO::Parser;
+
+my $opt = {handler=>'xml'};
+GetOptions($opt,
+	   "help|h",
+           "obo_set",
+           "litemode|l",
+           "format|p=s",
+           "output|o=s",
+           "datatype|t=s",
+           "xslt|xsl|x=s",
+	   "err|e=s",
+           "use_cache",
+           "handler_args|a=s%",
+           "handler|w|writer=s",
+	  );
+
+if ($opt->{help}) {
+    system("perldoc $0");
+    exit;
+}
+
+my $errf = $opt->{err};
+my $errhandler = Data::Stag->getformathandler('xml');
+if ($errf) {
+    $errhandler->file($errf);
+}
+else {
+    $errhandler->fh(\*STDERR);
+}
+
+# create an initial parser object; we won't actually use this
+# to parse; we use this to get the auto-created handler object
+my $initial_parser = GO::Parser->new(%$opt);
+
+# user will specify handler option which makes handler object
+my $main_handler = $initial_parser->handler;
+
+# some handlers will do something directly (eg make objects or
+# write xml); others will go through a stag transform, and
+# then onto the user-specified handler
+if ($main_handler->can("is_transform") &&
+    $main_handler->is_transform) {
+    # create handler chain; the inner handler is what the user
+    # specifies (eg xml output)
+    my $chain_handler =
+      Data::Stag->chainhandlers([$main_handler->CONSUMES],
+                                $main_handler,
+                                'xml');
+    # wrap initial handler inside chained handler
+    $main_handler = $chain_handler;
+}
+
+$main_handler->file($opt->{output}) if $opt->{output};
+
+# unzip etc
+my @files = $initial_parser->normalize_files(@ARGV);
+my $in_set = 0;
+if ($opt->{obo_set} || @files >1) {
+    $main_handler->start_event('obo_set');
+    $in_set = 1;
+}
+while (my $fn = shift @files) {
+    my %h = %$opt;
+    my $fmt;
+    if ($fn =~ /\.obo$/) {
+        $fmt = 'obo_text';
+    }
+    if ($fmt && !$h{format}) {
+        $h{format} = $fmt;
+    }
+    my $parser = new GO::Parser(%h);
+    $parser->handler($main_handler);
+    $parser->litemode(1) if $opt->{litemode};
+    $parser->use_cache(1) if $opt->{use_cache};
+    $parser->errhandler($errhandler);
+    if ($opt->{xslt}) {
+        my $xf = $opt->{xslt};
+        $parser->xslt($xf);
+    }
+    $parser->parse($fn);
+    $parser->handler->export if $parser->handler->can("export");
+}
+$errhandler->finish;
+$main_handler->finish;
+exit 0;
+
+__END__
+
+=head1 NAME
+
+go2fmt.pl
+go2obo_xml
+go2owl
+go2rdf_xml
+go2obo_text
+
+=head1 SYNOPSIS
+
+  go2fmt.pl -w obo_xml -e errlog.xml ontology/*.ontology
+  go2fmt.pl -w obo_xml -e errlog.xml ontology/gene_ontology.obo
+
+=head1 DESCRIPTION
+
+parses any GO/OBO style ontology file and writes out as a different
+format
+
+=head2 ARGUMENTS
+
+=head3 -e ERRFILE
+
+writes parse errors in XML - defaults to STDERR
+(there should be no parse errors in well formed files)
+
+=head3 -p FORMAT
+
+determines which parser to use; if left unspecified, will make a guess
+based on file suffix. See below for formats
+
+=head3 -w|writer FORMAT
+
+format for output - see below for list
+
+=head3 -|xslt XSLT
+
+The name or filename of an XSLT transform
+
+This can either be an absolute path to a file anywhere on the
+filesystem, or it can just be the name of the xslt; eg
+
+  go2fmt.pl -xslt oboxml_to_owl go.obo
+
+If the name is specified, then first of all $GO_ROOT/xml/xsl/*.xsl
+will be searched; if GO_ROOT is not set, then the perl modules dir
+where GO is installed will be searched (the xslts will be installed
+here automatically if you follow the normal install process)
+
+=head2 -use_cache
+
+If this switch is specified, then caching mode is turned on.
+
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the ".cache" suffix.
+
+The next time you parse the file, this program will automatically
+check for the existence of the ".cache" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+
+This will bring a speed improvement for b<some> of the output formats
+below (such as pathlist). Most output formats work with event-based
+parsing, so caching the object brings no benefit and will in fact be
+slower than bypassing the cache
+
+=head2 FORMATS
+
+writable formats are
+
+=over
+
+=item go_ont
+
+Files with suffix ".ontology"
+
+These store the ontology DAGs
+
+=item go_def
+
+Files with suffix ".defs"
+
+=item go_xref
+
+External database references for GO terms
+
+Files with suffix "2go" (eg ec2go, metacyc2go)
+
+=item go_assoc
+
+Annotations of genes or gene products using GO
+
+Files with prefix "gene-association."
+
+=item obo_text
+
+Files with suffix ".obo"
+
+This is a new file format replacement for the existing GO flat file
+formats. It handles ontologies, definitions and xrefs (but not
+associations)
+
+=item obo_xml
+
+Files with suffix ".obo.xml" or ".obo-xml"
+
+This is the XML version of the OBO flat file format above
+
+=item prolog
+
+prolog facts - you will need a prolog compiler/interpreter to use
+these. You can reason over these facts using Obol or the forthcoming
+Bio-LP project
+
+=item tbl
+
+simple (lossy) tabular representation
+
+=item summary
+
+can be used on both ontology files and association files
+
+=item pathlist
+
+shows all paths to the root
+
+=item owl
+
+OWL format (default: OWL-DL)
+
+OWL is a W3C standard format for ontologies
+
+You will need the XSL files from the full go-dev distribution to run
+this; see the XML section in L<http://www.godatabase.org/dev>
+
+=item obj_yaml
+
+a YAML representation of a GO::Model::Graph object
+
+=item obj_storable
+
+A dump of the perl L<GO::Model::Graph> object. You need L<Storable>
+from CPAN for this to work. This is intended to cache objects on the
+filesystem, for fast access. The obj_storable representation may not
+be portable
+
+=item text_html
+
+A html-ified OBO output format
+
+=item godb_prestore
+
+XML that maps directly to the GODB relational schema
+(can then be loaded using stag-storenode.pl)
+
+=item chadodb_prestore
+
+XML that maps directly to the Chado relational schema
+(can then be loaded using stag-storenode.pl)
+
+=back
+
+=head2 DOCUMENTATION
+
+L<http://www.godatabase.org/dev>
+
+=cut
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2godb_prestore
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2godb_prestore	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2godb_prestore	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w xml $@ | go-apply-xslt oboxml_to_godb_prestore -

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w obo $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_html
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_html	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_html	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w obo_html $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_text
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_text	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_text	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w obo_text $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_xml
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_xml	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2obo_xml	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w xml $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2owl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2owl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2owl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w xml $@ | go-apply-xslt oboxml_to_owl -

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2pathlist
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2pathlist	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2pathlist	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w pathlist $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2prolog
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2prolog	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2prolog	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w prolog $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2rdf
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2rdf	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2rdf	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w rdf $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2rdfxml
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2rdfxml	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2rdfxml	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w rdf $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2summary
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2summary	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2summary	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w summary $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2sxpr
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2sxpr	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2sxpr	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w sxpr $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2tbl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2tbl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2tbl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w tbl $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2text_html
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2text_html	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2text_html	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w text_html $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2xml
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2xml	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/go2xml	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+#!/bin/sh
+go2fmt.pl -w xml $@

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/map2slim
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/map2slim	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/bin/map2slim	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,655 @@
+#!/usr/bin/perl -w
+
+eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
+    if 0; # not running under some shell
+
+# POD docs at end of file
+
+use strict;
+use FileHandle;
+use GO::Parser;
+
+if (!@ARGV) {
+    system("perldoc $0");
+    exit;
+}
+if ("@ARGV" eq "-h") {
+    system("perldoc $0");
+    exit;
+}
+
+use Getopt::Long;
+my $opt = {};
+GetOptions($opt,
+           "help",
+           "dbname|d=s",
+           "host|h=s",
+           "out|o=s",
+           "err|e=s",
+           "force",
+	   "ontdir=s",
+           "outmap=s",
+           "cache=s",
+           "inmap=s",
+           "gff",
+           "aspect|a=s",
+	   "count|c",
+	   "tab|t",
+	   "bucket|b=s",
+           "evcode|ev=s@",
+	   "verbose|v");
+
+if ($opt->{help}) {
+    system("perldoc $0");
+    exit;
+}
+my $verbose = $opt->{verbose};
+
+# cached results
+my %memo_mapslim = ();
+
+my $slimfile = shift @ARGV;
+my $assocfile;
+$assocfile = pop @ARGV unless $opt->{outmap};
+my @ontfiles = @ARGV;
+
+if ($opt->{ontdir}) {
+    @ontfiles = glob($opt->{ontdir}."/*{obo}");
+    @ontfiles = glob($opt->{ontdir}."/*{ontology}") unless @ontfiles;
+}
+
+# parse GO-slim and get the slim graph
+my $parser = GO::Parser->new({handler=>'obj'});
+printf STDERR "Parsing slimfile: $slimfile\n" if $verbose;
+$parser->parse($slimfile);
+my $gslim = $parser->handler->graph;
+
+# optionally add "slop" terms; eg "OTHER nucleotide binding"
+my $bucketf = $opt->{bucket};
+if ($bucketf) {
+    printf STDERR "Adding bucket terms to: $bucketf\n" if $verbose;
+    $gslim->add_buckets;
+    if (-f $bucketf && !$opt->{force}) {
+        printf STDERR "Overwrite existing $bucketf file?\n(use -force option to skip this prompt)\n";
+        my $yesno = <STDIN>;
+        unless ($yesno =~ /^y/i) {
+            printf STDERR "Will not overwrite $bucketf. Quitting!\n";
+            exit 1;
+        }
+    }
+    my $fh = FileHandle->new(">$bucketf") || 
+      die("can't write to $bucketf");
+    $gslim->to_text_output(-fh=>$fh);
+    $fh->close;
+}
+
+# make a hash of term objects keyed by slim term accession
+my $slimterms = $gslim->get_all_terms;
+my %slimh = map {$_->acc => $_} @$slimterms;
+
+# parse full ontology
+
+# use cache if required (secret option)
+my $cache = $opt->{cache};
+require "Storable.pm" if $cache;
+my $ont;
+if ($cache && -f $cache) {
+    print STDERR "Using cache: $cache\n" if $verbose;
+    #$ont = YAML::LoadFile($cache);
+    $ont = Storable::retrieve($cache);
+}
+else {
+    if ($opt->{dbname}) {
+        # secret db mode
+        require "GO/AppHandle.pm";
+        my $apph = GO::AppHandle->connect(-dbname=>$opt->{dbname},
+                                          -dbhost=>$opt->{host},
+                                         );
+        $ont = $apph->get_graph(-template=>{terms=>{acc=>1}});
+        $apph->disconnect;
+    }
+    else {
+        my $parser2 = GO::Parser->new({handler=>'obj'});
+        foreach my $ontfile (@ontfiles) {
+            printf STDERR "Parsing ontology file: $ontfile\n" if $verbose;
+            $parser2->litemode(1);
+            $parser2->parse($ontfile);
+        }
+        $ont = $parser2->handler->graph;
+    }
+    if ($cache) {
+        print STDERR "Writing to cache: $cache\n" if $verbose;
+        #print YAML::DumpFile($cache, $ont);
+        store($ont, $cache);
+    }
+}
+
+# write output to stdout or a file
+my $ofh;
+if ($opt->{out}) {
+    $ofh = FileHandle->new(">".$opt->{out}) || die($opt->{out});
+}
+else {
+    $ofh = \*STDOUT;
+}
+
+# initialize counts to 0
+my %countleaf = map { ($_ => 0) } keys %slimh;
+my %countall = %countleaf;
+
+# write out slim mappings and exit if in outmap mode
+if ($opt->{outmap}) {
+    printf STDERR "Writing slim mappings\n" if $verbose;
+    my $outmap = FileHandle->new(">$opt->{outmap}") ||
+      die("cannot open $opt->{outmap} for writing");
+    # write slim mapping for all GO terms
+    my $terms = $ont->get_all_terms;
+    foreach my $t (sort {$a->acc cmp $b->acc} @$terms) {
+	my $acc = $t->acc;
+	my ($leaf_pnodes, $all_pnodes) = mapslim($acc);
+	print $outmap 
+	  "$acc => @$leaf_pnodes // @$all_pnodes\n";
+    }
+    $outmap->close;
+    exit 0;
+}
+
+# use pre-made mappings
+if ($opt->{inmap}) {
+    printf STDERR "Using predefined mappings\n" if $verbose;
+    my $inmap = FileHandle->new(">$opt->{inmap}") ||
+      die("cannot open $opt->{inmap}");
+    while (<$inmap>) {
+	chomp;
+	if (/(\S+)\s*=\>\s*(.*)\s+\/\.\s+(.*)/) {
+	    my $acc = $1;
+	    $memo_mapslim{$acc} = 
+	      [[split(' ', $2)], [split(' ', $3)]];
+	}
+	else {
+	    warn("illegal slimmap line: $_");
+	}
+    }
+    $inmap->close;
+    exit 0;
+}
+
+# hash of hashes - maps slim accessions to gene products
+#  key of outer hash is slim accession
+#  key of inner hash is gene product accession
+#  value is boolean
+my %leafh = ();
+my %allh = ();
+
+my %counted = ();
+my $fh;
+if ($assocfile =~ /\.(Z|gz)$/) {
+    printf STDERR "Uncompressing and mapping $assocfile to slim\n" if $verbose;
+    $fh = FileHandle->new("gzip -dc $assocfile|") || 
+      die("cannot open assocfile: $assocfile");
+}
+else {
+    printf STDERR "Mapping $assocfile to slim\n" if $verbose;
+    $fh = FileHandle->new($assocfile) || 
+      die("cannot open assocfile: $assocfile");
+}
+
+my $gff = $opt->{gff};
+while(<$fh>) {
+    next if /^\!/;
+    chomp;
+    next unless $_;
+    my @cols = split('\t', $_);
+    my $is_not = $cols[3];
+    my $acc = $cols[4];
+    if ($gff) {
+        $is_not = 0;
+        my $type = $cols[2];
+        if ($type =~ /^SO:/) {
+            $acc = $type;
+        }
+        else {
+            my $term = $ont->get_term_by_name($type);
+            if (!$term) {
+                warn("ignoring type: $type");
+                next;
+            }
+            $acc = $term->acc;
+        }
+    }
+    if (!$acc) {
+        printf STDERR "WARNING! NO ACCESSION: $_\n" if $verbose;
+        next;
+    }
+    my $prod = $cols[1];
+    if ($gff) {
+        $prod = $cols[8];
+    }
+
+    next if $is_not && $is_not =~ /^not$/i;                  # skip NOT assocs
+    if ($opt->{aspect}) {
+        next unless $cols[8] eq $opt->{aspect};
+    }
+    if ($opt->{count}) {
+	# save time - if we've encoutered this pair before
+	# then skip it
+	next if $counted{$acc.$prod};
+	$counted{$acc.$prod} = 1;
+    }
+
+    # map the annotated GO term up to the slim term(s)
+    my ($leaf_pnodes, $all_pnodes) = mapslim($acc);
+
+    # mark the gene product as belonging to that slim term
+    $leafh{$_}->{$prod} = 1 foreach @$leaf_pnodes;
+    $allh{$_}->{$prod} = 1 foreach @$all_pnodes;
+
+    unless ($opt->{count}) {
+	foreach my $replacement_acc (@$leaf_pnodes) {
+            if ($gff) {
+                $cols[2] = $replacement_acc;
+            }
+            else {
+                $cols[4] = $replacement_acc;
+            }
+	    print $ofh join("\t", @cols), "\n";
+	}
+    }
+}
+close($fh) || die("problem reading $assocfile");
+
+
+if ($opt->{count}) {
+    printf STDERR "Getting gene product counts\n" if $verbose;
+
+    # iterate through the slim graph, depth-first traversal,
+    # printing out slim term accession & name, and the total
+    # distinct gene products attached to that term or its children
+    $gslim->iterate(
+		    sub {
+			my $ni = shift;
+			my $t = $ni->term;
+                        return if $t->is_relationship_type;
+
+			my $acc = $t->acc;
+			my $t2;	# equivalent term in GO-full
+			if ($acc) {
+			    $t2 = $ont->get_term($acc);
+			} else {
+			    # no equivalent term - the slim id has been
+			    # retired and not tracked; this should
+			    # only happen with old slims
+			    $acc = "NO_ACC";
+			}
+			if ($opt->{tab}) {
+			    my $depth = $ni->depth +1;
+			    printf $ofh ' ' x $depth;
+			}
+                        my $count_leaf = scalar(keys %{$leafh{$acc} || {}}) || 0;
+                        my $count_all = scalar(keys %{$allh{$acc} || {}}) || 0;
+                          
+			printf $ofh ("%s %s (%s)\t%d\t%d\t%s\t%s\n",
+				     $acc,
+				     $t->name,
+				     $t2 && $t2->name ? $t2->name : '?',
+				     $count_leaf || 0,
+				     $count_all || 0,
+				     $t2 && $t2->is_obsolete ? 'OBSOLETE' : '',
+				     $t->type || '',
+				    );
+			return;
+		    },
+                    {no_duplicates=>1}
+		   );
+}
+$ofh->close;
+printf STDERR "Done!\n" if $verbose;
+exit 0;
+
+# function: mapslim($acc)
+#
+# argument: accession [in full GO]
+# returns:  slim-direct-acc-list, slim-all-acc-list
+#
+# slim-direct-acc-list is the slim accs that the input acc DIRECTLY maps to
+#  - this corresponds to the most pertinent slim term
+#
+# slim-all-acc-list is the slim accs that the input acc maps to 
+#                    DIRECT & INDIRECT
+# - this corresponds to ALL the slim terms that are ancestors of input term
+# 
+# algorithm for finding most pertinent slim term:
+#
+# IF a GO acc has two ancestors in the slim,
+#   AND the parents are NOT ancestors of one another
+# THEN the acc maps to BOTH parents
+#
+# IF an acc has two ancestors in the slim,
+#   AND the parents ARE ancestors of one another,
+# THEN the MORE SPECIFIC parent acc is returned
+#
+sub mapslim {
+    my $acc = shift;
+
+    # save time - never recompute on the same accession
+    my $memo = $memo_mapslim{$acc};
+    return (@$memo) if $memo;        # return same result
+
+    # trace the paths to root of the input acc in the full GO
+    # (there may be multiple paths to the root)
+    my $paths = $ont->paths_to_top($acc);
+
+    my $term = $ont->get_term($acc);
+    if (!$term) {
+	# no such accession in GO
+        return ([],[]);
+    }
+
+    # keep hash, keyed by slim accession, boolean value -
+    #  will have true if the slim term is an ancestor of $acc
+    my %ancestorh = ();   # ALL ancestors of $acc in slim
+    my %pancestorh = ();  # ancestors of $acc in slim for which there
+                          #  is a path through another ancestor
+
+    foreach my $path (@$paths) {
+        my $terms = $path->term_list;
+        unshift(@$terms, $term); # make path inclusive of base term
+
+	# if there are "slop" terms (eg OTHER nucleotide binding)
+	# AND there is an IMPLICIT path through this slop term,
+	# then add this to the explicit path
+	if ($opt->{bucket}) {
+	    my $got_leaf = 0;
+	    @$terms = 
+	      map {
+		  my $slimt = $slimh{$_};
+		  my @R = ($_);
+		  if ($slimt && !$got_leaf) {
+		      my $crs = $gslim->get_child_relationships($_);
+		      my @brels = grep {$_->type eq "bucket"} @$crs;
+		      if (@brels) {
+			  my $bterm = $gslim->get_term($brels[0]->acc2);
+			  @R = ($bterm, $_);
+		      }
+		  }
+		  if ($slimt) {
+		      $got_leaf = 1;
+		  }
+		  @R;
+	      } @$terms;
+	}
+
+        my $got_leaf = 0;
+	# follow path from $acc up to root, checking to
+	# see if the intermediate term is in the slim
+        foreach my $term (@$terms) {
+            my $pacc = $term->acc;
+
+            if ($slimh{$pacc}) {
+		# intermediate term is in the slim
+                $ancestorh{$pacc} = 1;
+                if ($got_leaf) {
+                    $pancestorh{$pacc} = 1;
+                }
+                $got_leaf = 1;
+            }
+        }
+    }
+    # find unique ancestors, ie ancestors that are not intermediates to
+    # another anestor
+    my @uancestors = grep {!$pancestorh{$_}} keys %ancestorh;
+    $memo = [[@uancestors], [keys %ancestorh]];
+    #printf STDERR "SLIM($acc) = @{$memo->[0]} // @{$memo->[1]}\n";
+    $memo_mapslim{$acc} = $memo;
+    return @$memo;
+}
+
+__END__
+
+=head1 NAME
+
+map2slim - maps gene associations to a 'slim' ontology
+
+=head1 SYNOPSIS
+
+  cd go
+  map2slim GO_slims/goslim_generic.obo ontology/gene_ontology.obo gene-associations/gene_association.fb
+
+=head1 DESCRIPTION
+
+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
+
+The association file format is described here:
+
+L<http://www.geneontology.org/GO.annotation.shtml#file>
+
+
+=head1 ARGUMENTS
+
+=over
+
+=item -b B<bucket slim file>
+
+This argument adds B<bucket terms> to the slim ontology; see the
+documentation below for an explanation. The new slim ontology file,
+including bucket terms will be written to B<bucket slim file>
+
+=item -outmap B<slim mapping file>
+
+This will generate a mapping file for every term in the full ontology
+showing both the most pertinent slim term and all slim terms that are
+ancestors. If you use this option, do NOT supply a gene-associations
+file
+
+=item -c
+
+This will force map2slim to give counts of the assoc file, rather than map it
+
+=item -t
+
+When used in conjunction with B<-c> will tab the output so that the
+indentation reflects the tree hierarchy in the slim file
+
+=item -o B<out file>
+
+This will write the mapped assocs (or counts) to the specified file,
+rather than to the screen
+
+=back
+
+=head1 DOWNLOAD
+
+This script is part of the B<go-perl> package, available from CPAN
+
+L<http://search.cpan.org/~cmungall/go-perl/>
+
+This script will not work without installing go-perl
+
+=head2 MAPPING ALGORITHM 
+
+GO is a DAG, not a tree. This means that there is often more than one
+path from a GO term up to the root Gene_Ontology node; the path may
+intersect multiple terms in the slim ontology - which means that one
+annotation can map to multiple slim terms!
+
+(B<note> you need to view this online to see the image below - if you
+are not viewing this on the http://www.geneontology.org site, you can look at the following URL:
+L<http://geneontology.cvs.sourceforge.net/*checkout*/geneontology/go-dev/go-perl/doc/map2slim.gif> )
+
+=begin html
+
+<img src="http://geneontology.cvs.sourceforge.net/*checkout*/geneontology/go-dev/go-perl/doc/map2slim.gif"/>
+
+=end html
+
+A hypothetical example  blue circles show terms in the GO slim, and yellow circles show terms in the full ontology. The full ontology subsumes the slim, so the blue terms are also in the ontology.
+
+  GO ID	 MAPS TO SLIM ID	ALL SLIM ANCESTORS
+  =====  ===============        ==================
+  5	 2+3	                2,3,1
+  6	 3 only	                3,1
+  7	 4 only	                4,3,1
+  8	 3 only	                3,1
+  9	 4 only	                4,3,1
+  10	 2+3	                2,3,1
+
+
+The 2nd column shows the most pertinent ID(s) in the slim  the direct mapping. The 3rd column shows all ancestors in the slim.
+
+Note  in particular the mapping of ID 9  although this has two paths to the root through the slim via 3 and 4, 3 is discarded because it is subsumed by 4.
+
+On the other hand, 10 maps to both 2 and 3 because these are both the first slim ID in the two valid paths to the root, and neither subsumes the other.
+
+The algorithm used is:
+
+to map any one term in the full ontology:
+find all valid paths through to the root node in the full ontology
+
+for each path, take the first slim term encountered in the path
+
+discard any redundant slim terms in this set  ie slim terms subsumed by other slim terms in the set
+
+=head2 BUCKET TERMS
+
+If you run the script with the -b option, bucket terms will be added. For any term P in the slim, if P has at least one child C, a bucket term P' will be created under P. This is a catch-all term for mapping any term in the full ontology that is a descendant of P, but NOT a descendant of any child of P in the slim ontology.
+
+For example, the slim generic.0208 has the following terms and structure:
+
+    %DNA binding ; GO:0003677
+     %chromatin binding ; GO:0003682 
+     %transcription factor activity ; GO:0003700, GO:0000130
+
+After adding bucket terms, it will look like this:
+
+   %DNA binding ; GO:0003677
+    %chromatin binding ; GO:0003682
+    %transcription factor activity ; GO:0003700 ; synonym:GO:0000130
+    @bucket:Z-OTHER-DNA binding ; slim_temp_id:12
+
+Terms from the full ontology that are other children of DNA binding, such as single-stranded DNA binding and its descendents will map to the bucket term.
+
+The bucket term has a slim ID which is transient and is there only to facilitate the mapping. It should not be used externally.
+
+The bucket term has the prefix Z-OTHER; the Z is a hack to make sure that the term is always listed last in the alphabetic ordering.
+
+The algorithm is slightly modified if bucket terms are used. The bucket term has an implicit relationship to all OTHER siblings not in the slim.
+
+=head3 Do I need bucket terms?
+
+Nowadays most slim files are entirely or nearly 'complete', that is
+there are no gaps. This means the the -b option will not produce
+noticeable different results. For example, you may see a bucket term
+OTHER-binding created, with nothing annotated to it: because all the
+children of binding in the GO are represented in the slim file.
+
+The bucket option is really only necessary for some of the older
+archived slim files, which are static and were generated in a fairly
+ad-hoc way; they tend to accumulate 'gaps' over time (eg GO will add a
+new child of binding, but the static slim file won't be up to date, so
+any gene products annotated to this new term will map to OTHER-binding
+in the slim)
+
+=head2 GRAPH MISMATCHES
+
+Note that the slim ontology file(s) may be out of date with respect to
+the current ontology.
+
+Currently map2slim does not flag graph mismatches between the slim
+graph and the graph in the full ontology file; it takes the full
+ontology as being the real graph. However, the slim ontology will be
+used to format the results if you select B<-t -c> as options.
+
+=head2 OUTPUT
+
+In normal mode, a standard format gene-association file will be
+written. The GO ID column (5) will contain GO slim IDs. The mapping
+corresponds to the 2nd column in the table above. Note that the output
+file may contain more lines that the input file. This is because some
+full GO IDs have more than one pertinent slim ID.
+
+=head3 COUNT MODE
+
+map2slim can be run with the -c option, which will gives the counts of
+distinct gene products mapped to each slim term. The columns are as follows
+
+=over
+
+=item GO Term
+
+The first column is the GO ID followed by the term name (the term name
+is provided as it is found in both the full GO and slim ontologies -
+these will usually be the same but occasionally the slim file will
+lage behind changes in the GO file)
+
+=item Count of gene products for which this is the most relevant slim term
+
+the number of distinct gene products for which this is the most
+pertinent/direct slim ID. By most direct we mean that either the
+association is made directly to this term, OR the association is made
+to a child of this slim term AND there is no child slim term which the
+association maps to.
+
+For most slims, this count will be equivalent to the number of
+associations directly mapped to this slim term. However, some older
+slim files are "spotty" in that they admit "gaps". For example, if the
+slim has all children of "biological process" with the exception of
+"behavior" then all annotations to "behavior" or its children will be
+counted here
+
+see example below
+
+=item Count of gene products inferred to be associated with slim term
+
+and the number of distinct gene products which are annotated
+to any descendant of this slim ID (or annotated directly to the slim
+ID).
+
+=item obsoletion flag
+
+=item GO ontology
+
+=back
+
+To take an example; if we use -t and -c like this:
+
+  map2slim -t -c GO_slims/goslim_generic.obo ontology/gene_ontology.obo gene-associations/gene_association.fb 
+
+Then part of the results may look like this:
+
+ GO:0008150 biological_process (biological_process)     34      10025           biological_process
+  GO:0007610 behavior (behavior)        632     632             biological_process
+  GO:0000004 biological process unknown (biological process unknown)    832     832             biological_process
+  GO:0007154 cell communication (cell communication)    333     1701            biological_process
+   GO:0008037 cell recognition (cell recognition)       19      19              biological_process                                                              
+19 products were mapped to GO:0008037 or one of its children. (GO:0008037 is a leaf node in the slim, so the two counts are identical).
+
+On the other hand, GO:0008150 only gets 34 products for which this is
+the most relevant term. This is because most annotations would map to
+some child of GO:0008150 in the slim, such as GO:0007610
+(behavior). These 34 gene products are either annotated directly to
+GO:0008150, or to some child of this term which is not in the
+slim. This can point to 'gaps' in the slim. Note that running map2slim
+with the -b option will 'plug' these gaps with artificial filler terms.
+
+
+=head1 AUTHOR
+
+Chris Mungall BDGP
+
+=head1 SEE ALSO
+
+http://www.godatabase.org/dev
+
+L<GO::Parser>
+
+L<GO::Model::Graph>
+
+=cut
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-dag-summary.pl.1p
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-dag-summary.pl.1p	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-dag-summary.pl.1p	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,196 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO-DAG-SUMMARY 1p"
+.TH GO-DAG-SUMMARY 1p "2006-06-28" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+go\-dag\-summary
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  go\-dag\-summary ontology/gene_ontology.obo
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Summarises an ontology
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+\fI\-e \s-1ERRFILE\s0\fR
+.IX Subsection "-e ERRFILE"
+.PP
+writes parse errors in \s-1XML\s0 \- defaults to \s-1STDERR\s0
+(there should be no parse errors in well formed files)
+.PP
+\fI\-p \s-1FORMAT\s0\fR
+.IX Subsection "-p FORMAT"
+.PP
+determines which parser to use; if left unspecified, will make a guess
+based on file suffix. See below for formats
+.Sh "\-use_cache"
+.IX Subsection "-use_cache"
+If this switch is specified, then caching mode is turned on.
+.PP
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the \*(L".cache\*(R" suffix.
+.PP
+The next time you parse the file, this program will automatically
+check for the existence of the \*(L".cache\*(R" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+.SH "OUTPUT"
+.IX Header "OUTPUT"
+One row per ontology
+.PP
+Each row has the following columns
+.IP "input filename" 4
+.IX Item "input filename"
+.PD 0
+.IP "total no of terms" 4
+.IX Item "total no of terms"
+.IP "total no of relationships" 4
+.IX Item "total no of relationships"
+.IP "total no of paths" 4
+.IX Item "total no of paths"
+.IP "avg no of paths per term (p/t)" 4
+.IX Item "avg no of paths per term (p/t)"
+.IP "maximum no of paths for any term" 4
+.IX Item "maximum no of paths for any term"
+.IP "\s-1ID\s0 of term with maximum no of paths" 4
+.IX Item "ID of term with maximum no of paths"
+.PD
+\&\s-1NOTE:\s0 obsolete terms are not included
+.Sh "\s-1DOCUMENTATION\s0"
+.IX Subsection "DOCUMENTATION"
+<http://www.godatabase.org/dev>
+.Sh "\s-1SEE\s0 \s-1ALSO\s0"
+.IX Subsection "SEE ALSO"
+<http://www.fruitfly.org/~cjm/obol/doc/go\-complexity.html>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-export-graph.pl.1p
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-export-graph.pl.1p	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-export-graph.pl.1p	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,183 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO-EXPORT-GRAPH 1p"
+.TH GO-EXPORT-GRAPH 1p "2006-06-28" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+go\-export\-graph.pl
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  go\-export\-graph.pl \-w png ontology/gene_ontology.obo | display \-
+.Ve
+.PP
+.Vb 1
+\&  go\-export\-graph.pl ontology/gene_ontology.obo 'acc' GO:0007610
+.Ve
+.PP
+.Vb 1
+\&  go\-export\-graph.pl ontology/so.obo 'name' 'protein'
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+exports a graph as an indented ascii tree, \s-1PNG\s0 or \s-1OBO\s0 file
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+after the file name you can optionally specify query constraint pairs; eg
+.PP
+.Vb 2
+\& acc GO:0007610
+\& name 'cysteine biosynthesis'
+.Ve
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+\fI\-w \s-1EXPORT_FORMAT\s0\fR
+.IX Subsection "-w EXPORT_FORMAT"
+.PP
+one of \fBtext\fR, \fBobo\fR or \fBpng\fR
+.Sh "\-use_cache"
+.IX Subsection "-use_cache"
+If this switch is specified, then caching mode is turned on.
+.PP
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the \*(L".cache\*(R" suffix.
+.PP
+The next time you parse the file, this program will automatically
+check for the existence of the \*(L".cache\*(R" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+.Sh "\s-1DOCUMENTATION\s0"
+.IX Subsection "DOCUMENTATION"
+<http://www.godatabase.org/dev>
+.Sh "\s-1SEE\s0 \s-1ALSO\s0"
+.IX Subsection "SEE ALSO"
+go2fmt.pl

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-filter-subset.pl.1p
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-filter-subset.pl.1p	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-filter-subset.pl.1p	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,218 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO-FILTER-SUBSET 1p"
+.TH GO-FILTER-SUBSET 1p "2006-06-28" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+go\-filter\-subset.pl \- extracts a subgraph from an ontology file
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  go\-filter\-subset.pl \-id GO:0003767 go.obo
+.Ve
+.PP
+.Vb 1
+\&  go\-filter\-subset.pl \-id GO:0003767 \-to png go.obo | xv \-
+.Ve
+.PP
+.Vb 1
+\&  go\-filter\-subset.pl \-filter_code 'sub{shift\->name =~ /transcr/}' go.obo
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+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.
+.PP
+The subset can be exported in any format, including a graphical image
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+.IP "\-id \s-1ID\s0" 4
+.IX Item "-id ID"
+\&\s-1ID\s0 to use as leaf node in subgraph. All ancestors of this \s-1ID\s0 are
+included in the exported graph (unless \-partial is set)
+.Sp
+Multiple IDs can be passed
+.Sp
+.Vb 1
+\&  \-id ID1 \-id ID2 \-id ID3 ....etc
+.Ve
+.IP "\-subset \s-1SUBSET_ID\s0" 4
+.IX Item "-subset SUBSET_ID"
+Extracts a named subset from the ontology file. (only works with obo
+format files). For example, a specific \s-1GO\s0 slim
+.Sp
+\&\s-1ONLY\s0 terms belonging to the subset are exported \- the \-partial option
+is automatically set
+.IP "\-namespace \s-1NAMESPACE\s0" 4
+.IX Item "-namespace NAMESPACE"
+only terms in this namespace
+.IP "\-filter_code \s-1SUBROUTINE\s0" 4
+.IX Item "-filter_code SUBROUTINE"
+\&\fBadvanced option\fR
+.Sp
+A subroutine with which the GO::Model::Term object is tested for
+inclusion in the subgraph (all ancestors are automatically included)
+.Sp
+You should have an understanding of the go-perl object model before
+using this option
+.Sp
+Example:
+.Sp
+.Vb 1
+\&  go\-filter\-subset \-filter_code 'sub {shift\->namespace eq 'molecular_function'}' go.obo
+.Ve
+.Sp
+(the same things can be achieved with the \-namespace option)
+.IP "\-partial" 4
+.IX Item "-partial"
+If this is set, then only terms that match the user query are
+included. Parentage is set to the next recursive parent node in the
+filter
+.Sp
+For example, with the \-subset option: if X and Y belong to the subset,
+and Z does not, and X is_a Z is_a Y, then the exported graph withh
+have X is_a Y
+.IP "\-use_cache" 4
+.IX Item "-use_cache"
+If this switch is specified, then caching mode is turned on.
+.Sp
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the \*(L".cache\*(R" suffix.
+.Sp
+The next time you parse the file, this program will automatically
+check for the existence of the \*(L".cache\*(R" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+.Sh "\s-1DOCUMENTATION\s0"
+.IX Subsection "DOCUMENTATION"
+<http://www.godatabase.org/dev>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-show-assocs-by-node.pl.1p
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-show-assocs-by-node.pl.1p	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-show-assocs-by-node.pl.1p	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,162 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO-SHOW-ASSOCS-BY-NODE 1p"
+.TH GO-SHOW-ASSOCS-BY-NODE 1p "2006-06-28" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+go\-show\-assocs\-by\-node.pl \- find association for a GO term
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  go\-show\-assocs\-by\-node.pl \-id GO:0008021 gene_ontology.obo gene_associations.fb
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+\fI\-c\fR
+.IX Subsection "-c"
+.PP
+performs a count of gene products, rather than listing them
+.PP
+\fI\-e \s-1ERRFILE\s0\fR
+.IX Subsection "-e ERRFILE"
+.PP
+writes parse errors in \s-1XML\s0 \- defaults to \s-1STDERR\s0
+(there should be no parse errors in well formed files)
+.PP
+\fI\-p \s-1FORMAT\s0\fR
+.IX Subsection "-p FORMAT"
+.PP
+determines which parser to use; if left unspecified, will make a guess
+based on file suffix. See below for formats
+.Sh "\s-1DOCUMENTATION\s0"
+.IX Subsection "DOCUMENTATION"
+<http://www.godatabase.org/dev>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-show-paths-to-root.pl.1p
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-show-paths-to-root.pl.1p	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go-show-paths-to-root.pl.1p	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,180 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO-SHOW-PATHS-TO-ROOT 1p"
+.TH GO-SHOW-PATHS-TO-ROOT 1p "2006-06-28" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+go\-show\-paths\-to\-root.pl \- shows all possible paths from a term to the top
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\&  go\-show\-paths\-to\-root.pl \-id GO:0008021 ontology/gene_ontology.obo
+\&  go\-show\-paths\-to\-root.pl \-names \-id GO:0008021 ontology/gene_ontology.obo
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+traverses \s-1DAG\s0 showing all paths (terms and intervening relationships)
+to the root
+.PP
+This script is purely file based; it needs to parse the ontology each time
+.PP
+Subsequent parses can be speeded up using the use_cache option
+.PP
+If you wish to use the \s-1GO\s0 MySQL db, see the script
+go\-db\-show\-paths\-to\-root.pl in the go-db-perl distribution
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+\fI\-e \s-1ERRFILE\s0\fR
+.IX Subsection "-e ERRFILE"
+.PP
+writes parse errors in \s-1XML\s0 \- defaults to \s-1STDERR\s0
+(there should be no parse errors in well formed files)
+.PP
+\fI\-p \s-1FORMAT\s0\fR
+.IX Subsection "-p FORMAT"
+.PP
+determines which parser to use; if left unspecified, will make a guess
+based on file suffix. See below for formats
+.Sh "\-use_cache"
+.IX Subsection "-use_cache"
+If this switch is specified, then caching mode is turned on.
+.PP
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the \*(L".cache\*(R" suffix.
+.PP
+The next time you parse the file, this program will automatically
+check for the existence of the \*(L".cache\*(R" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+.Sh "\s-1DOCUMENTATION\s0"
+.IX Subsection "DOCUMENTATION"
+<http://www.godatabase.org/dev>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go2fmt.pl.1p
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go2fmt.pl.1p	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/go2fmt.pl.1p	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,279 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO2FMT 1p"
+.TH GO2FMT 1p "2006-06-28" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+go2fmt.pl
+go2obo_xml
+go2owl
+go2rdf_xml
+go2obo_text
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\&  go2fmt.pl \-w obo_xml \-e errlog.xml ontology/*.ontology
+\&  go2fmt.pl \-w obo_xml \-e errlog.xml ontology/gene_ontology.obo
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+parses any \s-1GO/OBO\s0 style ontology file and writes out as a different
+format
+.Sh "\s-1ARGUMENTS\s0"
+.IX Subsection "ARGUMENTS"
+\fI\-e \s-1ERRFILE\s0\fR
+.IX Subsection "-e ERRFILE"
+.PP
+writes parse errors in \s-1XML\s0 \- defaults to \s-1STDERR\s0
+(there should be no parse errors in well formed files)
+.PP
+\fI\-p \s-1FORMAT\s0\fR
+.IX Subsection "-p FORMAT"
+.PP
+determines which parser to use; if left unspecified, will make a guess
+based on file suffix. See below for formats
+.PP
+\fI\-w|writer \s-1FORMAT\s0\fR
+.IX Subsection "-w|writer FORMAT"
+.PP
+format for output \- see below for list
+.PP
+\fI\-|xslt \s-1XSLT\s0\fR
+.IX Subsection "-|xslt XSLT"
+.PP
+The name or filename of an \s-1XSLT\s0 transform
+.PP
+This can either be an absolute path to a file anywhere on the
+filesystem, or it can just be the name of the xslt; eg
+.PP
+.Vb 1
+\&  go2fmt.pl \-xslt oboxml_to_owl go.obo
+.Ve
+.PP
+If the name is specified, then first of all \f(CW$GO_ROOT\fR/xml/xsl/*.xsl
+will be searched; if \s-1GO_ROOT\s0 is not set, then the perl modules dir
+where \s-1GO\s0 is installed will be searched (the xslts will be installed
+here automatically if you follow the normal install process)
+.Sh "\-use_cache"
+.IX Subsection "-use_cache"
+If this switch is specified, then caching mode is turned on.
+.PP
+With caching mode, the first time you parse a file, then an additional
+file will be exported in a special format that is fast to parse. This
+file will have the same filename as the original file, except it will
+have the \*(L".cache\*(R" suffix.
+.PP
+The next time you parse the file, this program will automatically
+check for the existence of the \*(L".cache\*(R" file. If it exists, and is
+more recent than the file you specified, this is parsed instead. If it
+does not exist, it is rebuilt.
+.PP
+This will bring a speed improvement for b<some> of the output formats
+below (such as pathlist). Most output formats work with event-based
+parsing, so caching the object brings no benefit and will in fact be
+slower than bypassing the cache
+.Sh "\s-1FORMATS\s0"
+.IX Subsection "FORMATS"
+writable formats are
+.IP "go_ont" 4
+.IX Item "go_ont"
+Files with suffix \*(L".ontology\*(R"
+.Sp
+These store the ontology DAGs
+.IP "go_def" 4
+.IX Item "go_def"
+Files with suffix \*(L".defs\*(R"
+.IP "go_xref" 4
+.IX Item "go_xref"
+External database references for \s-1GO\s0 terms
+.Sp
+Files with suffix \*(L"2go\*(R" (eg ec2go, metacyc2go)
+.IP "go_assoc" 4
+.IX Item "go_assoc"
+Annotations of genes or gene products using \s-1GO\s0
+.Sp
+Files with prefix \*(L"gene\-association.\*(R"
+.IP "obo_text" 4
+.IX Item "obo_text"
+Files with suffix \*(L".obo\*(R"
+.Sp
+This is a new file format replacement for the existing \s-1GO\s0 flat file
+formats. It handles ontologies, definitions and xrefs (but not
+associations)
+.IP "obo_xml" 4
+.IX Item "obo_xml"
+Files with suffix \*(L".obo.xml\*(R" or \*(L".obo\-xml\*(R"
+.Sp
+This is the \s-1XML\s0 version of the \s-1OBO\s0 flat file format above
+.IP "prolog" 4
+.IX Item "prolog"
+prolog facts \- you will need a prolog compiler/interpreter to use
+these. You can reason over these facts using Obol or the forthcoming
+Bio-LP project
+.IP "tbl" 4
+.IX Item "tbl"
+simple (lossy) tabular representation
+.IP "summary" 4
+.IX Item "summary"
+can be used on both ontology files and association files
+.IP "pathlist" 4
+.IX Item "pathlist"
+shows all paths to the root
+.IP "owl" 4
+.IX Item "owl"
+\&\s-1OWL\s0 format (default: \s-1OWL\-DL\s0)
+.Sp
+\&\s-1OWL\s0 is a W3C standard format for ontologies
+.Sp
+You will need the \s-1XSL\s0 files from the full go-dev distribution to run
+this; see the \s-1XML\s0 section in <http://www.godatabase.org/dev>
+.IP "obj_yaml" 4
+.IX Item "obj_yaml"
+a \s-1YAML\s0 representation of a GO::Model::Graph object
+.IP "obj_storable" 4
+.IX Item "obj_storable"
+A dump of the perl GO::Model::Graph object. You need Storable
+from \s-1CPAN\s0 for this to work. This is intended to cache objects on the
+filesystem, for fast access. The obj_storable representation may not
+be portable
+.IP "text_html" 4
+.IX Item "text_html"
+A html-ified \s-1OBO\s0 output format
+.IP "godb_prestore" 4
+.IX Item "godb_prestore"
+\&\s-1XML\s0 that maps directly to the \s-1GODB\s0 relational schema
+(can then be loaded using stag\-storenode.pl)
+.IP "chadodb_prestore" 4
+.IX Item "chadodb_prestore"
+\&\s-1XML\s0 that maps directly to the Chado relational schema
+(can then be loaded using stag\-storenode.pl)
+.Sh "\s-1DOCUMENTATION\s0"
+.IX Subsection "DOCUMENTATION"
+<http://www.godatabase.org/dev>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/map2slim.1p
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/map2slim.1p	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man1/map2slim.1p	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,357 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "MAP2SLIM 1p"
+.TH MAP2SLIM 1p "2006-06-28" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+map2slim \- maps gene associations to a 'slim' ontology
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\&  cd go
+\&  map2slim GO_slims/goslim_generic.obo ontology/gene_ontology.obo gene\-associations/gene_association.fb
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+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.
+.PP
+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
+.PP
+The association file format is described here:
+.PP
+<http://www.geneontology.org/GO.annotation.shtml#file>
+.SH "ARGUMENTS"
+.IX Header "ARGUMENTS"
+.IP "\-b \fBbucket slim file\fR" 4
+.IX Item "-b bucket slim file"
+This argument adds \fBbucket terms\fR to the slim ontology; see the
+documentation below for an explanation. The new slim ontology file,
+including bucket terms will be written to \fBbucket slim file\fR
+.IP "\-outmap \fBslim mapping file\fR" 4
+.IX Item "-outmap slim mapping file"
+This will generate a mapping file for every term in the full ontology
+showing both the most pertinent slim term and all slim terms that are
+ancestors. If you use this option, do \s-1NOT\s0 supply a gene-associations
+file
+.IP "\-c" 4
+.IX Item "-c"
+This will force map2slim to give counts of the assoc file, rather than map it
+.IP "\-t" 4
+.IX Item "-t"
+When used in conjunction with \fB\-c\fR will tab the output so that the
+indentation reflects the tree hierarchy in the slim file
+.IP "\-o \fBout file\fR" 4
+.IX Item "-o out file"
+This will write the mapped assocs (or counts) to the specified file,
+rather than to the screen
+.SH "DOWNLOAD"
+.IX Header "DOWNLOAD"
+This script is part of the \fBgo-perl\fR package, available from \s-1CPAN\s0
+.PP
+<http://search.cpan.org/~cmungall/go\-perl/>
+.PP
+This script will not work without installing go-perl
+.Sh "\s-1MAPPING\s0 \s-1ALGORITHM\s0"
+.IX Subsection "MAPPING ALGORITHM"
+\&\s-1GO\s0 is a \s-1DAG\s0, not a tree. This means that there is often more than one
+path from a \s-1GO\s0 term up to the root Gene_Ontology node; the path may
+intersect multiple terms in the slim ontology \- which means that one
+annotation can map to multiple slim terms!
+.PP
+(\fBnote\fR you need to view this online to see the image below \- if you
+are not viewing this on the http://www.geneontology.org site, you can look at the following \s-1URL:\s0
+<http://geneontology.cvs.sourceforge.net/*checkout*/geneontology/go\-dev/go\-perl/doc/map2slim.gif> )
+.PP
+A hypothetical example  blue circles show terms in the \s-1GO\s0 slim, and yellow circles show terms in the full ontology. The full ontology subsumes the slim, so the blue terms are also in the ontology.
+.PP
+.Vb 8
+\&  GO ID  MAPS TO SLIM ID        ALL SLIM ANCESTORS
+\&  =====  ===============        ==================
+\&  5      2+3                    2,3,1
+\&  6      3 only                 3,1
+\&  7      4 only                 4,3,1
+\&  8      3 only                 3,1
+\&  9      4 only                 4,3,1
+\&  10     2+3                    2,3,1
+.Ve
+.PP
+The 2nd column shows the most pertinent \s-1ID\s0(s) in the slim  the direct mapping. The 3rd column shows all ancestors in the slim.
+.PP
+Note  in particular the mapping of \s-1ID\s0 9  although this has two paths to the root through the slim via 3 and 4, 3 is discarded because it is subsumed by 4.
+.PP
+On the other hand, 10 maps to both 2 and 3 because these are both the first slim \s-1ID\s0 in the two valid paths to the root, and neither subsumes the other.
+.PP
+The algorithm used is:
+.PP
+to map any one term in the full ontology:
+find all valid paths through to the root node in the full ontology
+.PP
+for each path, take the first slim term encountered in the path
+.PP
+discard any redundant slim terms in this set  ie slim terms subsumed by other slim terms in the set
+.Sh "\s-1BUCKET\s0 \s-1TERMS\s0"
+.IX Subsection "BUCKET TERMS"
+If you run the script with the \-b option, bucket terms will be added. For any term P in the slim, if P has at least one child C, a bucket term P' will be created under P. This is a catch-all term for mapping any term in the full ontology that is a descendant of P, but \s-1NOT\s0 a descendant of any child of P in the slim ontology.
+.PP
+For example, the slim generic.0208 has the following terms and structure:
+.PP
+.Vb 3
+\&    %DNA binding ; GO:0003677
+\&     %chromatin binding ; GO:0003682 
+\&     %transcription factor activity ; GO:0003700, GO:0000130
+.Ve
+.PP
+After adding bucket terms, it will look like this:
+.PP
+.Vb 4
+\&   %DNA binding ; GO:0003677
+\&    %chromatin binding ; GO:0003682
+\&    %transcription factor activity ; GO:0003700 ; synonym:GO:0000130
+\&    @bucket:Z\-OTHER\-DNA binding ; slim_temp_id:12
+.Ve
+.PP
+Terms from the full ontology that are other children of \s-1DNA\s0 binding, such as single-stranded \s-1DNA\s0 binding and its descendents will map to the bucket term.
+.PP
+The bucket term has a slim \s-1ID\s0 which is transient and is there only to facilitate the mapping. It should not be used externally.
+.PP
+The bucket term has the prefix Z\-OTHER; the Z is a hack to make sure that the term is always listed last in the alphabetic ordering.
+.PP
+The algorithm is slightly modified if bucket terms are used. The bucket term has an implicit relationship to all \s-1OTHER\s0 siblings not in the slim.
+.PP
+\fIDo I need bucket terms?\fR
+.IX Subsection "Do I need bucket terms?"
+.PP
+Nowadays most slim files are entirely or nearly 'complete', that is
+there are no gaps. This means the the \-b option will not produce
+noticeable different results. For example, you may see a bucket term
+OTHER-binding created, with nothing annotated to it: because all the
+children of binding in the \s-1GO\s0 are represented in the slim file.
+.PP
+The bucket option is really only necessary for some of the older
+archived slim files, which are static and were generated in a fairly
+ad-hoc way; they tend to accumulate 'gaps' over time (eg \s-1GO\s0 will add a
+new child of binding, but the static slim file won't be up to date, so
+any gene products annotated to this new term will map to OTHER-binding
+in the slim)
+.Sh "\s-1GRAPH\s0 \s-1MISMATCHES\s0"
+.IX Subsection "GRAPH MISMATCHES"
+Note that the slim ontology file(s) may be out of date with respect to
+the current ontology.
+.PP
+Currently map2slim does not flag graph mismatches between the slim
+graph and the graph in the full ontology file; it takes the full
+ontology as being the real graph. However, the slim ontology will be
+used to format the results if you select \fB\-t \-c\fR as options.
+.Sh "\s-1OUTPUT\s0"
+.IX Subsection "OUTPUT"
+In normal mode, a standard format gene-association file will be
+written. The \s-1GO\s0 \s-1ID\s0 column (5) will contain \s-1GO\s0 slim IDs. The mapping
+corresponds to the 2nd column in the table above. Note that the output
+file may contain more lines that the input file. This is because some
+full \s-1GO\s0 IDs have more than one pertinent slim \s-1ID\s0.
+.PP
+\fI\s-1COUNT\s0 \s-1MODE\s0\fR
+.IX Subsection "COUNT MODE"
+.PP
+map2slim can be run with the \-c option, which will gives the counts of
+distinct gene products mapped to each slim term. The columns are as follows
+.IP "\s-1GO\s0 Term" 4
+.IX Item "GO Term"
+The first column is the \s-1GO\s0 \s-1ID\s0 followed by the term name (the term name
+is provided as it is found in both the full \s-1GO\s0 and slim ontologies \-
+these will usually be the same but occasionally the slim file will
+lage behind changes in the \s-1GO\s0 file)
+.IP "Count of gene products for which this is the most relevant slim term" 4
+.IX Item "Count of gene products for which this is the most relevant slim term"
+the number of distinct gene products for which this is the most
+pertinent/direct slim \s-1ID\s0. By most direct we mean that either the
+association is made directly to this term, \s-1OR\s0 the association is made
+to a child of this slim term \s-1AND\s0 there is no child slim term which the
+association maps to.
+.Sp
+For most slims, this count will be equivalent to the number of
+associations directly mapped to this slim term. However, some older
+slim files are \*(L"spotty\*(R" in that they admit \*(L"gaps\*(R". For example, if the
+slim has all children of \*(L"biological process\*(R" with the exception of
+\&\*(L"behavior\*(R" then all annotations to \*(L"behavior\*(R" or its children will be
+counted here
+.Sp
+see example below
+.IP "Count of gene products inferred to be associated with slim term" 4
+.IX Item "Count of gene products inferred to be associated with slim term"
+and the number of distinct gene products which are annotated
+to any descendant of this slim \s-1ID\s0 (or annotated directly to the slim
+\&\s-1ID\s0).
+.IP "obsoletion flag" 4
+.IX Item "obsoletion flag"
+.PD 0
+.IP "\s-1GO\s0 ontology" 4
+.IX Item "GO ontology"
+.PD
+.PP
+To take an example; if we use \-t and \-c like this:
+.PP
+.Vb 1
+\&  map2slim \-t \-c GO_slims/goslim_generic.obo ontology/gene_ontology.obo gene\-associations/gene_association.fb
+.Ve
+.PP
+Then part of the results may look like this:
+.PP
+.Vb 6
+\& GO:0008150 biological_process (biological_process)     34      10025           biological_process
+\&  GO:0007610 behavior (behavior)        632     632             biological_process
+\&  GO:0000004 biological process unknown (biological process unknown)    832     832             biological_process
+\&  GO:0007154 cell communication (cell communication)    333     1701            biological_process
+\&   GO:0008037 cell recognition (cell recognition)       19      19              biological_process                                                              
+\&19 products were mapped to GO:0008037 or one of its children. (GO:0008037 is a leaf node in the slim, so the two counts are identical).
+.Ve
+.PP
+On the other hand, \s-1GO:0008150\s0 only gets 34 products for which this is
+the most relevant term. This is because most annotations would map to
+some child of \s-1GO:0008150\s0 in the slim, such as \s-1GO:0007610\s0
+(behavior). These 34 gene products are either annotated directly to
+\&\s-1GO:0008150\s0, or to some child of this term which is not in the
+slim. This can point to 'gaps' in the slim. Note that running map2slim
+with the \-b option will 'plug' these gaps with artificial filler terms.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Chris Mungall \s-1BDGP\s0
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+http://www.godatabase.org/dev
+.PP
+GO::Parser
+.PP
+GO::Model::Graph

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Basic.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Basic.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Basic.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,149 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Basic 3pm"
+.TH GO::Basic 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Basic     \- basic procedural interface to go\-perl
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 7
+\&  use GO::Basic;
+\&  parse_obo(shift @ARGV);
+\&  find_term(name=>"cytosol");
+\&  print $term\->acc();                 # OO usage
+\&  print acc();                        # procedural usage
+\&  get_parent;
+\&  print name();
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::base.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::base.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::base.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,161 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::base 3pm"
+.TH GO::Handlers::base 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::base     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::base
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Default Handler, other handlers inherit from this class
+.PP
+this class catches events (start, end and body) and allows the
+subclassing module to intercept these. unintercepted events get pushed
+into a tree
+.PP
+See GO::Parser for details on parser/handler architecture
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"
+.Sh "strictorder"
+.IX Subsection "strictorder"
+.Vb 3
+\&  Usage   \- $handler\->strictorder(1);
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+boolean accessor; if set, then terms passed must be in order

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_def.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_def.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_def.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,145 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::go_def 3pm"
+.TH GO::Handlers::go_def 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::go_def     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::go_def
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_ont.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_ont.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_ont.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,145 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::go_ont 3pm"
+.TH GO::Handlers::go_ont 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::go_ont     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::go_ont
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_xref.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_xref.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::go_xref.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,145 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::go_xref 3pm"
+.TH GO::Handlers::go_xref 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::go_xref     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::go_xref
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::godb_prestore.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::godb_prestore.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::godb_prestore.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,151 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::godb_prestore 3pm"
+.TH GO::Handlers::godb_prestore 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::godb_prestore  \- transforms OBO XML to GODB XML
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This is a transform for turning \s-1OBO\s0 \s-1XML\s0 events into \s-1XML\s0 events that
+are isomorphic to the \s-1GO\s0 Database (ie \s-1XML\s0 element names match \s-1GO\s0 \s-1DB\s0
+table and column names).
+.PP
+This transformation is suitable for direct loading into a db using the
+generic DBIx::DBStag loader (see http://stag.sourceforge.net)
+.PP
+This perl transform may later be replaced by an \s-1XSL\s0 transform (for
+speed)
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obj.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obj.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obj.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,168 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::obj 3pm"
+.TH GO::Handlers::obj 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::obj     \- parses GO files into GO object model
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::obj
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "PUBLIC METHODS"
+.IX Header "PUBLIC METHODS"
+.Sh "graph"
+.IX Subsection "graph"
+.Vb 5
+\&  Usage   \- my $terms = $obj_handler\->graph\->get_all_terms;
+\&  Synonym \- g
+\&  Synonym \- ontology
+\&  Returns \- GO::Model::Graph object
+\&  Args    \-
+.Ve
+.PP
+as files are parsed, objects are created; depending on what kind of
+datatype is being parsed, the classes of the created objects will be
+different \- eg GO::Model::Term, GO::Model::Association etc
+.PP
+the way to access all of thses is through the top level graph object
+.PP
+eg
+.PP
+.Vb 3
+\&  $parser = GO::Parser\->new({handler=>'obj'});
+\&  $parser\->parse(@files);
+\&  my $graph = $parser\->graph;
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_godb_flat.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_godb_flat.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_godb_flat.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,147 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::obo_godb_flat 3pm"
+.TH GO::Handlers::obo_godb_flat 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::obo_godb_flat    \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::obo_godb_flat
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+transforms \s-1OBO\s0 \s-1XML\s0 events into flat tables for mysql to load
+part of the association bulk loading pipeline
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_html.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_html.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_html.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,145 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::obo_html 3pm"
+.TH GO::Handlers::obo_html 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::obo_html     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::obo_html
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_text.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_text.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::obo_text.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,148 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::obo_text 3pm"
+.TH GO::Handlers::obo_text 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::obo_text     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::obo_text
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+transforms \s-1OBO\s0 \s-1XML\s0 events into \s-1OBO\s0 Text
+.PP
+<http://www.geneontology.org/GO.format.html#oboflat>
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::owl.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::owl.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::owl.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,157 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::owl 3pm"
+.TH GO::Handlers::owl 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::owl     \- writes OWL
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 3
+\&  use GO::Parser;
+\&  my $p = GO::Parser\->new({handler=>'owl'});
+\&  $p\->parse("function.ontology");
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Consumes an OBO-XML event stream and generates \s-1OWL\s0 \s-1XML\s0
+.PP
+See the file
+.PP
+.Vb 1
+\&  go\-dev/doc/mapping\-obo\-to\-owl.txt
+.Ve
+.PP
+For more details
+.SH "COMMAND LINE"
+.IX Header "COMMAND LINE"
+go2fmt.pl \-w owl function.obo

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::owl_to_obo_text.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::owl_to_obo_text.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::owl_to_obo_text.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,144 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::owl_to_obo_text 3pm"
+.TH GO::Handlers::owl_to_obo_text 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+Bio::Parser::owl_to_obo_text
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+Do not use this module directly.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+.SH "AUTHORS \- Chris Mungall"
+.IX Header "AUTHORS - Chris Mungall"
+Email: cjm at fruitfly.org

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::summary.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::summary.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::summary.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,142 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::summary 3pm"
+.TH GO::Handlers::summary 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::summary     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::tbl.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::tbl.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::tbl.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,145 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::tbl 3pm"
+.TH GO::Handlers::tbl 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::tbl     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::tbl
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::text_html.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::text_html.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::text_html.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,145 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::text_html 3pm"
+.TH GO::Handlers::text_html 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::text_html     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::text_html
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::xsl_base.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::xsl_base.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Handlers::xsl_base.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,145 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Handlers::xsl_base 3pm"
+.TH GO::Handlers::xsl_base 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Handlers::text_html     \-
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Handlers::text_html
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "PUBLIC METHODS \-"
+.IX Header "PUBLIC METHODS -"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Analysis.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Analysis.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Analysis.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,151 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::IO::Analysis 3pm"
+.TH GO::IO::Analysis 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::IO::Analysis     \- preliminary analysis object
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+top level module for doing analyses eg clustalw on the fly
+.SH "CREDITS"
+.IX Header "CREDITS"
+.SH "PUBLIC METHODS"
+.IX Header "PUBLIC METHODS"
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Email cjm at fruitfly.berkeley.edu
+.PP
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Blast.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Blast.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Blast.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,187 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::IO::Blast 3pm"
+.TH GO::IO::Blast 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::IO::Blast     \- Gene Ontology Blast Reports DEPRECATED
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+parses a blast report (must be a a blast that was performed on a seqdb
+that can with headers that can be mapped to go terms via the go
+database)
+.PP
+takes the blast hits, and finds the corresponding \s-1GO\s0 terms (currently
+it requires the fasta to have \*(L"genename:\*(R" in header but we should make
+it configurable)
+.PP
+using the \s-1GO\s0 terms, a GO::Model::Graph is built, with the blast hits
+attached according to product<\->term links.
+.PP
+Any blast hit H that corresponds to a term T implicitly corresponds to
+all the terms above T in the \s-1DAG\s0; eg a hit to a G\-protein coupled
+receptor is implicitly a hit to a transmembrane receptor.
+.PP
+At every node, all the scores (including implicit scores from hits
+further down) are combined. Currently we
+are playing with this as the scording scheme: 
+.PP
+log2( 2 ** score1 + 2 ** score2 +.... 2** scoreN)
+.PP
+Hits are only counted once at each node.
+.PP
+.Vb 2
+\&  TODO \- use bioperl to parse full report if required 
+\&           (currently parses summary)
+.Ve
+.PP
+.Vb 1
+\&  TODO \- configurable ways to go from fasta header to GO terms
+.Ve
+.PP
+.Vb 1
+\&  TODO \- different scoring schemes
+.Ve
+.PP
+.Vb 1
+\&  TODO \- result object
+.Ve
+.SH "PUBLIC METHODS \- Blast"
+.IX Header "PUBLIC METHODS - Blast"
+.SH "FEEDBACK"
+.IX Header "FEEDBACK"
+Email cjm at fruitfly.berkeley.edu
+.PP
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Dotty.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Dotty.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::Dotty.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,149 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::IO::Dotty 3pm"
+.TH GO::IO::Dotty 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::IO::Dotty;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  Utility functions for producing Dotty diagrams from GO graphs
+.Ve
+.PP
+.Vb 1
+\&  Contributed to the go\-database list by Philip Lord
+.Ve
+.SH "REQUIREMENTS"
+.IX Header "REQUIREMENTS"
+http://www.research.att.com/sw/tools/graphviz/
+http://search.cpan.org/search?dist=GraphViz

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::OBDXML.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::OBDXML.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::OBDXML.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,252 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::IO::OBDXML 3pm"
+.TH GO::IO::OBDXML 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::IO::OBDXML;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\&    my $apph = GO::AppHandle\->connect(\-d=>$go, \-dbhost=>$dbhost);
+\&    my $term = $apph\->get_term({acc=>00003677});
+.Ve
+.PP
+.Vb 2
+\&    #### ">\-" is STDOUT
+\&    my $out = new FileHandle(">\-");
+.Ve
+.PP
+.Vb 4
+\&    my $xml_out = GO::IO::OBDXML\->new(\-output=>$out);
+\&    $xml_out\->start_document();
+\&    $xml_out\->draw_term($term);
+\&    $xml_out\->end_document();
+.Ve
+.PP
+\&\s-1OR:\s0
+.PP
+.Vb 3
+\&    my $apph = GO::AppHandle\->connect(\-d=>$go, \-dbhost=>$dbhost);
+\&    my $term = $apph\->get_node_graph(\-acc=>00003677, \-depth=>2);
+\&    my $out = new FileHandle(">\-");
+.Ve
+.PP
+.Vb 4
+\&    my $xml_out = GO::IO::OBDXML(\-output=>$out);
+\&    $xml_out\->start_document();
+\&    $xml_out\->draw_graph($term, 3677);
+\&    $xml_out\->end_document();
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Utility class to dump \s-1GO\s0 terms as \s-1OBD\s0 \s-1XML\s0.  Currently you just call
+start_ducument, then draw_term for each term, then end_document.
+.Sh "new"
+.IX Subsection "new"
+.Vb 3
+\&    Usage   \- my $xml_out = GO::IO::OBDXML\->new(\-output=>$out);
+\&    Returns \- None
+\&    Args    \- Output FileHandle
+.Ve
+.PP
+Initializes the writer object.  To write to standard out, do:
+.PP
+my \f(CW$out\fR = new FileHandle(\*(L">\-\*(R");
+my \f(CW$xml_out\fR = new \s-1GO::IO::OBDXML\s0(\-output=>$out);
+.Sh "cgi_header"
+.IX Subsection "cgi_header"
+.Vb 3
+\&    Usage   \- $xml_out\->cgi_header;
+\&    Returns \- None
+\&    Args    \- None
+.Ve
+.PP
+cgi_header prints the \*(L"Content\-type: text/xml\*(R" statement.
+If creating a \s-1CGI\s0 script, you should call this before start_document.
+.Sh "start_document"
+.IX Subsection "start_document"
+.Vb 3
+\&    Usage   \- $xml_out\->start_document;
+\&    Returns \- None
+\&    Args    \- None
+.Ve
+.PP
+start_document 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.
+.Sh "start_graph"
+.IX Subsection "start_graph"
+.Vb 3
+\&    Usage   \- $xml_out\->start_graph;
+\&    Returns \- None
+\&    Args    \- None
+.Ve
+.PP
+start_graph opens a new graph segment.
+.Sh "end_document"
+.IX Subsection "end_document"
+.Vb 1
+\&    Usage   \- $xml_out\->end_document;
+.Ve
+.PP
+Call this when done.
+.Sh "end_graph"
+.IX Subsection "end_graph"
+.Vb 1
+\&    Usage   \- $xml_out\->end_graph;
+.Ve
+.PP
+Call this when done a graph segment.
+.Sh "draw_node_graph"
+.IX Subsection "draw_node_graph"
+.Vb 7
+\&    Usage   \- $xml_out\->draw_node_graph(\-graph=>$graph);
+\&    Returns \- None
+\&    Args    \-graph=>$graph,
+\&            \-show_associations=>'yes' or 'no', # optional, default 'yes'.
+\&            \-show_terms=>'yes' or 'no',        # optional, default 'yes'.
+\&            \-show_xrefs=>'yes' or 'no',        # optional, default 'yes'.
+\&            \-show_evidence=>'yes' or 'no',     # optional, default 'yes'.
+.Ve
+.Sh "draw_term"
+.IX Subsection "draw_term"
+.Vb 8
+\&    Usage   \- $xml_out\->draw_term();
+\&    Returns \- None
+\&    Args    \-term=>$term,
+\&            \-graph=>$graph,                    # optional
+\&            \-show_associations=>'yes' or 'no', # optional, default 'yes'.
+\&            \-show_terms=>'yes' or 'no',        # optional, default 'yes'.
+\&            \-show_xrefs=>'yes' or 'no',        # optional, default 'yes'.
+\&            \-show_evidence=>'yes' or 'no',     # optional, default 'yes'.
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::ObanOwl.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::ObanOwl.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::ObanOwl.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,251 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::IO::ObanOwl 3pm"
+.TH GO::IO::ObanOwl 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::IO::ObanOwl;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\&    my $apph = GO::AppHandle\->connect(\-d=>$go, \-dbhost=>$dbhost);
+\&    my $term = $apph\->get_term({acc=>00003677});
+.Ve
+.PP
+.Vb 2
+\&    #### ">\-" is STDOUT
+\&    my $out = new FileHandle(">\-");
+.Ve
+.PP
+.Vb 4
+\&    my $xml_out = GO::IO::XML\->new(\-output=>$out);
+\&    $xml_out\->start_document();
+\&    $xml_out\->draw_term($term);
+\&    $xml_out\->end_document();
+.Ve
+.PP
+\&\s-1OR:\s0
+.PP
+.Vb 3
+\&    my $apph = GO::AppHandle\->connect(\-d=>$go, \-dbhost=>$dbhost);
+\&    my $term = $apph\->get_node_graph(\-acc=>00003677, \-depth=>2);
+\&    my $out = new FileHandle(">\-");
+.Ve
+.PP
+.Vb 4
+\&    my $xml_out = GO::IO::XML(\-output=>$out);
+\&    $xml_out\->start_document();
+\&    $xml_out\->draw_node_graph($term, 3677);
+\&    $xml_out\->end_document();
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Utility class to dump \s-1GO\s0 terms as xml.  Currently you just call
+start_ducument, then draw_term for each term, then end_document.
+.PP
+If there's a need I'll add draw_node_graph, draw_node_list, etc.
+.Sh "new"
+.IX Subsection "new"
+.Vb 3
+\&    Usage   \- my $xml_out = GO::IO::XML\->new(\-output=>$out);
+\&    Returns \- None
+\&    Args    \- Output FileHandle
+.Ve
+.PP
+Initializes the writer object.  To write to standard out, do:
+.PP
+my \f(CW$out\fR = new FileHandle(\*(L">\-\*(R");
+my \f(CW$xml_out\fR = new \s-1GO::IO::XML\s0(\-output=>$out);
+.Sh "xml_header"
+.IX Subsection "xml_header"
+.Vb 3
+\&    Usage   \- $xml_out\->xml_header;
+\&    Returns \- None
+\&    Args    \- None
+.Ve
+.PP
+start_document prints the \*(L"Content\-type: text/xml\*(R" statement.
+If creating a cgi script, you should call this before start_document.
+.Sh "start_document"
+.IX Subsection "start_document"
+.Vb 3
+\&    Usage   \- $xml_out\->start_document(\-timestamp=>$time);
+\&    Returns \- None
+\&    Args    \- optional: timestamp string, pre\-formatted
+.Ve
+.PP
+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.
+.Sh "end_document"
+.IX Subsection "end_document"
+.Vb 1
+\&    Usage   \- $xml_out\->end_document();
+.Ve
+.PP
+Call this when done.
+.Sh "draw_node_graph"
+.IX Subsection "draw_node_graph"
+.Vb 5
+\&    Usage   \- $xml_out\->draw_node_graph(\-graph=>$graph);
+\&    Returns \- None
+\&    Args    \-graph=>$node_graph, 
+\&            \-focus=>$acc,                      ## optional
+\&            \-show_associations=>"yes" or "no"  ## optional
+.Ve
+.Sh "draw_term"
+.IX Subsection "draw_term"
+.Vb 7
+\&    Usage   \- $xml_out\->draw_term();
+\&    Returns \- None
+\&    Args    \-term=>$term, 
+\&            \-graph=>$graph, 
+\&            \-is_focus=>"yes" or "no",    ## optional
+\&            \-show_associations=>"yes" or "no",    ## optional
+\&            \-show_terms=>"yes" or "no",    ## optional, just draws associations
+.Ve
+.Sh ""
+.IX Subsection ""
+sub characters
+.PP
+.Vb 2
+\&  This is simply a wrapper to XML::Writer\->characters
+\&  which strips out any non\-ascii characters.
+.Ve
+.Sh ""
+.IX Subsection ""
+sub dataElement
+.PP
+.Vb 2
+\&  This is simply a wrapper to XML::Writer\->dataElement
+\&  which strips out any non\-ascii characters.
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::RDFXML.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::RDFXML.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::RDFXML.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,251 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::IO::RDFXML 3pm"
+.TH GO::IO::RDFXML 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::IO::RDFXML;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\&    my $apph = GO::AppHandle\->connect(\-d=>$go, \-dbhost=>$dbhost);
+\&    my $term = $apph\->get_term({acc=>00003677});
+.Ve
+.PP
+.Vb 2
+\&    #### ">\-" is STDOUT
+\&    my $out = new FileHandle(">\-");
+.Ve
+.PP
+.Vb 4
+\&    my $xml_out = GO::IO::XML\->new(\-output=>$out);
+\&    $xml_out\->start_document();
+\&    $xml_out\->draw_term($term);
+\&    $xml_out\->end_document();
+.Ve
+.PP
+\&\s-1OR:\s0
+.PP
+.Vb 3
+\&    my $apph = GO::AppHandle\->connect(\-d=>$go, \-dbhost=>$dbhost);
+\&    my $term = $apph\->get_node_graph(\-acc=>00003677, \-depth=>2);
+\&    my $out = new FileHandle(">\-");
+.Ve
+.PP
+.Vb 4
+\&    my $xml_out = GO::IO::XML(\-output=>$out);
+\&    $xml_out\->start_document();
+\&    $xml_out\->draw_node_graph($term, 3677);
+\&    $xml_out\->end_document();
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Utility class to dump \s-1GO\s0 terms as xml.  Currently you just call
+start_ducument, then draw_term for each term, then end_document.
+.PP
+If there's a need I'll add draw_node_graph, draw_node_list, etc.
+.Sh "new"
+.IX Subsection "new"
+.Vb 3
+\&    Usage   \- my $xml_out = GO::IO::XML\->new(\-output=>$out);
+\&    Returns \- None
+\&    Args    \- Output FileHandle
+.Ve
+.PP
+Initializes the writer object.  To write to standard out, do:
+.PP
+my \f(CW$out\fR = new FileHandle(\*(L">\-\*(R");
+my \f(CW$xml_out\fR = new \s-1GO::IO::XML\s0(\-output=>$out);
+.Sh "xml_header"
+.IX Subsection "xml_header"
+.Vb 3
+\&    Usage   \- $xml_out\->xml_header;
+\&    Returns \- None
+\&    Args    \- None
+.Ve
+.PP
+start_document prints the \*(L"Content\-type: text/xml\*(R" statement.
+If creating a cgi script, you should call this before start_document.
+.Sh "start_document"
+.IX Subsection "start_document"
+.Vb 3
+\&    Usage   \- $xml_out\->start_document(\-timestamp=>$time);
+\&    Returns \- None
+\&    Args    \- optional: timestamp string, pre\-formatted
+.Ve
+.PP
+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.
+.Sh "end_document"
+.IX Subsection "end_document"
+.Vb 1
+\&    Usage   \- $xml_out\->end_document();
+.Ve
+.PP
+Call this when done.
+.Sh "draw_node_graph"
+.IX Subsection "draw_node_graph"
+.Vb 5
+\&    Usage   \- $xml_out\->draw_node_graph(\-graph=>$graph);
+\&    Returns \- None
+\&    Args    \-graph=>$node_graph, 
+\&            \-focus=>$acc,                      ## optional
+\&            \-show_associations=>"yes" or "no"  ## optional
+.Ve
+.Sh "draw_term"
+.IX Subsection "draw_term"
+.Vb 7
+\&    Usage   \- $xml_out\->draw_term();
+\&    Returns \- None
+\&    Args    \-term=>$term, 
+\&            \-graph=>$graph, 
+\&            \-is_focus=>"yes" or "no",    ## optional
+\&            \-show_associations=>"yes" or "no",    ## optional
+\&            \-show_terms=>"yes" or "no",    ## optional, just draws associations
+.Ve
+.Sh ""
+.IX Subsection ""
+sub characters
+.PP
+.Vb 2
+\&  This is simply a wrapper to XML::Writer\->characters
+\&  which strips out any non\-ascii characters.
+.Ve
+.Sh ""
+.IX Subsection ""
+sub dataElement
+.PP
+.Vb 2
+\&  This is simply a wrapper to XML::Writer\->dataElement
+\&  which strips out any non\-ascii characters.
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::go_assoc.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::go_assoc.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::IO::go_assoc.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,227 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::IO::go_assoc 3pm"
+.TH GO::IO::go_assoc 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::IO::go_assoc;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\&    my $apph = GO::AppHandle\->connect(\-d=>$go, \-dbhost=>$dbhost);
+\&    my $term = $apph\->get_term({acc=>00003677});
+.Ve
+.PP
+.Vb 2
+\&    #### ">\-" is STDOUT
+\&    my $out = new FileHandle(">\-");
+.Ve
+.PP
+.Vb 2
+\&    my $ga_out = GO::IO::go_assoc\->new(\-output=>$out);
+\&    $ga_out\->write_term($term);
+.Ve
+.PP
+\&\s-1OR:\s0
+.PP
+.Vb 3
+\&    my $apph = GO::AppHandle\->connect(\-d=>$go, \-dbhost=>$dbhost);
+\&    my $graph = $apph\->get_node_graph(\-acc=>00003677, \-depth=>2);
+\&    my $out = new FileHandle(">\-");
+.Ve
+.PP
+.Vb 2
+\&    my $ga_out = GO::IO::go_assoc\->new(\-output=>$out);
+\&    $ga_out\->write_graph($graph);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Utility class to dump \s-1GO\s0 terms as \s-1OBD\s0 \s-1XML\s0.  Currently, you just call
+start_document, write_term for each term, then end_document.
+.Sh "new"
+.IX Subsection "new"
+.Vb 3
+\&    Usage   \- my $ga_out = new GO::IO::go_assoc(\-output=>$out);
+\&    Returns \- Output emitter.
+\&    Args    \- Output FileHandle
+.Ve
+.PP
+Initializes the writer object.  To write to standard out, do:
+.PP
+my \f(CW$out\fR = new FileHandle(\*(L">\-\*(R");
+my \f(CW$ga_out\fR = new GO::IO::go_assoc($out);
+.Sh "cgi_header"
+.IX Subsection "cgi_header"
+.Vb 3
+\&    Usage   \- $ga_out\->cgi_header;
+\&    Returns \- None
+\&    Args    \- None
+.Ve
+.PP
+cgi_header prints the \*(L"Content\-type: text/plain\*(R" statement.
+If creating a \s-1CGI\s0 script, you should call this before further action.
+.Sh "write_graph"
+.IX Subsection "write_graph"
+.Vb 8
+\&    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.
+.Ve
+.Sh "write_term_list"
+.IX Subsection "write_term_list"
+.Vb 8
+\&    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.
+.Ve
+.Sh "write_term"
+.IX Subsection "write_term"
+.Vb 8
+\&    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.
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Association.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Association.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Association.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,274 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Association 3pm"
+.TH GO::Model::Association 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Association;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 9
+\&  # print all gene products associated with a GO::Model::Term
+\&  my $assoc_l = $term\->association_list;
+\&  foreach my $assoc (@$assoc_l) {
+\&    printf "gene product:%s %s %s (evidence: %s)\en",
+\&      $assoc\->gene_product\->symbol,
+\&      $assoc\->is_not ? "IS NOT" : "IS",
+\&      $term\->name,
+\&      map {$_\->code} @{$assoc\->evidence_list};
+\&  }
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Represents an association between a \s-1GO\s0 term (GO::Model::Term) and a
+gene product (GO::Model::GeneProduct)
+.Sh "go_public_acc"
+.IX Subsection "go_public_acc"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "add_evidence"
+.IX Subsection "add_evidence"
+.Vb 3
+\&  Usage   \- $assoc\->add_evidence($my_evid);
+\&  Returns \-
+\&  Args    \- GO::Model::Evidence
+.Ve
+.Sh "evidence_list"
+.IX Subsection "evidence_list"
+.Vb 3
+\&  Usage   \- my $ev_l = $assoc\->evidence_list;
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+gets/sets arrayref of GO::Model::Evidence
+.Sh "evidence_as_str"
+.IX Subsection "evidence_as_str"
+.Vb 4
+\&  Usage   \- print $assoc\->evidence_as_str
+\&  Usage   \- print $assoc\->evidence_as_str(1); #verbose
+\&  Returns \-
+\&  Args    \- verbose
+.Ve
+.PP
+concatenates evcodes together, for display
+.Sh "has_evcode"
+.IX Subsection "has_evcode"
+.Vb 3
+\&  Usage   \- if $assoc\->has_evcode("IEA");
+\&  Returns \- boolean
+\&  Args    \- evcode [string]
+.Ve
+.Sh "remove_evcode"
+.IX Subsection "remove_evcode"
+.Vb 3
+\&  Usage   \- $assoc\->remove_evcode("IEA");
+\&  Returns \- 
+\&  Args    \- evcode [string]
+.Ve
+.PP
+removes all evidence of the specified type from the
+association; useful for filtering
+.Sh "evidence_score"
+.IX Subsection "evidence_score"
+.Vb 3
+\&  Usage   \- my $score = $assoc\->evidence_score
+\&  Returns \- 0 <= float <= 1
+\&  Args    \-
+.Ve
+.PP
+returns a score for the association based on the evidence;
+.PP
+This is an \s-1EXPERIMENTAL\s0 method; it may be removed in future versions.
+.PP
+The evidence fields can be thought of in a loose hierachy: 
+.PP
+\&\s-1TAS\s0
+   \s-1IDA\s0
+      \s-1IMP/IGI/IPI\s0
+                 \s-1ISS\s0
+                    \s-1NAS\s0
+.PP
+see http://www.geneontology.org/GO.evidence.html
+.Sh "gene_product"
+.IX Subsection "gene_product"
+.Vb 3
+\&  Usage   \- my $gp = $assoc\->gene_product
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+gets sets GO::Model::GeneProduct
+.Sh "assigned_by"
+.IX Subsection "assigned_by"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "is_not"
+.IX Subsection "is_not"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+gets/sets boolean representing whether this relationship is negated
+.Sh "assocdate"
+.IX Subsection "assocdate"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "assocdate"
+.IX Subsection "assocdate"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+gets/sets integer representing the date of the association (\s-1YYYYMMDD\s0 format)
+.Sh "role_group"
+.IX Subsection "role_group"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+gets/sets integer to indicate which associations go together

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::CrossProduct.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::CrossProduct.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::CrossProduct.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,142 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::CrossProduct 3pm"
+.TH GO::Model::CrossProduct 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::CrossProduct;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+for cross products \- an intersection between another class/term and a
+list of anonymous subclass over some restrictions

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::DB.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::DB.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::DB.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,141 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::DB 3pm"
+.TH GO::Model::DB 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::DB;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Fields: name fullname datatype generic_url url_syntax url_example

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Evidence.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Evidence.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Evidence.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,248 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Evidence 3pm"
+.TH GO::Model::Evidence 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Evidence;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 6
+\&  my $ev_l = $association\->evidence_list;
+\&  foreach my $ev (@$ev_l) {
+\&    print "Evidence for association %s : %s\en",
+\&      $association\->gene_product\->symbol,
+\&      $ev\->code;
+\&  }
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+evidence for an association
+.PP
+see http://www.geneontology.org/GO.evidence.html
+for a list of evidence codes
+.Sh "code"
+.IX Subsection "code"
+.Vb 3
+\&  Usage   \- $ev\->code("IEA");
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+gets/sets the evidence code
+.PP
+see http://www.geneontology.org/GO.evidence.html
+.Sh "seq_acc"
+.IX Subsection "seq_acc"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+gets/sets the sequence accesion GO::Model::Xref
+.PP
+\&\s-1ALPHA\s0 \s-1CODE\s0  \- \s-1API\s0 may change
+.PP
+used to set the GO::Model::Xref list from a text string. eg
+.PP
+.Vb 1
+\&  $ev\->seq_acc("SGD:RRP41; SGDID:L0003550");
+.Ve
+.PP
+will actually add two GO::Model::Xref objects
+.PP
+This method doesnt really belong in the GO::Model::* hierarchy as it
+contains parsing code. Its a minor hack mainly due to the fact that
+this data is still denormalized in the database.
+.Sh "add_seq_xref"
+.IX Subsection "add_seq_xref"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+equivalent to \s-1WITH\s0 column in gene_association files, and evidence_dbxref tables in db
+.Sh "add_pub_xref"
+.IX Subsection "add_pub_xref"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "xref"
+.IX Subsection "xref"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+gets/sets the literature or sequence reference GO::Model::Xref
+.PP
+\&\s-1NOTE:\s0 at some point we may want to deprecate this method and persuade
+\&\s-1API\s0 client code to call
+.PP
+.Vb 1
+\&  $ev\->literature_xref
+.Ve
+.PP
+instead, to make explicit the fact that this is a literature reference
+as opposed to a sequence reference
+.Sh "xref_list"
+.IX Subsection "xref_list"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::Xref listref
+\&  Args    \-
+.Ve
+.PP
+returns all (sequence and literature) references
+.Sh "xref"
+.IX Subsection "xref"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+deprected \- sets first pub_xref_list
+.Sh "valid_codes"
+.IX Subsection "valid_codes"
+.Vb 3
+\&  Usage   \- print join("; ", GO::Model::Evidence\->valid_codes);
+\&  Returns \- string array
+\&  Args    \-
+.Ve
+.PP
+list of valid evidence codes

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GeneProduct.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GeneProduct.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GeneProduct.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,252 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::GeneProduct 3pm"
+.TH GO::Model::GeneProduct 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::GeneProduct;
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+represents a gene product in a particular species (this will
+effectively always be refered to implicitly by the gene symbol even
+though a gene may have >1 product)
+.Sh "acc"
+.IX Subsection "acc"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "symbol"
+.IX Subsection "symbol"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "type"
+.IX Subsection "type"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "full_name"
+.IX Subsection "full_name"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "as_str"
+.IX Subsection "as_str"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "add_synonym"
+.IX Subsection "add_synonym"
+.Sh "synonym_list"
+.IX Subsection "synonym_list"
+accessor: gets/set list of synonyms [array reference]
+.Sh "speciesdb"
+.IX Subsection "speciesdb"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "add_seq"
+.IX Subsection "add_seq"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \- GO::Model::Seq
+.Ve
+.Sh "seq_list"
+.IX Subsection "seq_list"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::Seq listref
+\&  Args    \-
+.Ve
+.Sh "seq"
+.IX Subsection "seq"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::Seq
+\&  Args    \-
+.Ve
+.PP
+returns representative sequence object for this product
+.Sh "properties"
+.IX Subsection "properties"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- hashref
+\&  Args    \- hashref
+.Ve
+.Sh "set_property"
+.IX Subsection "set_property"
+.Vb 3
+\&  Usage   \- $sf\->set_property("wibble", "on");
+\&  Returns \-
+\&  Args    \- property key, property scalar
+.Ve
+.PP
+note: the property is assumed to be multivalued, therefore
+  \f(CW$sf\fR\->set_property($k, \f(CW$scalar\fR) will add to the array, and
+  \f(CW$sf\fR\->set_property($k, \f(CW$arrayref\fR) will set the array
+.Sh "get_property"
+.IX Subsection "get_property"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- first element of the property
+\&  Args    \- property key
+.Ve
+.Sh "get_property_list"
+.IX Subsection "get_property_list"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- the property arrayref
+\&  Args    \- property key
+.Ve
+.Sh "to_fasta"
+.IX Subsection "to_fasta"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+returns the longest seq by default

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Graph.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Graph.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Graph.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,1028 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Graph 3pm"
+.TH GO::Model::Graph 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+GO::Model::Graph    \- a collection of relationships over terms
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 21
+\&  # FETCHING GRAPH FROM FILES
+\&  use GO::Parser;
+\&  my $parser = new GO::Parser({handler=>'obj'});
+\&  $parser\->parse("gene_ontology.obo");     # ontology
+\&  $parser\->parse("gene\-associations.sgd"); # gene assocs
+\&  # get L<GO::Model::Graph> object
+\&  my $graph = $parser\->handler\->graph;
+\&  my $terms = $graph\->term_query("/transmembrane/");  # matching terms
+\&  foreach my $term (@$terms) {
+\&    # find gene products associated to this term
+\&    my $assocs = $graph\->deep_association_list($term\->acc);
+\&    printf "Term: %s %s\en", $term\->acc, $term\->name;
+\&    print "  Associations (direct and via transitive closure_\en";
+\&    foreach my $assoc (@$assocs) {
+\&      next if $assoc\->is_not;
+\&      printf "  Assoc evidence: %s to: %s %s\en",
+\&        join(';', map {$_\->code} @{$assoc\->evidence_list}),
+\&        $assoc\->gene_product\->xref\->as_str,
+\&        $assoc\->gene_product\->symbol;
+\&    }
+\&  }
+.Ve
+.PP
+.Vb 1
+\&  # \-\- alternatively, use this code... \-\-
+.Ve
+.PP
+.Vb 6
+\&  # FETCHING FROM DATABASE (requires go\-db\-perl library)
+\&  # pretty\-printing a subgraph from "nuclear pore"
+\&  $apph = GO::AppHandle\->connect(\-dbname=>"$dbname");
+\&  $term = $apph\->get_term({name=>"nuclear pore"});
+\&  $graph =
+\&          $apph\->get_graph_by_terms([$term], $depth);
+.Ve
+.PP
+.Vb 2
+\&  $it = $graph\->create_iterator;
+\&  # returns a GO::Model::GraphIterator object
+.Ve
+.PP
+.Vb 13
+\&  while (my $ni = $it\->next_node_instance) {
+\&    $depth = $ni\->depth;
+\&    $term = $ni\->term;
+\&    $reltype = $ni\->parent_rel\->type;
+\&    printf 
+\&      "%s %8s Term = %s (%s)  // number_of_association=%s // depth=%d\en",
+\&          "\-\-\-\-" x $depth,
+\&          $reltype,
+\&          $term\->name,
+\&          $term\->public_acc,
+\&          $term\->n_associations || 0,
+\&          $depth;
+\&  }
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Object containing Nodes (GO::Model::Term objects) and relationships
+(:<GO::Model::Relationship> objects)
+.PP
+this may be either the whole ontology tree, or a subgraph, depending
+on how the object is instantiated.
+.Sh "\s-1ONTOLOGY\s0 \s-1GRAPH\s0 \s-1MODEL\s0"
+.IX Subsection "ONTOLOGY GRAPH MODEL"
+relationships can be thought of as \fBstatements\fR or sentences of the form
+.PP
+.Vb 1
+\&  SUBJECT\-TERM PREDICATE OBJECT\-TERM
+.Ve
+.PP
+for example,
+.PP
+.Vb 1
+\&  "dog" IS_A "animal"
+.Ve
+.PP
+.Vb 1
+\&  "G\-Protein coupled receptor" IS_A "transmembrane receptor"
+.Ve
+.PP
+Statements have a \fBsubject\fR (i.e. the subject of the
+sentence/statement), a predicate/relationship\-type and an \fBobject\fR
+(i.e. the object of the sentence/statement)
+.PP
+Relationships can also be seen as arcs in a directed graph, with the
+subject being equivalent to the child, and the object equivalent to
+the parent. The arc is labeled with the predicate/relationship\-type.
+.PP
+perl doesnt handle bidirectional links between objects too well, so
+rather than having the relationship object know about the terms or the
+term know about the realtionships, all the graph info is in the
+Graph object
+.PP
+the Relationship object gives you the accessions of the related terms,
+use the Graph methods to fetch these actual terms.
+.PP
+The idea is to keep the Term & Relationship objects lightweight, and
+keep the Graph logic in the Graph object. The Graph object is
+responsible for stuff like making sure that a Term object is not
+instantiated twice if it can be reached by two different paths.
+.PP
+Currently all graphs are acyclic, cyclic graphs may be allowed in the
+future when such relationships are added to \s-1GO/OBOA\s0
+.Sh "\s-1TRANSITIVE\s0 \s-1CLOSURES\s0"
+.IX Subsection "TRANSITIVE CLOSURES"
+.Vb 2
+\& graph object will calculate transitive closures for you \- that is it
+\&will follow the path in the graph to the root or to all leafs
+.Ve
+.Sh "\s-1ITERATORS\s0"
+.IX Subsection "ITERATORS"
+Using the create_iterator and iterate methods, you can create
+\&\*(L"visitors\*(R" that will traverse the graph, performing actions along the
+way. Functional-style programming is encouraged, as the \fIiterature()\fR
+method allows for the passing of lexical closures:
+.PP
+.Vb 4
+\&  $graph\->iterate(sub {$term=shift\->term;
+\&                       printf "%s %s\en", $term\->acc,$term\->name},
+\&                  {direction=>'up',
+\&                   acc=>"GO:0008045"})
+.Ve
+.Sh "\s-1SEE\s0 \s-1ALSO\s0"
+.IX Subsection "SEE ALSO"
+go-perl
+GO::Model::Term
+GO::Parser
+GO::AppHandle
+.Sh "new"
+.IX Subsection "new"
+.Vb 3
+\&  Usage   \- $g = GO::Model::Graph\->new;
+\&  Returns \- GO::Model::Graph;
+\&  Args    \-
+.Ve
+.PP
+Normally you would not create a graph object yourself \- this is
+typically done for you by either a GO::Parser object or a
+GO::AppHandle object
+.Sh "create_iterator"
+.IX Subsection "create_iterator"
+.Vb 5
+\&  Usage   \- $it = $graph\->create_iterator("GO:0003677")
+\&  Usage   \- $it = $graph\->create_iterator({acc=>"GO:0008045",
+\&                                           direction=>"up"});
+\&  Returns \- GO::Model::GraphIterator;
+\&  Args    \- accession no [optional] or GO::Model::Term [optional]
+.Ve
+.PP
+makes a GO::Model::GraphIterator, an object which traverses the
+graph
+.Sh "iterate"
+.IX Subsection "iterate"
+.Vb 4
+\&  Usage   \- $graph\->iterate(sub {$ni=shift;printf "%s\en", $ni\->term\->name});
+\&  Usage   \- sub mysub {...}; $graph\->iterate(\e&mysub);
+\&  Returns \-
+\&  Args    \-  CODE
+.Ve
+.PP
+iterates through the graph executing \s-1CODE\s0 on every
+GO::Model::GraphNodeInstance object
+.Sh "term_filter"
+.IX Subsection "term_filter"
+.Vb 6
+\&  Alias   \- node_filter
+\&  Usage   \- $terms =
+\&               $graph\->term_filter(sub {shift\->term\->name =~ /transmembrane/});
+\&  Usage   \- sub mysub {...}; $graph\->iterate(\e&mysub);
+\&  Returns \-   ref to an array of GO::Model::Term objects
+\&  Args    \-  CODE
+.Ve
+.PP
+iterates through the graph executing \s-1CODE\s0 on every
+GO::Model::GraphNodeInstance object. If \s-1CODE\s0 returns true, that
+node will be returned
+.Sh "term_query"
+.IX Subsection "term_query"
+.Vb 6
+\&  Usage   \- $terms = $graph\->term_query({name=>'/transmembrane/'});
+\&  Usage   \- $terms = $graph\->term_query({acc=>'GO:0008045'});
+\&  Usage   \- $terms = $graph\->term_query('/transmembrane/');
+\&  Returns \- ref to an array of GO::Model::Term objects
+\&  Args    \- hashref of constraints
+\&            OR name constraint as string
+.Ve
+.PP
+returns a set of terms matching query constraints. If the constraint
+value is enclosed in // a regexp match will be performed
+.PP
+constraints are ANDed. For more complex queries, use \fInode_filter()\fR
+.Sh "subgraph"
+.IX Subsection "subgraph"
+.Vb 3
+\&  Usage   \- my $subgraph = $graph\->subgraph({acc=>"GO:0008045"});
+\&  Returns \- GO::Model::Graph
+\&  Args    \- as term_query()
+.Ve
+.PP
+creates a subgraph of the current graph containing the terms
+returned by a \fIterm_query()\fR call and all paths to the root
+.Sh "subgraph_by_terms"
+.IX Subsection "subgraph_by_terms"
+.Vb 4
+\&  Usage   \- my $subgraph = $graph\->subgraph_by_terms($terms);
+\&  Usage   \- my $subgraph = $graph\->subgraph_by_terms($terms,{partial=>1});
+\&  Returns \- GO::Model::Graph
+\&  Args    \- GO::Model::Term listref
+.Ve
+.PP
+creates a subgraph of the current graph containing the specified terms
+.PP
+The path-to-top will be calculated for all terms and added to the
+subgraph, \s-1UNLESS\s0 the partial option is set; in this case a
+relationship between 
+.Sh "get_all_nodes"
+.IX Subsection "get_all_nodes"
+.Vb 4
+\&  Usage   \- my $node_listref = $graph\->get_all_nodes();
+\&  Synonyms\- get_all_terms
+\&  Returns \- ref to an array of GO::Model::Term objects
+\&  Args    \- none
+.Ve
+.PP
+The returned array is \s-1UNORDERED\s0
+.PP
+If you want the returned list ordered (eg breadth first or depth
+first) use the \fIcreate_iterator()\fR method to get a GO::Model::GraphIterator
+.PP
+See also GO::Model::Term
+.Sh "get_term"
+.IX Subsection "get_term"
+.Vb 4
+\&  Usage   \- my $term = $graph\->get_term($acc);
+\&  Synonyms\- get_node
+\&  Returns \- GO::Model::Term
+\&  Args    \- id
+.Ve
+.PP
+.Vb 2
+\&  returns a GO::Model::Term object for an accession no.
+\&  the term must be in the Graph object
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "get_term_by_name"
+.IX Subsection "get_term_by_name"
+.Vb 3
+\&  Usage   \- my $term = $graph\->get_term_by_name("blah");
+\&  Returns \- GO::Model::Term
+\&  Args    \- string
+.Ve
+.PP
+.Vb 2
+\&  returns a GO::Model::Term object for a name
+\&  the term must be in the Graph object
+.Ve
+.PP
+\&\s-1CASE\s0 \s-1INSENSITIVE\s0
+.PP
+See also GO::Model::Term
+.Sh "get_terms_by_subset"
+.IX Subsection "get_terms_by_subset"
+.Vb 3
+\&  Usage   \- my $term = $graph\->get_terms_by_subset("goslim_plant");
+\&  Returns \- GO::Model::Term
+\&  Args    \- string
+.Ve
+.PP
+.Vb 2
+\&  returns a GO::Model::Term object for a subset
+\&  the term must be in the Graph object
+.Ve
+.PP
+\&\s-1CASE\s0 \s-1INSENSITIVE\s0
+.PP
+See also GO::Model::Term
+.Sh "get_top_nodes"
+.IX Subsection "get_top_nodes"
+.Vb 4
+\&  Usage   \- my $node_listref = $graph\->get_top_nodes();
+\&  Synonyms\- get_top_terms
+\&  Returns \- ref to an array of GO::Model::Term objects
+\&  Args    \- none
+.Ve
+.PP
+usually returns 1 node \- the root term
+.PP
+See also GO::Model::Term
+.Sh "get_leaf_nodes"
+.IX Subsection "get_leaf_nodes"
+.Vb 4
+\&  Usage   \- my $node_listref = $graph\->get_top_nodes();
+\&  Synonyms\- get_leaf_terms
+\&  Returns \- ref to an array of GO::Model::Term objects
+\&  Args    \- none
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "is_leaf_node"
+.IX Subsection "is_leaf_node"
+.Vb 3
+\&  Usage   \- if ($graph\->is_leaf_node($acc)) {...}
+\&  Returns \- bool
+\&  Args    \- accession str
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "seed_nodes"
+.IX Subsection "seed_nodes"
+.Vb 3
+\&  Usage   \- $nodes = $graph\->seed_nodes;
+\&  Returns \- GO::Model::Term listref
+\&  Args    \- GO::Model::Term listref [optional]
+.Ve
+.PP
+gets/sets the \*(L"seed\*(R" nodes/terms \- these are the terms the Graph is
+started from, e.g. for building a node ancestory graph, the seed
+term would be the leaf of this graph, but not term that are expanded
+or collpased from the ancestory graph.
+.PP
+This is mostly relevant if you are fetching your graphs from a
+database via go-db-perl
+.PP
+See also GO::Model::Term
+.Sh "focus_nodes"
+.IX Subsection "focus_nodes"
+.Vb 4
+\&  Usage   \- $nodes = $graph\->focus_nodes;
+\&  Synonyms\- focus_terms
+\&  Returns \- GO::Model::Term listref
+\&  Args    \- GO::Model::Term listref [optional]
+.Ve
+.PP
+gets/sets the \*(L"focus\*(R" nodes/terms \- these are the terms the Graph is
+centred around; for instance, if the graph was built around a query to
+\&\*(L"endoplasmic*\*(R" all the terms matching this string would be focused
+.PP
+This is mostly relevant if you are fetching your graphs from a
+database via go-db-perl
+.PP
+See also GO::Model::Term
+.Sh "is_focus_node"
+.IX Subsection "is_focus_node"
+.Vb 3
+\&  Usage   \- if ($g\->is_focus_node($term)) {..}
+\&  Returns \- bool
+\&  Args    \- GO::Model::Term
+.Ve
+.Sh "add_focus_node"
+.IX Subsection "add_focus_node"
+.Vb 3
+\&  Usage   \- $g\->add_focus_node($term)
+\&  Returns \-
+\&  Args    \- GO::Model::Term
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "paths_to_top"
+.IX Subsection "paths_to_top"
+.Vb 3
+\&  Usage   \- my $paths = $graph\->paths_to_top("GO:0005045");
+\&  Returns \- arrayref of GO::Model::Path objects
+\&  Args    \-
+.Ve
+.PP
+See also GO::Model::Path
+.Sh "node_count"
+.IX Subsection "node_count"
+.Vb 4
+\&  Usage   \- my $count = $g\->node_count
+\&  Synonyms\- term_count
+\&  Returns \- int
+\&  Args    \-
+.Ve
+.PP
+returns the number of terms/nodes in the graph
+.PP
+See also GO::Model::Term
+.Sh "n_associations"
+.IX Subsection "n_associations"
+.Vb 3
+\&  Usage   \- my $count = $g\->n_associations($acc);
+\&  Returns \- int
+\&  Args    \-
+.Ve
+.PP
+if you parsed an association file into this graph, this will return
+the number of instances attached directly to acc
+.PP
+See also GO::Model::Association
+See also GO::Model::GeneProduct
+.Sh "n_deep_associations"
+.IX Subsection "n_deep_associations"
+.Vb 3
+\&  Usage   \- my $count = $g\->n_deep_associations($acc);
+\&  Returns \- int
+\&  Args    \-
+.Ve
+.PP
+if you parsed an association file into this graph, this will return
+the number of instances attached directly to acc \s-1OR\s0 to a node subsumed
+by acc
+.PP
+See also GO::Model::Association
+See also GO::Model::GeneProduct
+.Sh "n_children"
+.IX Subsection "n_children"
+.Vb 4
+\&  Usage   \- $n = $graph\->n_children('GO:0003677');
+\&  Synonyms\- n_sterms, n_subj_terms, n_subject_terms
+\&  Returns \- int
+\&  Args    \-
+.Ve
+.PP
+returns the number of \s-1DIRECT\s0 children/subject/subordinate terms
+beneath this one
+.Sh "n_parents"
+.IX Subsection "n_parents"
+.Vb 4
+\&  Usage   \- $n = $graph\->n_parents(3677);
+\&  Synonyms\- n_oterms, n_obj_terms, n_object_terms
+\&  Returns \- int
+\&  Args    \-
+.Ve
+.PP
+returns the number of \s-1DIRECT\s0 parent/object/superordinate terms
+above this one
+.Sh "association_list"
+.IX Subsection "association_list"
+.Vb 3
+\&  Usage   \- $assocs = $g\->association_list('GO:0003677')
+\&  Returns \- listref of GO::Model::Association
+\&  Args    \- acc (string)
+.Ve
+.PP
+returns a list of association objects \fBdirectly\fR attached to the
+specified term
+.PP
+See also GO::Model::Association
+.Sh "get_direct_associations"
+.IX Subsection "get_direct_associations"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+See also GO::Model::Association
+.Sh "deep_association_list"
+.IX Subsection "deep_association_list"
+.Vb 3
+\&  Usage   \- $assocs = $g\->association_list('GO:0003677')
+\&  Returns \- listref of GO::Model::Association
+\&  Args    \- acc (string)
+.Ve
+.PP
+returns a list of association objects \fBdirectly and indirectly\fR
+attached to the specified term. (ie assocs attached to the term or to
+terms subsumed by the specified term).
+.PP
+See also GO::Model::Association
+.Sh "product_list"
+.IX Subsection "product_list"
+.Vb 3
+\&  Usage   \- $prods = $g\->product_list('GO:0003677')
+\&  Returns \- listref of GO::Model::GeneProduct
+\&  Args    \- acc (string)
+.Ve
+.PP
+returns a list of distinct gene product objects \fBdirectly\fR
+attached to the specified term.
+.PP
+See also GO::Model::GeneProduct
+.Sh "deep_product_list"
+.IX Subsection "deep_product_list"
+.Vb 3
+\&  Usage   \- $prods = $g\->deep_product_list('GO:0003677')
+\&  Returns \- listref of GO::Model::GeneProduct
+\&  Args    \- acc (string)
+.Ve
+.PP
+returns a list of distinct gene product objects \fBdirectly and indirectly\fR
+attached to the specified term. (ie assocs attached to the term or to
+terms subsumed by the specified term).
+.PP
+See also GO::Model::GeneProduct
+.Sh "deep_product_count"
+.IX Subsection "deep_product_count"
+.Vb 3
+\&  Usage   \- $n_prods = $g\->deep_product_count('GO:0003677')
+\&  Returns \- int
+\&  Args    \- acc (string)
+.Ve
+.PP
+returns a count of distinct gene product objects \fBdirectly and
+indirectly\fR attached to the specified term. performs transitive
+closure. will not count gene products twice
+.PP
+See also GO::Model::GeneProduct
+.Sh "get_relationships"
+.IX Subsection "get_relationships"
+.Vb 3
+\&  Usage   \- my $rel_listref = $graph\->get_relationships('GO:0003677');
+\&  Returns \- ref to an array of GO::Model::Relationship objects
+\&  Args    \- identifier/acc (string)
+.Ve
+.PP
+returns relationships which concern the specified term; the specified
+term can be the subject or object term in the relationship (ie child
+or parent)
+.PP
+See also GO::Model::Relationship
+.Sh "get_parent_relationships"
+.IX Subsection "get_parent_relationships"
+.Vb 8
+\&  Usage   \- my $rel_listref = $graph\->get_parent_relationships('GO:0003677');
+\&  Synonym \- get_relationships_by_child
+\&  Synonym \- get_relationships_by_subj 
+\&  Synonym \- get_relationships_by_subject 
+\&  Synonym \- get_obj_relationships 
+\&  Synonym \- get_object_relationships
+\&  Returns \- ref to an array of GO::Model::Relationship objects
+\&  Args    \- identifier/acc (string)
+.Ve
+.PP
+See also GO::Model::Relationship
+.Sh "get_child_relationships"
+.IX Subsection "get_child_relationships"
+.Vb 8
+\&  Usage   \- my $rel_listref = $graph\->get_child_relationships('GO:0003677');
+\&  Synonym \- get_relationships_by_parent
+\&  Synonym \- get_relationships_by_obj 
+\&  Synonym \- get_relationships_by_object
+\&  Synonym \- get_subj_relationships
+\&  Synonym \- get_subject_relationships
+\&  Returns \- ref to an array of GO::Model::Relationship objects
+\&  Args    \- identifier/acc (string)
+.Ve
+.PP
+See also GO::Model::Relationship
+.Sh "get_all_relationships"
+.IX Subsection "get_all_relationships"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::Relationship list
+\&  Args    \-
+.Ve
+.PP
+returns all the relationships/statements in this graph
+.PP
+See also GO::Model::Relationship
+.Sh "get_parent_terms"
+.IX Subsection "get_parent_terms"
+.Vb 5
+\&  Usage   \- my $term_lref = $graph\->get_parent_terms($parent_term\->acc);
+\&  Synonym \- get_obj_terms
+\&  Synonym \- get_object_terms
+\&  Returns \- ref to array of GO::Model::Term objs
+\&  Args    \- the accession of the query term
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "get_parent_terms_by_type"
+.IX Subsection "get_parent_terms_by_type"
+.Vb 6
+\&  Usage   \- 
+\&  Synonym \- get_obj_terms_by_type
+\&  Synonym \- get_object_terms_by_type
+\&  Returns \- ref to array of GO::Model::Term objs
+\&  Args    \- the accession of the query term
+\&          \- the type by which to constrain relationships
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "get_recursive_parent_terms"
+.IX Subsection "get_recursive_parent_terms"
+.Vb 8
+\& Title   : get_recursive_parent_terms
+\& Usage   :
+\& Synonyms: get_recursive_obj_terms
+\& Synonyms: get_recursive_object_terms
+\& Function:
+\& Example :
+\& Returns : 
+\& Args    : accession of query term
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "get_recursive_parent_terms_by_type"
+.IX Subsection "get_recursive_parent_terms_by_type"
+.Vb 8
+\& Title   : get_recursive_parent_terms_by_type
+\& Usage   :
+\& Synonyms: get_recursive_obj_terms_by_type
+\& Synonyms: get_recursive_object_terms_by_type
+\& Function:
+\& Example :
+\& Returns : 
+\& Args    :
+.Ve
+.PP
+if type is blank, gets all
+.PP
+See also GO::Model::Term
+.Sh "get_reflexive_parent_terms"
+.IX Subsection "get_reflexive_parent_terms"
+.Vb 6
+\& Title   : get_reflexive_parent_terms
+\& Usage   :
+\& Function:
+\& Example :
+\& Returns : 
+\& Args    : acc
+.Ve
+.PP
+returns parent terms plus the term (for acc) itself
+.PP
+[reflexive transitive closure of relationships in upward direction]
+.PP
+See also GO::Model::Term
+.Sh "get_reflexive_parent_terms_by_type"
+.IX Subsection "get_reflexive_parent_terms_by_type"
+.Vb 6
+\& Title   : get_reflexive_parent_terms_by_type
+\& Usage   :
+\& Function:
+\& Example :
+\& Returns : listref of terms
+\& Args    : acc, type
+.Ve
+.PP
+closure of relationship including the term itself
+.PP
+See also GO::Model::Term
+.Sh "get_child_terms"
+.IX Subsection "get_child_terms"
+.Vb 5
+\&  Usage   \- my $term_lref = $graph\->get_child_terms($parent_term\->acc);
+\&  Synonym \- get_subj_terms
+\&  Synonym \- get_subject_terms
+\&  Returns \- ref to array of GO::Model::Term objs
+\&  Args    \-
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "get_child_terms_by_type"
+.IX Subsection "get_child_terms_by_type"
+.Vb 5
+\&  Synonym \- get_subj_terms_by_type
+\&  Synonym \- get_subject_terms_by_type
+\&  Returns \- ref to array of GO::Model::Term objs
+\&  Args    \- the accession of the query term
+\&          \- the type by which to constrain relationships
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "get_recursive_child_terms"
+.IX Subsection "get_recursive_child_terms"
+.Vb 8
+\& Title   : get_recursive_child_terms
+\& Usage   :
+\& Synonyms: get_recursive_subj_terms
+\& Synonyms: get_recursive_subject_terms
+\& Function:
+\& Example :
+\& Returns : a reference to an array of L<GO::Model::Term> objects
+\& Args    : the accession of the query term
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "get_recursive_child_terms_by_type"
+.IX Subsection "get_recursive_child_terms_by_type"
+.Vb 8
+\& Title   : get_recursive_child_terms_by_type
+\& Usage   :
+\& Synonyms: get_recursive_subj_terms_by_type
+\& Synonyms: get_recursive_subject_terms_by_type
+\& Function:
+\& Example :
+\& Returns : a reference to an array of L<GO::Model::Term> objects
+\& Args    : accession, type
+.Ve
+.PP
+if type is blank, gets all
+.PP
+See also GO::Model::Term
+.Sh "_get_recursive_related_terms_by_type"
+.IX Subsection "_get_recursive_related_terms_by_type"
+.Vb 6
+\& Title   : _get_recursive_related_terms_by_type
+\& Usage   :
+\& Function: Obtain all relationships of the given kind and type for the
+\&           term identified by its accession, and recursively repeat
+\&           this with all parents and children as query for parent and
+\&           child relationships, respectively.
+.Ve
+.PP
+.Vb 8
+\&           This is an internal method.
+\& Example :
+\& Returns : A reference to an array of L<GO::Model::Term> objects.
+\& Args    : \- the kind of relationship, either "child" or "parent"
+\&           \- the accession of the term with which to query
+\&           \- the type to which to constrain relationships (optional,
+\&             all types if left undef)
+\&           \- TRUE if reflexive and FALSE otherwise (default FALSE)
+.Ve
+.PP
+See also GO::Model::Term
+.Sh "_get_related_terms_by_type"
+.IX Subsection "_get_related_terms_by_type"
+.Vb 2
+\&  Usage   \- my $term_lref = $graph\->_get_related_terms_by_type("child",$acc);
+\&  Returns \- ref to array of GO::Model::Term objs
+.Ve
+.PP
+.Vb 4
+\&  Args    \- the kind of relationship, either "child" or "parent" 
+\&          \- the accession of the term for which to obtain rel.ships
+\&          \- the type by which to constrain relationships (optional,
+\&            defaults to all terms if left undef)
+.Ve
+.PP
+This is an internal method.
+.Sh "get_parent_accs_by_type"
+.IX Subsection "get_parent_accs_by_type"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \- acc, type
+.Ve
+.Sh "get_reflexive_parent_accs_by_type"
+.IX Subsection "get_reflexive_parent_accs_by_type"
+.Vb 6
+\& Title   : get_reflexive_parent_accs_by_type
+\& Usage   :
+\& Function:
+\& Example :
+\& Returns : listref of terms
+\& Args    : acc, type
+.Ve
+.PP
+closure of relationship including the term itself
+.PP
+See also GO::Model::Term
+.Sh "get_relationships_between_terms"
+.IX Subsection "get_relationships_between_terms"
+.Vb 6
+\& Title   : get_relationships_between_terms
+\& Usage   :
+\& Function:
+\& Example :
+\& Returns : [] of relationships
+\& Args    : parent id, child id
+.Ve
+.PP
+See also GO::Model::Relationship
+.Sh "get_parent_closure_hash_by_type"
+.IX Subsection "get_parent_closure_hash_by_type"
+.Vb 7
+\& Title   : get_parent_closure_hash_by_type
+\& Usage   :
+\& Function: given a term\-acc and relationship type, will give a hash that
+\&           can be used to check if a term X is a parent of term Y
+\& Example :
+\& Returns : 
+\& Args    :
+.Ve
+.PP
+keys will be lower-cased
+.Sh "add_child_relationship"
+.IX Subsection "add_child_relationship"
+See also GO::Model::Relationship
+.Sh "add_parent_relationship"
+.IX Subsection "add_parent_relationship"
+.Vb 1
+\&    parent relationships are as valued as child relationships
+.Ve
+.PP
+See also GO::Model::Relationship
+.Sh "close_below"
+.IX Subsection "close_below"
+.Vb 3
+\&  Usage   \- $graph\->close_below(3677);
+\&  Returns \-
+\&  Args    \- term (as acc or GO::Model::Term object)
+.Ve
+.PP
+gets rid of everything below a node
+.PP
+used by AmiGO for when a user closes a term in the graph
+.Sh "find_roots"
+.IX Subsection "find_roots"
+.Vb 3
+\&  Usage   \- my $terms = $graph\->find_roots;
+\&  Returns \- arrayref of GO::Model::Term objects
+\&  Args    \-
+.Ve
+.PP
+All terms withOUT a parent
+.PP
+See also GO::Model::Term
+.Sh "get_all_products"
+.IX Subsection "get_all_products"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+See also GO::Model::GeneProduct
+.Sh "merge"
+.IX Subsection "merge"
+.Vb 3
+\& Usage   \- $g\->merge($g2);
+\& Returns \-
+\& Args    \- GO::Model::Graph
+.Ve
+.PP
+merges two graphs
+.Sh "export"
+.IX Subsection "export"
+.Vb 3
+\&  Usage   \- $graph\->export({format=>$format});
+\&  Returns \-
+\&  Args    \- opt hash
+.Ve
+.PP
+writes out the graph in any export format, including obo, go_ont, owl,
+png (graphviz) etc
+.Sh "to_xml"
+.IX Subsection "to_xml"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "add_term"
+.IX Subsection "add_term"
+.Vb 3
+\& Usage   \- $g\->add_term($term)
+\& Returns \- 
+\& Args    \- GO::Model::Term
+.Ve
+.Sh "add_node"
+.IX Subsection "add_node"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+synonym for add_term
+.Sh "add_relationship"
+.IX Subsection "add_relationship"
+.Vb 5
+\&  Usage   \- $graph\->add_relationship({acc1=>from_id, acc2=>to_id});
+\&  Usage   \- $graph\->add_relationship($from_id, $to_id, $type});
+\&  Usage   \- $graph\->add_relationship($obj, $subj, $type});
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+only one relationship between id1 and id2 is allowed
+.PP
+See also GO::Model::Relationship
+.Sh "add_buckets"
+.IX Subsection "add_buckets"
+.Vb 3
+\& Usage   \-
+\& Returns \-
+\& Args    \-
+.Ve
+.PP
+adds bucket terms to non-leaf nodes
+.PP
+this is useful for making \s-1GO\s0 slims
+.Sh "to_text_output"
+.IX Subsection "to_text_output"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \- fmt, assocs [bool]
+.Ve
+.PP
+hacky text output
+.PP
+this method should probably move out of the model code
+into output adapters

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GraphIterator.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GraphIterator.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GraphIterator.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,242 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::GraphIterator 3pm"
+.TH GO::Model::GraphIterator 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::GraphIterator;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\&  $it = $graph\->create_iterator;
+\&  # returns a GO::Model::GraphIterator object
+.Ve
+.PP
+.Vb 12
+\&  while (my $ni = $it\->next_node_instance) {
+\&    $depth = $ni\->depth;
+\&    $term = $ni\->term;
+\&    $reltype = $ni\->parent_rel\->type;
+\&    printf 
+\&      "%s %8s Term = %s (%s)  // depth=%d\en",
+\&          "\-\-\-\-" x $depth,
+\&          $reltype,
+\&          $term\->name,
+\&          $term\->public_acc,
+\&          $depth;
+\&  }
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+GO::Model::Graph
+.PP
+GO::Model::GraphNodeInstance
+.Sh "order"
+.IX Subsection "order"
+.Vb 3
+\&  Usage   \- $graphiter\->order("breadth");
+\&  Returns \- string
+\&  Args    \- string
+.Ve
+.PP
+gets/sets traversal order; breadth or depth; default is depth
+.Sh "direction"
+.IX Subsection "direction"
+.Vb 3
+\&  Usage   \- $graphiter\->direction("up");
+\&  Returns \- string
+\&  Args    \- string
+.Ve
+.PP
+gets/sets direction; default is \*(L"down\*(R"
+.Sh "compact"
+.IX Subsection "compact"
+.Vb 3
+\&  Usage   \- $graphiter\->compact(1);
+\&  Returns \- bool
+\&  Args    \- bool
+.Ve
+.PP
+set this if you dont want relationships to be traversed twice;
+this gives a more compact tree representation of the graph
+.Sh "reltype_filter"
+.IX Subsection "reltype_filter"
+.Vb 3
+\&  Usage   \- $graphiter\->reltype_filter(qw(is_a part_of))
+\&  Returns \- array
+\&  Args    \- array
+.Ve
+.PP
+by default, all relationship types are treated as transitive, and will
+be traversed by the iterator
+.PP
+sometimes you dont want to traverse all relations, even if they are
+transitive. For example, when answering the query \*(L"find all genes
+expressed in the embryo\*(R" you way want subtypes of embryo and parts of
+the embryo but not things that develop_from the embryo.
+.PP
+For more details, see
+<http://sourceforge.net/mailarchive/forum.php?thread_id=9448679&forum_id=43082>
+.Sh "reset_cursor"
+.IX Subsection "reset_cursor"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "next_node"
+.IX Subsection "next_node"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::Term
+\&  Args    \-
+.Ve
+.Sh "next_node_instance"
+.IX Subsection "next_node_instance"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::GraphNodeInstance
+\&  Args    \-
+.Ve
+.Sh "flatten"
+.IX Subsection "flatten"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "_sortby_pos_in_list"
+.IX Subsection "_sortby_pos_in_list"
+Careful, this sort function work on Term objects, not GraphNodeInstance
+objects.  Comparison is done by the name of the term.

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GraphNodeInstance.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GraphNodeInstance.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::GraphNodeInstance.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,183 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::GraphNodeInstance 3pm"
+.TH GO::Model::GraphNodeInstance 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+GO::Model::GraphNodeInstance  \- a graph node located in a tree
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 2
+\&  $it = $graph\->create_iterator;
+\&  # returns a GO::Model::GraphIterator object
+.Ve
+.PP
+.Vb 12
+\&  while (my $ni = $it\->next_node_instance) {
+\&    $depth = $ni\->depth;
+\&    $term = $ni\->term;
+\&    $reltype = $ni\->parent_rel\->type;
+\&    printf 
+\&      "%s %8s Term = %s (%s)  // depth=%d\en",
+\&          "\-\-\-\-" x $depth,
+\&          $reltype,
+\&          $term\->name,
+\&          $term\->public_acc,
+\&          $depth;
+\&  }
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+see GO::Model::Graph
+.Sh "term"
+.IX Subsection "term"
+.Vb 3
+\&  Usage   \- 
+\&  Returns \- GO::Model::Term 
+\&  Args    \-
+.Ve
+.PP
+see GO::Model::Term
+.Sh "depth"
+.IX Subsection "depth"
+.Vb 3
+\&  Usage   \- 
+\&  Returns \- int
+\&  Args    \-
+.Ve
+.Sh "parent_rel"
+.IX Subsection "parent_rel"
+.Vb 3
+\&  Usage   \- 
+\&  Returns \- GO::Model::Relationship
+\&  Args    \-
+.Ve
+.PP
+see GO::Model::Relationship

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::LogicalDefinition.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::LogicalDefinition.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::LogicalDefinition.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,171 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::LogicalDefinition 3pm"
+.TH GO::Model::LogicalDefinition 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::LogicalDefinition;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.Sh "intersection_list"
+.IX Subsection "intersection_list"
+.Vb 3
+\& Usage   \-
+\& Returns \-
+\& Args    \-
+.Ve
+.PP
+Each element of the list is itself a list
+.PP
+This list is of length 1 or 2.
+.PP
+.Vb 2
+\&  [$generic_term_acc]
+\&  [$relation,$differentiating_term_acc]
+.Ve
+.Sh "generic_term_acc"
+.IX Subsection "generic_term_acc"
+.Vb 4
+\&  Usage   \-
+\&  Synonyms \- genus_acc
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+the \s-1ID\s0 of the generic term, also known as 'genus'
+.Sh "differentia"
+.IX Subsection "differentia"
+Usage   \-
+ Returns \-
+ Args    \-

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Modification.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Modification.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Modification.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,197 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Modification 3pm"
+.TH GO::Model::Modification 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Modification;
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+represents a cross reference to an external database
+.Sh "mod_time"
+.IX Subsection "mod_time"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+time in seconds > 1970
+.Sh "person"
+.IX Subsection "person"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "type"
+.IX Subsection "type"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "time_gmtstr"
+.IX Subsection "time_gmtstr"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "pre_term_list"
+.IX Subsection "pre_term_list"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "post_term_list"
+.IX Subsection "post_term_list"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "add_pre_term"
+.IX Subsection "add_pre_term"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "add_post_term"
+.IX Subsection "add_post_term"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Ontology.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Ontology.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Ontology.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,143 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Ontology 3pm"
+.TH GO::Model::Ontology 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Ontology;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  this is a synonym for GO::Model::Graph
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Path.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Path.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Path.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,185 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Path 3pm"
+.TH GO::Model::Path 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Path;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+represents a path between two nodes in a graph
+.PP
+.Vb 2
+\&  TODO: have the path be built of relationships rather than terms, so
+\&  we can get the edgetypes in here
+.Ve
+.Sh "link_list"
+.IX Subsection "link_list"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- arrayref of alternating type, GO::Model::Term
+\&  Args    \-
+.Ve
+.Sh "term_list"
+.IX Subsection "term_list"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- arrayref of GO::Model::Term
+\&  Args    \-
+.Ve
+.PP
+gets/sets an ordered list of terms in the path
+.PP
+GO::Model::Term
+.Sh "length"
+.IX Subsection "length"
+.Vb 3
+\&  Usage   \- print $path\->length
+\&  Returns \- int
+\&  Args    \-
+.Ve
+.Sh "to_text"
+.IX Subsection "to_text"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "duplicate"
+.IX Subsection "duplicate"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Property.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Property.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Property.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,140 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Property 3pm"
+.TH GO::Model::Property 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Property;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Relationship.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Relationship.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Relationship.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,230 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Relationship 3pm"
+.TH GO::Model::Relationship 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Relationship
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+a relationship between two GO::Model::Terms
+.PP
+relationships can be thought of as \fBstatements\fR or sentences of the form
+.PP
+.Vb 1
+\&  SUBJECT\-TERM PREDICATE OBJECT\-TERM
+.Ve
+.PP
+for example,
+.PP
+.Vb 1
+\&  "dog" IS_A "animal"
+.Ve
+.PP
+.Vb 1
+\&  "G\-Protein coupled receptor" IS_A "transmembrane receptor"
+.Ve
+.PP
+Statements have a \fBsubject\fR (i.e. the subject of the
+sentence/statement), a predicate/relationship\-type and an \fBobject\fR
+(i.e. the object of the sentence/statement)
+.PP
+Relationships can also be seen as arcs in a directed graph, with the
+subject being equivalent to the child, and the object equivalent to
+the parent. The arc is labeled with the predicate/relationship\-type.
+.PP
+A Relationship object currently does not contain an actual pointer to
+a GO::Model::Term object. Instead it stores the \s-1ID\s0 of that term. This
+is intended to be used in conjunction with the Graph object, or with
+the database.
+.Sh "subject_acc"
+.IX Subsection "subject_acc"
+.Vb 8
+\& Title   : subject_acc
+\& Usage   : $obj\->subject_acc($newid)
+\& Usage   : $currid = $obj\->subject_acc()
+\& Synonyms: subj_acc, acc2, child_acc
+\& Function: gets or sets the identifier for the child/subject term
+\& Example : 
+\& Returns : value of subject_acc (string)
+\& Args    : on set, new value (string)
+.Ve
+.PP
+All Relationships can be thought of \*(L"subject\-predicate\-object\*(R"
+statements. The statement is *about* the subject, and states something
+about the relationship *to* the object.
+.PP
+For example, the if we have a Relationship:
+.PP
+.Vb 6
+\&  cell
+\&    ^
+\&    |
+\&    | [part_of]
+\&    |
+\& cell nucleus
+.Ve
+.PP
+This is a statement about cell nuclei in general, so \*(L"cell nucleus\*(R" is
+the subject (sometimes called the child node). The Relationship tells
+us that all cell nuclei are part_of some cell, so the object of the
+relationship (sometimes called the parent node) is \*(L"cell\*(R"
+.Sh "object_acc"
+.IX Subsection "object_acc"
+.Vb 9
+\& Title   : object_acc
+\& Usage   : $obj\->object_acc($newid)
+\& Usage   : $currid = $obj\->object_acc()
+\& Synonyms: obj_acc, acc1, parent_acc
+\& Function: gets or sets the identifier for the parent/object term
+\& Example : 
+\& Returns : value of object_acc (string)
+\& Args    : on set, new value (string)
+\& See Also: subj_acc
+.Ve
+.Sh "type"
+.IX Subsection "type"
+.Vb 8
+\& Title   : type
+\& Usage   : $obj\->type($newval)
+\& Usage   : $currval = $obj\->type()
+\& Synonyms: 
+\& Function: gets or sets the relationship type (a string)
+\& Example : 
+\& Returns : value of type (string)
+\& Args    : on set, new value (string)
+.Ve
+.PP
+Currently any string is allowed; in future the type string may be
+constrained to come from a controlled vocabulary of relationship types

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Restriction.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Restriction.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Restriction.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,140 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Restriction 3pm"
+.TH GO::Model::Restriction 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Restriction;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Root.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Root.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Root.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,184 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Root 3pm"
+.TH GO::Model::Root 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Root
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+base class for all GO::Model objects
+.SH "Constructors"
+.IX Header "Constructors"
+.Sh "new"
+.IX Subsection "new"
+Constructor: Basically just calls _initialize().  Most subclasses
+should not need to override new, but instead should override
+_initialize().
+.PP
+If _initialize() fails , the procedure will die
+.PP
+\&\s-1WARNING:\s0 This procedure will die if initialization is unsuccessful.  
+Use an eval statement to catch such exceptions.
+.Sh "obj_factory"
+.IX Subsection "obj_factory"
+.Vb 4
+\&  Usage   \- $obj\->obj_factory\->create_new_term_object($h);
+\&  Alias   \- apph
+\&  Returns \- L<GO::ObjFactory>
+\&  Args    \- none
+.Ve
+.Sh "sprint_self"
+.IX Subsection "sprint_self"
+Prints out a description of the object to a string.
+.Sh "dump"
+.IX Subsection "dump"
+dumps the object (can be read back in with eval)
+.Sh "namespace"
+.IX Subsection "namespace"
+.Vb 8
+\&  Usage   \- print $term\->namespace();     # getting the type
+\&  Usage   \- $term\->namespace("molecular_function"); # setting the type
+\&  Alias   \- type
+\&  Alias   \- term_type
+\&  Alias   \- category
+\&  Alias   \- ontology
+\&  Returns \- string representing type
+\&  Args    \- string represnting type [optional]
+.Ve
+.PP
+The \s-1OBO\s0 namespace for the GO::Model::Term or
+GO::Model::Relationship
+.Sh "_cleanup"
+.IX Subsection "_cleanup"
+Called at object destruction time.  Should be overridden to perform
+cleanup tasks.

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Seq.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Seq.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Seq.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,180 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Seq 3pm"
+.TH GO::Model::Seq 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Seq;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&    print $gene_product\->seq\->seq;
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+represents a biological sequence; uses the bioperl Bio::PrimarySeq class
+.PP
+any call that you can do on a bioperl sequence object, you can do
+here, with the addition of the calls below
+.PP
+to get bioperl, see http://www.bioperl.org
+.Sh "pseq"
+.IX Subsection "pseq"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- Bio::PrimarySeq
+\&  Args    \-
+.Ve
+.Sh "md5checksum"
+.IX Subsection "md5checksum"
+.Vb 3
+\&  Usage   \- my $md5 = $seq\->md5checksum() OR $seq\->md5checksum($md5)
+\&  Returns \- 32 char hex string
+\&  Args    \- 32 char hex string [optional]
+.Ve
+.PP
+checksum for seq \- easy way to check if it has been changed etc
+.PP
+(requires Digest::MD5 module from \s-1CPAN\s0)
+.Sh "to_fasta"
+.IX Subsection "to_fasta"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "add_xref"
+.IX Subsection "add_xref"
+.Vb 2
+\&  \- Usage : $term\->add_xref($xref);
+\&  \- Args  : GO::Term::Xref
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Species.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Species.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Species.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,141 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Species 3pm"
+.TH GO::Model::Species 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Species;
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+represents a gene product in a particular species (this will
+effectively always be refered to implicitly by the gene symbol even
+though a gene may have >1 product)

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Term.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Term.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Term.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,614 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Term 3pm"
+.TH GO::Model::Term 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+GO::Model::Term       \- a term or concept in an ontology
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 7
+\&  # From a 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 "Term %s %s\en", $term\->name, $term\->acc;
+.Ve
+.PP
+.Vb 8
+\&  # From a GO Database (requires go\-db\-perl)
+\&  my apph = GO::AppHandle\->connect(\-dbname=>$dbname);
+\&  my $term = $apph\->get_term({acc=>00003677});
+\&  printf "Term:%s (%s)\enDefinition:%s\enSynonyms:%s\en",
+\&    $term\->name,
+\&    $term\->public_acc,
+\&    $term\->definition,
+\&    join(", ", @{$term\->synonym_list});
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Represents an Ontology term; the same class is used for process,
+compartment and function
+.PP
+currently, a Term is not aware of its Relationships; to find out how a
+term is related to other terms, use the a GO::Model::Graph object,
+which will give you the GO::Model::Relationship objects; for example
+.PP
+.Vb 1
+\&  $rels = $graph\->get_parent_relationships($term\->acc);
+.Ve
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+GO::Model::Relationship
+GO::Model::Graph
+GO::Model::Xref
+GO::Model::Association
+.SH "NOTES"
+.IX Header "NOTES"
+Like all the GO::Model::* classes, this uses accessor methods to get
+or set the attributes. by using the accessor method without any
+arguments gets the value of the attribute. if you pass in an argument,
+then the attribuet will be set according to that argument.
+.PP
+for single-valued attributes
+.PP
+.Vb 2
+\&  # this sets the value of the attribute
+\&  $my_object\->attribute_name("my value");
+.Ve
+.PP
+.Vb 2
+\&  # this gets the value of the attribute
+\&  $my_value = $my_object\->attribute_name();
+.Ve
+.PP
+for lists:
+.PP
+.Vb 2
+\&  # this sets the values of the attribute
+\&  $my_object\->attribute_name(\e at my_values);
+.Ve
+.PP
+.Vb 2
+\&  # this gets the values of the attribute
+\&  $my_values = $my_object\->attribute_name();
+.Ve
+.Sh "acc"
+.IX Subsection "acc"
+.Vb 4
+\&  Usage   \- print $term\->acc()
+\&  Alias   \- public_acc
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+accessor: gets/sets \s-1GO\s0 ID/accession [as an integer]
+.PP
+throws: exception if you try to pass in a non-integer
+.PP
+if you want to use IDs in the format GO:0000nnn, then use the method
+\&\fIpublic_acc()\fR
+.Sh "name"
+.IX Subsection "name"
+.Vb 3
+\&  Usage   \- print $term\->name;
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+accessor: gets/sets \*(L"name\*(R" attribute
+.Sh "subset_list"
+.IX Subsection "subset_list"
+.Vb 3
+\&  Usage   \- foreach (@{$term\->subset_list || []}) { printf " $_\en" }
+\&  Returns \- list of strings
+\&  Args    \- list of strings [optional]
+.Ve
+.PP
+List of subset Accs for a term
+.PP
+Subsets are also known as \s-1GO\s0 Slims
+.Sh "in_subset"
+.IX Subsection "in_subset"
+.Vb 3
+\&  Usage   \- if ($term\->in_subset('goslim_prok');
+\&  Returns \- bool
+\&  Args    \- subset\-name str
+.Ve
+.PP
+Tests if the term belongs to a subset
+.Sh "definition"
+.IX Subsection "definition"
+.Vb 3
+\&  Usage   \- print $term\->definition;
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+accessor: gets/sets \*(L"definition\*(R" attribute
+.Sh "primary_xref"
+.IX Subsection "primary_xref"
+.Vb 6
+\& Title   : primary_xref
+\& Usage   :
+\& Function:
+\& Example :
+\& Returns : GO::Model::Xref
+\& Args    :
+.Ve
+.PP
+The same as \fIacc()\fR, except the \s-1ID\s0 is returned as a GO::Model::Xref
+rather than a string
+.Sh "comment"
+.IX Subsection "comment"
+.Vb 6
+\& Title   : comment
+\& Usage   : $obj\->comment($newval)
+\& Function: 
+\& Example : 
+\& Returns : value of comment (a scalar)
+\& Args    : on set, new value (a scalar or undef, optional)
+.Ve
+.Sh "definition_dbxref_list"
+.IX Subsection "definition_dbxref_list"
+.Vb 6
+\& Title   : definition_dbxref_list
+\& Usage   : $obj\->definition_dbxref(\e at xrefs)
+\& Function: 
+\& Example : 
+\& Returns : definition_dbxref_list hashlist (of GO::Model::Xref)
+\& Args    : on set, new values (GO::Model::Xref hashlist)
+.Ve
+.PP
+GO::Model::Xref
+.Sh "add_definition_dbxref"
+.IX Subsection "add_definition_dbxref"
+.Vb 2
+\&  \- Usage : $term\->add_definition_dbxref($xref);
+\&  \- Args  : GO::Term::Xref
+.Ve
+.PP
+GO::Model::Xref
+.Sh "has_synonym"
+.IX Subsection "has_synonym"
+.Vb 3
+\&  Usage   \- if ($term\->has_synonym("autotrophy") {...}
+\&  Returns \- bool
+\&  Args    \- string
+.Ve
+.Sh "add_synonym"
+.IX Subsection "add_synonym"
+.Vb 4
+\&  Usage   \- $term\->add_synonym("calcineurin");
+\&  Usage   \- $term\->add_synonym(@synonym_strings);
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+Adds a synonym; loses type information (the synonym type in blank)
+.Sh "synonym_list"
+.IX Subsection "synonym_list"
+.Vb 4
+\&  Usage   \- my $syn_l = $term\->synonym_list;
+\&  Usage   \- $term\->synonym_list([$syn1, $syn2]);
+\&  Returns \- arrayref
+\&  Args    \- arrayref [optional]
+.Ve
+.PP
+accessor: gets/set list of synonyms [array reference]
+.PP
+each synonym is represented as a string \- this method loses synonym
+typing information. If used as a setter, will set the type for each
+synonym to null
+.Sh "add_synonym_by_type"
+.IX Subsection "add_synonym_by_type"
+.Vb 3
+\&  Usage   \- $term\->add_synonym_by_type('exact', $syn);
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "synonyms_by_type"
+.IX Subsection "synonyms_by_type"
+.Vb 4
+\&  Usage   \- $synstrs = $term\->synonyms_by_type('exact');
+\&  Usage   \- $term\->synonyms_by_type('exact', \e at exact_syns);
+\&  Returns \- arrayref of strings
+\&  Args    \- type string, arrayref of strings [optional]
+.Ve
+.PP
+in getter mode, gets a list of synonyms of a particular type
+.PP
+in setter mode, sets a list of synonyms for a particular type
+.Sh "alt_id_list"
+.IX Subsection "alt_id_list"
+.Vb 4
+\&  Usage   \- my $syn_l = $term\->alt_id_list;
+\&  Usage   \- $term\->alt_id_list([$syn1, $syn2]);
+\&  Returns \- arrayref
+\&  Args    \- arrayref [optional]
+.Ve
+.PP
+accessor: gets/set list of synonyms [array reference]
+.Sh "add_alt_id"
+.IX Subsection "add_alt_id"
+.Vb 3
+\&  Usage   \- $term\->add_alt_id('GO:0000001');
+\&  Returns \-
+\&  Args    \- id string, or list of id strings
+.Ve
+.Sh "namespace (\s-1INHERITED\s0)"
+.IX Subsection "namespace (INHERITED)"
+.Vb 8
+\&  Usage   \- print $term\->namespace();     # getting the type
+\&  Usage   \- $term\->namespace("molecular_function"); # setting the type
+\&  Alias   \- type
+\&  Alias   \- term_type
+\&  Alias   \- category
+\&  Alias   \- ontology
+\&  Returns \- string representing type
+\&  Args    \- string represnting type [optional]
+.Ve
+.PP
+The \s-1OBO\s0 namespace for the GO::Model::Term or
+GO::Model::Relationship
+.PP
+This method is inherited from the superclass
+.Sh "set_namespace_by_code"
+.IX Subsection "set_namespace_by_code"
+.Vb 3
+\&  Usage   \- $term\->set_namespace_by_code("P");
+\&  Returns \- 
+\&  Args    \- String: M, P or C
+.Ve
+.PP
+Currently the mapping is hardcoded
+.PP
+.Vb 3
+\&  ('F'=>'molecular_function',
+\&   'P'=>'biological_process',
+\&   'C'=>'cellular_component');
+.Ve
+.Sh "get_code_from_namespace"
+.IX Subsection "get_code_from_namespace"
+.Vb 3
+\&  Usage   \- $code = $term\->get_code_from_namespace;
+\&  Returns \- String: M, P or F
+\&  Args    \- String (if omitted will use current namespace)
+.Ve
+.PP
+Returns the code for the current namespace (or any given namespace if supplied)
+.Sh "add_dbxref"
+.IX Subsection "add_dbxref"
+.Vb 2
+\&  \- Usage : $term\->add_dbxref($xref);
+\&  \- Args  : GO::Term::Xref
+.Ve
+.PP
+GO::Model::Xref
+.Sh "dbxref_list"
+.IX Subsection "dbxref_list"
+.Vb 3
+\&  \- Usage : $term\->dbxref_list($xref);
+\&  \- Args  : optional listref of GO::Term::Xref
+\&  \- Returns  : listref of GO::Term::Xref
+.Ve
+.PP
+accessor: gets/sets list of dbxref [array reference]
+.Sh "is_obsolete"
+.IX Subsection "is_obsolete"
+accessor: gets/set obsolete flag [boolean
+.Sh "is_root"
+.IX Subsection "is_root"
+accessor: gets/set is_root flag [boolean]
+.SH "TERM ASSOCIATION METHODS"
+.IX Header "TERM ASSOCIATION METHODS"
+.Sh "association_list"
+.IX Subsection "association_list"
+.Vb 3
+\&  Usage   \- $assoc_l = $term\->association_list
+\&  Returns \- arrayref of GO::Model::Association
+\&  Args    \- arrayref of GO::Model::Association [optional]
+.Ve
+.PP
+accessor: gets/set list of associations [array reference]
+.PP
+if this is undefined, the datasource will be queried
+for the associations
+.Sh "selected_association_list"
+.IX Subsection "selected_association_list"
+.Vb 3
+\&  Usage   \- $assoc_l = $term\->selected_association_list
+\&  Returns \- arrayref of GO::Model::Association
+\&  Args    \- arrayref of GO::Model::Association [optional]
+.Ve
+.PP
+accessor: gets list of \s-1SELECTED\s0 associations [array reference]
+.PP
+[this method is only of use if you are using it in conjunction with
+GO::AppHandle in the go-db-perl distro]
+.PP
+this in not the total list of all associations associated with a term;
+if the term was created via a query on products, this will include
+those associations
+.PP
+GO::Model::Association
+.Sh "add_association"
+.IX Subsection "add_association"
+.Vb 3
+\&  Usage   \- $term\->add_association($assoc);
+\&  Returns \- 
+\&  Args    \- GO::Model::Association
+.Ve
+.PP
+GO::Model::Association
+.Sh "add_selected_association"
+.IX Subsection "add_selected_association"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+GO::Model::Association
+.Sh "association_hash"
+.IX Subsection "association_hash"
+returns associations as listref of unique GeneProduct objects
+.PP
+GO::Model::Association
+.Sh "get_all_associations"
+.IX Subsection "get_all_associations"
+.Vb 3
+\&  Usage   \- my $al = $term\->get_all_associations
+\&  Returns \- GO::Model::Association list
+\&  Args    \-
+.Ve
+.PP
+returns all associations for the term and the terms beneath it in the \s-1GO\s0 \s-1DAG\s0
+.PP
+same as \f(CW$apph\fR\->get_all_associations($term)
+.PP
+GO::Model::Association
+.Sh "n_associations"
+.IX Subsection "n_associations"
+.Vb 3
+\&  Usage   \- my $n = $term\->n_associations
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "product_list"
+.IX Subsection "product_list"
+.Vb 3
+\&  Usage   \- $prods = $term\->product_list
+\&  Returns \- L<GO::Model::GeneProduct> listref
+\&  Args    \-
+.Ve
+.PP
+Returns a reference to an array of gene products that are attached
+directly to this term.
+.PP
+(if the products have not been fetched, this method will call
+\&\f(CW$term\fR\->association_list, cache the results, and use the associations
+to build the product list. succeeding calls of product_list to this
+term will hence be faster)
+.PP
+See GO::Model::GeneProduct
+.Sh "deep_product_list"
+.IX Subsection "deep_product_list"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::GeneProduct listref
+\&  Args    \-
+.Ve
+.PP
+finds all products attached to this term and all terms below in the
+graph
+.PP
+GO::Model::GeneProduct
+.Sh "n_deep_products"
+.IX Subsection "n_deep_products"
+.Vb 3
+\&  Usage   \- my $count = $term\->n_deep_products;
+\&  Returns \- int
+\&  Args    \- filter (hashref) \- or string "recount"
+.Ve
+.PP
+gets the count for the *dsitinct* number of GO::Model::GeneProduct
+entries annotated at \s-1OR\s0 \s-1BELOW\s0 this level. if you have set the filters
+in GO::AppHandle then these filters will be used in determining the
+count.
+.PP
+Remember, if you did not explicitly set the filters, then the
+default filter will be used, which is [!IEA] (i.e. curated
+associations only, see www.geneontology.org for a discussion of
+evidence codes).
+.PP
+Note: currently only the speciesdb filter is respected. It turns out
+to be very expensive to do the set arithmetic for distinct recursive
+gene counts with different evidence combinations. Because each product
+belongs to one speciesdb only, the speciesdb counts are mutually
+exclusive, which makes this easier.
+.PP
+.Vb 6
+\&  # get the number of gene products that have been annotated
+\&  # as transcription factors in worm and fly discounting
+\&  # uncurated automatic annotations
+\&  $apph\->filters({evcodes=>["!IEA"], speciesdbs=>["SGD", "FB"]});
+\&  $term = $apph\->get_term({name=>"transcription factor"});
+\&  print $term\->n_deep_products;
+.Ve
+.PP
+The count will be cached, so if you alter the filter parameters be sure
+to get a recount like this:
+.PP
+.Vb 1
+\&  my $count = $term\->n_deep_products("recount");
+.Ve
+.PP
+\&\s-1TODO:\s0 make the recount automatic if the filter is changed
+.PP
+\&\s-1PERFORMANCE\s0 \s-1NOTE\s0 1: When you ask the AppHandle to give you a list of
+GO::Model::Term objects, it may decide to populate this attribute when
+building the terms in a fast and efficient way. Therefore you should
+avoid setting the filters *after* you have created the objects
+otherwise it will have to refetch all these values slowing things
+down.
+.PP
+\&\s-1PERFORMANCE\s0 \s-1NOTE\s0 2: If you are using the \s-1SQL\s0 GO::AppHandle
+implementation, then this call will probably involve a query to the
+*gene_produc_count* table. If you populated the database you are using
+yourself, make sure this table is filled otherwise this will be an
+expensive query.
+.PP
+GO::Model::GeneProduct
+.Sh "n_products"
+.IX Subsection "n_products"
+.Vb 3
+\&  Usage   \- as n_deep_products
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+see docs for n_deep_products
+.PP
+gets a count of products \s-1AT\s0 \s-1THIS\s0 \s-1LEVEL\s0 \s-1ONLY\s0
+.PP
+GO::Model::GeneProduct
+.Sh "loadtime"
+.IX Subsection "loadtime"
+.Vb 6
+\& Title   : loadtime
+\& Usage   :
+\& Function:
+\& Example :
+\& Returns : time term was loaded into datasource
+\& Args    : none
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::TreeIterator.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::TreeIterator.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::TreeIterator.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,214 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::TreeIterator 3pm"
+.TH GO::Model::TreeIterator 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::GraphIterator;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This is a hack.  It wraps GO::Model::GraphIterator and provides
+a tree like iteration, rather than a graph-like iteration.
+.PP
+This is done by giving TreeIterator a template array.
+.PP
+The array looks like this :
+.PP
+[
+[3674, 'isa', 3673],
+[9277, 'isa', 5618]
+]
+.PP
+3674 is selected iff its the child of 3673.  
+9277 is selected iff it is the child of 5618.
+.Sh "order"
+.IX Subsection "order"
+.Vb 3
+\&  Usage   \- $graphiter\->order("breadth");
+\&  Returns \- string
+\&  Args    \- string
+.Ve
+.PP
+gets/sets traversal order; breadth or depth; default is depth
+.Sh "direction"
+.IX Subsection "direction"
+.Vb 3
+\&  Usage   \- $graphiter\->direction("up");
+\&  Returns \- string
+\&  Args    \- string
+.Ve
+.PP
+gets/sets direction; default is \*(L"down\*(R"
+.Sh "reset_cursor"
+.IX Subsection "reset_cursor"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::Term
+\&  Args    \-
+.Ve
+.Sh "next_node"
+.IX Subsection "next_node"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::Term
+\&  Args    \-
+.Ve
+.Sh "set_bootstrap_mode"
+.IX Subsection "set_bootstrap_mode"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- 
+\&  Args    \-
+.Ve
+.Sh "get_bootstrap_mode"
+.IX Subsection "get_bootstrap_mode"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- 
+\&  Args    \-
+.Ve
+.Sh "get_current_path"
+.IX Subsection "get_current_path"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- array ref
+\&  Args    \- none
+.Ve
+.Sh "next_node_instance"
+.IX Subsection "next_node_instance"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- GO::Model::GraphNodeInstance
+\&  Args    \-
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Xref.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Xref.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Model::Xref.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,238 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Model::Xref 3pm"
+.TH GO::Model::Xref 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Model::Xref;
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 5
+\&  my $xrefs = $term\->dbxref_list();
+\&  foreach my $xref (@$xrefs) P
+\&    printf "Term %s has an xref %s:%s\en", 
+\&            $term\->name, $xref\->xref_key, $xref\->dbname;
+\&  }
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+represents a cross reference to an external database. an Xref is made
+up of a key (ie the accession number, or whatever the value of the
+unique field being keyed off of is) and a database name. this should
+theorerically be enough to uniquely identify any databased entity.
+.SH "NOTES"
+.IX Header "NOTES"
+Like all the GO::Model::* classes, this uses accessor methods to get
+or set the attributes. by using the accessor method without any
+arguments gets the value of the attribute. if you pass in an argument,
+then the attribuet will be set according to that argument.
+.PP
+for instance
+.PP
+.Vb 2
+\&  # this sets the value of the attribute
+\&  $my_object\->attribute_name("my value");
+.Ve
+.PP
+.Vb 2
+\&  # this gets the value of the attribute
+\&  $my_value = $my_object\->attribute_name();
+.Ve
+.Sh "xref_key"
+.IX Subsection "xref_key"
+.Vb 5
+\&  Alias   \- acc
+\&  Alias   \- accession
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+.Vb 1
+\& accessor: gets/sets the key/id of the cross reference
+.Ve
+.Sh "xref_keytype"
+.IX Subsection "xref_keytype"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+.Vb 1
+\& accessor: gets/sets the key/id type of the cross reference
+.Ve
+.Sh "as_str"
+.IX Subsection "as_str"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "xref_dbname"
+.IX Subsection "xref_dbname"
+.Vb 4
+\&  Alias   \- dbname
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+.Vb 1
+\& accessor: gets/sets the database name of the cross reference
+.Ve
+.PP
+must be a valid database name
+.Sh "xref_desc"
+.IX Subsection "xref_desc"
+.Vb 4
+\&  Alias   \- name
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+.Vb 1
+\& accessor: gets/sets the description of the accession no
+.Ve
+.PP
+useful for interpro
+.Sh "to_xml"
+.IX Subsection "to_xml"
+.Vb 3
+\&  Usage   \- print $xref\->to_xml()
+\&  Returns \- string
+\&  Args    \- indent [integer]
+.Ve
+.PP
+\&\s-1XML\s0 representation; you probably shouldnt call this directly, this
+will be called by entities that own xrefs

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::ObjCache.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::ObjCache.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::ObjCache.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,140 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::ObjCache 3pm"
+.TH GO::ObjCache 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::ObjCache;
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This is a kind of GO::ObjFactory \- you should not need to use this
+method directly

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::ObjFactory.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::ObjFactory.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::ObjFactory.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,240 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::ObjFactory 3pm"
+.TH GO::ObjFactory 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::ObjFactory     \- GO Object Factory
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+You should not use this method directly
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+You only need to be aware of this class if you are generating new
+objects. You should not directly create objects like this:
+.PP
+.Vb 1
+\&  $term = GO::Model::Term\->new($h);
+.Ve
+.PP
+Instead you should create them like this:
+.PP
+.Vb 2
+\&  $fac = GO::ObjFactory\->new();
+\&  $term = $fac\->create_term_obj($h);
+.Ve
+.PP
+Usually you do not need to instantiate a factory, as all objects
+created with a factory carry around a reference to that factory, so
+you can do this:
+.PP
+.Vb 2
+\&  # $graph object was previously created via a factory
+\&  $term = $graph\->create_term_obj($h);
+.Ve
+.PP
+If you are only using the go-perl module, then factories do not buy
+you much. However, if you are also using go-db-perl and GO::AppHandle,
+then factories can be useful \- all objects generated from the database
+will be attached to an AppHandle which means that \*(L"lazy loading\*(R" can
+be used. See GO::AppHandle in go-db-perl for details
+.Sh "create_term_obj"
+.IX Subsection "create_term_obj"
+.Vb 3
+\&  Usage   \- $term = $apph\->create_term_obj;
+\&  Returns \- L<GO::Model::Term>
+\&  Args    \-
+.Ve
+.Sh "create_relationship_obj"
+.IX Subsection "create_relationship_obj"
+.Vb 3
+\&  Usage   \- $relationship = $apph\->create_relationship_obj;
+\&  Returns \- L<GO::Model::Relationship>
+\&  Args    \-
+.Ve
+.Sh "create_xref_obj"
+.IX Subsection "create_xref_obj"
+.Vb 3
+\&  Usage   \- $xref = $apph\->create_xref_obj;
+\&  Returns \- L<GO::Model::Xref>
+\&  Args    \-
+.Ve
+.Sh "create_evidence_obj"
+.IX Subsection "create_evidence_obj"
+.Vb 3
+\&  Usage   \- $evidence = $apph\->create_evidence_obj;
+\&  Returns \- L<GO::Model::Evidence>
+\&  Args    \-
+.Ve
+.Sh "create_seq_obj"
+.IX Subsection "create_seq_obj"
+.Vb 3
+\&  Usage   \- $seq = $apph\->create_seq_obj;
+\&  Returns \- L<GO::Model::Seq>
+\&  Args    \-
+.Ve
+.Sh "create_db_obj"
+.IX Subsection "create_db_obj"
+.Vb 3
+\&  Usage   \- $db = $apph\->create_db_obj;
+\&  Returns \- L<GO::Model::DB>
+\&  Args    \-
+.Ve
+.Sh "create_association_obj"
+.IX Subsection "create_association_obj"
+.Vb 3
+\&  Usage   \- $association = $apph\->create_association_obj;
+\&  Returns \- L<GO::Model::Association>
+\&  Args    \-
+.Ve
+.Sh "create_gene_product_obj"
+.IX Subsection "create_gene_product_obj"
+.Vb 4
+\&  Usage   \- $gene_product = $apph\->create_gene_product_obj;
+\&  Synonym \- create_product_obj
+\&  Returns \- L<GO::Model::GeneProduct>
+\&  Args    \-
+.Ve
+.Sh "create_species_obj"
+.IX Subsection "create_species_obj"
+.Vb 3
+\&  Usage   \- $species = $apph\->create_species_obj;
+\&  Returns \- L<GO::Model::Species>
+\&  Args    \-
+.Ve
+.Sh "create_graph_obj"
+.IX Subsection "create_graph_obj"
+.Vb 3
+\&  Usage   \- $graph = $apph\->create_graph_obj;
+\&  Returns \- L<GO::Model::Graph>
+\&  Args    \-
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,609 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parser 3pm"
+.TH GO::Parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parser     \- parses all GO files formats and types
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+fetch GO::Model::Graph objects using a parser:
+.PP
+.Vb 9
+\&  # Scenario 1: Getting objects from a file
+\&  use GO::Parser;
+\&  my $parser = new GO::Parser({handler=>'obj',use_cache=>1});
+\&  $parser\->parse("function.ontology");     # ontology
+\&  $parser\->parse("GO.defs");               # definitions
+\&  $parser\->parse("ec2go");                 # external refs
+\&  $parser\->parse("gene\-associations.sgd"); # gene assocs
+\&  # get GO::Model::Graph object
+\&  my $graph = $parser\->handler\->graph;
+.Ve
+.PP
+.Vb 5
+\&  # Scenario 2: Getting OBO XML from a file
+\&  use GO::Parser;
+\&  my $parser = new GO::Parser({handler=>'xml'});
+\&  $parser\->handler\->file("output.xml");
+\&  $parser\->parse("gene_ontology.obo");
+.Ve
+.PP
+.Vb 8
+\&  # Scenario 3: Using an XSL stylesheet to convert the OBO XML
+\&  use GO::Parser;
+\&  my $parser = new GO::Parser({handler=>'xml'});
+\&  # xslt files are kept in in $ENV{GO_ROOT}/xml/xsl
+\&  # (if $GO_ROOT is not set, defaults to install directory)
+\&  $parser\->xslt("oboxml_to_owl"); 
+\&  $parser\->handler\->file("output.owl\-xml");
+\&  $parser\->parse("gene_ontology.obo");
+.Ve
+.PP
+.Vb 5
+\&  # Scenario 4: via scripts
+\&  my $cmd = "go2xml gene_ontology.obo | xsltproc my\-transform.xsl \-";
+\&  my $fh = FileHandle\->new("$cmd |") || die("problem initiating $cmd");
+\&  while(<$fh>) { print $_ }
+\&  $fh\->close || die("problem running $cmd");
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Module for parsing \s-1GO\s0 flat files; for examples of \s-1GO/OBO\s0 flatfile
+formats see:
+.PP
+<ftp://ftp.geneontology.org/pub/go/ontology>
+.PP
+<ftp://ftp.geneontology.org/pub/go/gene\-associations>
+.PP
+For a description of the various file formats, see:
+.PP
+<http://www.geneontology.org/GO.format.html>
+.PP
+<http://www.geneontology.org/GO.annotation.html#file>
+.PP
+This module will generate \s-1XML\s0 events from a correctly formatted \s-1GO/OBO\s0
+file
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+This module is a part of go\-dev, see:
+.PP
+<http://www.godatabase.org/dev>
+.PP
+for more details
+.SH "PUBLIC METHODS"
+.IX Header "PUBLIC METHODS"
+.Sh "new"
+.IX Subsection "new"
+.Vb 12
+\& Title   : new
+\& Usage   : my $p = GO::Parser\->new({format=>'obo_xml',handler=>'obj'});
+\&           $p\->parse("go.obo\-xml");
+\&           my $g = $p\->handler\->graph;
+\& Synonyms: 
+\& Function: creates a parser object
+\& Example : 
+\& Returns : GO::Parser
+\& Args    : a hashref of arguments:
+\&            format: a format for which a parser exists
+\&            handler: a format for which a perl handler exists
+\&            use_cache: (boolean) see caching below
+.Ve
+.Sh "parse"
+.IX Subsection "parse"
+.Vb 7
+\& Title   : parse
+\& Usage   : $p\->parse($file);
+\& Synonyms: 
+\& Function: parses a file
+\& Example : 
+\& Returns : 
+\& Args    : str filename
+.Ve
+.Sh "handler"
+.IX Subsection "handler"
+.Vb 7
+\& Title   : handler
+\& Usage   : my $handler = $p\->handler;
+\& Synonyms: 
+\& Function: gets/sets a GO::Handler object
+\& Example : 
+\& Returns : L<GO::Handlers::base>
+\& Args    : L<GO::Handlers::base>
+.Ve
+.SH "FORMATS"
+.IX Header "FORMATS"
+This module is a front end wrapper for a number of different \s-1GO/OBO\s0
+formats \- see the relevant module documentation below for details.
+.PP
+The full list of parsers can be found in the go\-perl/GO/Parsers/
+directory
+.IP "obo_text" 4
+.IX Item "obo_text"
+Files with suffix \*(L".obo\*(R"
+.Sp
+This is a new file format replacement for the existing \s-1GO\s0 flat file
+formats. It handles ontologies, definitions and xrefs (but not
+associations)
+.IP "go_ont" 4
+.IX Item "go_ont"
+Files with suffix \*(L".ontology\*(R"
+.Sp
+These store the ontology DAGs
+.IP "go_def" 4
+.IX Item "go_def"
+Files with suffix \*(L".defs\*(R"
+.IP "go_xref" 4
+.IX Item "go_xref"
+External database references for \s-1GO\s0 terms
+.Sp
+Files with suffix \*(L"2go\*(R" (eg ec2go, metacyc2go)
+.IP "go_assoc" 4
+.IX Item "go_assoc"
+Annotations of genes or gene products using \s-1GO\s0
+.Sp
+Files with prefix \*(L"gene\-association.\*(R"
+.IP "obo_xml" 4
+.IX Item "obo_xml"
+Files with suffix \*(L".obo.xml\*(R" or \*(L".obo\-xml\*(R"
+.Sp
+This is the \s-1XML\s0 version of the \s-1OBO\s0 flat file format above
+.Sp
+See <http://www.godatabase.org/dev/xml/doc/xml\-doc.html>
+.IP "obj_yaml" 4
+.IX Item "obj_yaml"
+A \s-1YAML\s0 dump of the perl GO::Model::Graph object. You need \s-1YAML\s0
+from \s-1CPAN\s0 for this to work
+.IP "obj_storable" 4
+.IX Item "obj_storable"
+A dump of the perl GO::Model::Graph object. You need Storable
+from \s-1CPAN\s0 for this to work. This is intended to cache objects on the
+filesystem, for fast access. The obj_storable representation may not
+be portable
+.Sh "\s-1PARSING\s0 \s-1ARCHITECTURE\s0"
+.IX Subsection "PARSING ARCHITECTURE"
+Each parser fires \s-1XML\s0 \fBevents\fR. The \s-1XML\s0 events are known as
+\&\fBObo-XML\fR.  
+.Sp
+These \s-1XML\s0 events can be \fBcaught\fR by a handler written in perl, or
+they can be caught by an \s-1XML\s0 parser written in some other language, or
+by using \s-1XSL\s0 stylesheets.
+.Sp
+go-dev comes with a number of stylesheets in the 
+  go\-dev/xml/xsl
+directory
+.Sp
+Anything that catches these \s-1XML\s0 events is known as a \fBhandler\fR
+.Sp
+go-perl comes with some standard perl \s-1XML\s0 handlers, in addition to
+some standard \s-1XSL\s0 stylesheets. These can be found in the
+\&\fBgo\-dev/go\-perl/GO/Handlers\fR directory
+.Sp
+If you are interested in getting perl \fBobjects\fR from files then you
+will want the \fBobj\fR handler, which gives back GO::Model::Graph
+objects
+.Sp
+The parsing architecture gives you the option of using the go-perl
+object model, or just parsing the \s-1XML\s0 events directly
+.Sp
+If you are using the go-db-perl library, the load\-go\-into\-db.pl script
+will perform the following processes when loading files into the
+database
+.RS 4
+.IP "Obo-XML events fired using GO::Parser::* classes" 4
+.IX Item "Obo-XML events fired using GO::Parser::* classes"
+.PD 0
+.IP "Obo-XML transformed into godb xml using oboxml_to_godb_prestore.xsl" 4
+.IX Item "Obo-XML transformed into godb xml using oboxml_to_godb_prestore.xsl"
+.IP "godb_prestore.xml stored in database using generic loader" 4
+.IX Item "godb_prestore.xml stored in database using generic loader"
+.RE
+.RS 4
+.PD
+.Sh "Obo-XML"
+.IX Subsection "Obo-XML"
+The Obo-XML format \s-1DTD\s0 is stored in the go\-dev/xml/dtd directory
+.Sh "\s-1HOW\s0 \s-1IT\s0 \s-1WORKS\s0"
+.IX Subsection "HOW IT WORKS"
+Currently the various parsers and perl event handlers use the \fBstag\fR
+module for this \- see Data::Stag for more details, or
+http://stag.sourceforge.net
+.Sh "\s-1NESTED\s0 \s-1EVENTS\s0"
+.IX Subsection "NESTED EVENTS"
+nested events can be thought of as xml, without attributes; nested
+events can easily be turned into xml
+.Sp
+events have a start, a body and an end
+.Sp
+event handlers can *catch* these events and do something with them.
+.Sp
+an object handler can turn the events into objects, centred around the
+GO::Model::Graph object; see GO::Handlers::obj
+.Sp
+other handlers can catch the events and convert them into other
+formats, eg \s-1OWL\s0 or \s-1OBO\s0
+.Sp
+Or you can bypass the handler and get output as an \s-1XML\s0 stream \- to do
+this, just run the go2xml script
+.Sp
+a database loading event handler can catch the events and turn them
+into \s-1SQL\s0 statements, loading a MySQL or postgres database (see the
+go-db-perl library)
+.Sp
+the advantage of an event based parsing architecture is that it is
+easy to build lightweight parsers, and heavy weight object models can
+be bypassed if prefered.
+.Sh "\s-1EXAMPLES\s0"
+.IX Subsection "EXAMPLES"
+To see examples of the events generated by the GO::Parser class, run
+the script go2xml; for example
+.Sp
+.Vb 1
+\&  go2xml function.ontology
+.Ve
+.Sp
+on any GO-formatted flatfile
+.Sp
+This also works on OBO-formatted files:
+.Sp
+.Vb 1
+\&  go2xml gene_ontology.obo
+.Ve
+.Sp
+You can also use the script \*(L"stag\-parse.pl\*(R" which comes with the
+Data::Stag distribution. for example
+.Sp
+.Vb 1
+\&  stag\-parse.pl \-p GO::Parsers::go_assoc_parser gene\-association.fb
+.Ve
+.Sh "\s-1XSLT\s0 \s-1HANDLERS\s0"
+.IX Subsection "XSLT HANDLERS"
+The full list can be found in the go\-dev/xml/xsl directory
+.Sh "\s-1PERL\s0 \s-1HANDLERS\s0"
+.IX Subsection "PERL HANDLERS"
+see GO::Handlers::* for all the different handlers possible;
+more can be added dynamically.
+.Sp
+you can either create the handler object yourself, and pass it as an argument,
+e.g.
+.Sp
+.Vb 4
+\&  my $apph    = new GO::AppHandle(\-db=>"go");
+\&  my $handler = new GO::Handlers::godb({apph=>$apph});
+\&  my $parser  = new GO::Parser({handler=>$handler});
+\&  $parser\->parse(@files);
+.Ve
+.Sp
+or you can use one of the registered handlers:
+.Sp
+.Vb 2
+\&  my $parser = new GO::Parser({handler=>'db',
+\&                               handler_args=>{apph=>$apph}});
+.Ve
+.Sp
+or you can just do things from the command line
+.Sp
+.Vb 1
+\&  go2fmt.pl \-w oboxml function.ontology
+.Ve
+.Sp
+the registered perl handlers are as follows:
+.IP "obo_xml" 4
+.IX Item "obo_xml"
+writes out OBO-XML (which is basically a straightforward conversion of
+the event stream into \s-1XML\s0)
+.IP "obo_text" 4
+.IX Item "obo_text"
+.PD 0
+.IP "go_ont" 4
+.IX Item "go_ont"
+.PD
+legacy GO-ontology file format
+.IP "go_xref" 4
+.IX Item "go_xref"
+\&\s-1GO\s0 xref file, for linking \s-1GO\s0 terms to terms and dbxrefs in other ontologies
+.IP "go_defs" 4
+.IX Item "go_defs"
+legacy GO-definitions file format
+.IP "go_assoc" 4
+.IX Item "go_assoc"
+\&\s-1GO\s0 association file format
+.IP "rdf" 4
+.IX Item "rdf"
+\&\s-1GO\s0 XML-RDF file format
+.IP "owl" 4
+.IX Item "owl"
+\&\s-1OWL\s0 format (default: \s-1OWL\-DL\s0)
+.Sp
+\&\s-1OWL\s0 is a W3C standard format for ontologies
+.Sp
+You will need the \s-1XSL\s0 files from the full go-dev distribution to run
+this; see the \s-1XML\s0 section in <http://www.godatabase.org/dev>
+.IP "prolog" 4
+.IX Item "prolog"
+prolog facts \- you will need a prolog compiler/interpreter to use
+these. You can reason over these facts using Obol or the forthcoming
+Bio-LP project
+.IP "sxpr" 4
+.IX Item "sxpr"
+lisp style S\-Expressions, conforming to the OBO-XML schema; you will
+need lisp to make full use of these. you can also do some nice stuff
+just within emacs (use lisp-mode and load an sxpr file into your
+buffer)
+.IP "godb" 4
+.IX Item "godb"
+this is actually part of the go-db-perl library, not the go-perl library
+.Sp
+catches events and loads them into a database conforming to the \s-1GO\s0
+database schema; see the directory go\-dev/sql, as part of the whole
+go-dev distribution; or www.godatabase.org/dev/database
+.IP "obj_yaml" 4
+.IX Item "obj_yaml"
+A \s-1YAML\s0 dump of the perl GO::Model::Graph object. You need \s-1YAML\s0
+from \s-1CPAN\s0 for this to work
+.IP "obj_storable" 4
+.IX Item "obj_storable"
+A dump of the perl GO::Model::Graph object. You need Storable
+from \s-1CPAN\s0 for this to work. This is intended to cache objects on the
+filesystem, for fast access. The obj_storable representation may not
+be portable
+.RE
+.RS 4
+.SH "EXAMPLES OF DATATYPE TEXT FORMATS"
+.IX Header "EXAMPLES OF DATATYPE TEXT FORMATS"
+.Sh "go_ont format"
+.IX Subsection "go_ont format"
+eg format: go_ont for storing graphs and metadata; for example:
+.Sp
+.Vb 9
+\&  !version: $Revision: 1.15 $
+\&  !date: $Date: 2006/04/20 22:48:23 $
+\&  !editors: Michael Ashburner (FlyBase), Midori Harris (SGD), Judy Blake (MGD)
+\&  $Gene_Ontology ; GO:0003673
+\&   $cellular_component ; GO:0005575
+\&    %extracellular ; GO:0005576
+\&     <fibrinogen ; GO:0005577
+\&      <fibrinogen alpha chain ; GO:0005972
+\&      <fibrinogen beta chain ; GO:0005973
+.Ve
+.Sp
+See GO::Parsers::go_ont_parser for more details
+.Sp
+this is the following file parsed with events turned directly into \s-1OBO\-XML:\s0
+.Sp
+.Vb 52
+\&  <?xml version="1.0" encoding="UTF\-8"?>
+\&  <obo>
+\&    <source>
+\&      <source_type>file</source_type>
+\&      <source_path>z.ontology</source_path>
+\&      <source_mtime>1075164285</source_mtime>
+\&    </source>
+\&    <term>
+\&      <id>GO:0003673</id>
+\&      <name>Gene_Ontology</name>
+\&      <ontology>root</ontology>
+\&    </term>
+\&    <term>
+\&      <id>GO:0005575</id>
+\&      <name>cellular_component</name>
+\&      <ontology>root</ontology>
+\&      <is_a>GO:0003673</is_a>
+\&    </term>
+\&    <term>
+\&      <id>GO:0005576</id>
+\&      <name>extracellular</name>
+\&      <ontology>root</ontology>
+\&      <is_a>GO:0005575</is_a>
+\&    </term>
+\&    <term>
+\&      <id>GO:0005577</id>
+\&      <name>fibrinogen</name>
+\&      <ontology>root</ontology>
+\&      <relationship>
+\&        <type>part_of</type>
+\&        <to>GO:0005576</to>
+\&      </relationship>
+\&    </term>
+\&    <term>
+\&      <id>GO:0005972</id>
+\&      <name>fibrinogen alpha chain</name>
+\&      <ontology>root</ontology>
+\&      <relationship>
+\&        <type>part_of</type>
+\&        <to>GO:0005577</to>
+\&      </relationship>
+\&    </term>
+\&    <term>
+\&      <id>GO:0005973</id>
+\&      <name>fibrinogen beta chain</name>
+\&      <ontology>root</ontology>
+\&      <relationship>
+\&        <type>part_of</type>
+\&        <to>GO:0005577</to>
+\&      </relationship>
+\&    </term>
+\&  </obo>
+.Ve
+.Sh "go_def format"
+.IX Subsection "go_def format"
+eg format: go_defs for storing definitions:
+.Sp
+.Vb 6
+\&  !Gene Ontology definitions
+\&  !
+\&  term: 'de novo' protein folding
+\&  goid: GO:0006458
+\&  definition: Processes that assist the folding of a nascent peptide chain into its correct tertiary structure.
+\&  definition_reference: Sanger:mb
+.Ve
+.Sp
+See GO::Parsers::go_def_parser for more details
+.Sh "go_xref format"
+.IX Subsection "go_xref format"
+eg format: go_xrefs for storing links between \s-1GO\s0 IDs and IDs for terms
+in other DBs:
+.Sp
+.Vb 2
+\&  EC:1.\-.\-.\- > GO:oxidoreductase ; GO:0016491
+\&  EC:1.1.\-.\- > GO:1\-phenylethanol dehydrogenase ; GO:0018449
+.Ve
+.Sp
+See GO::Parsers::go_xref_parser for more details
+.Sh "go_assoc format"
+.IX Subsection "go_assoc format"
+eg format: go-assocs for storing gene\-associations:
+.Sp
+.Vb 2
+\&  SGD     S0004660        AAC1            GO:0005743      SGD:12031|PMID:2167309 TAS             C       ADP/ATP translocator    YMR056C gene    taxon:4932 20010118
+\&  SGD     S0004660        AAC1            GO:0006854      SGD:12031|PMID:2167309 IDA             P       ADP/ATP translocator    YMR056C gene    taxon:4932 20010118
+.Ve
+.Sp
+See GO::Parsers::go_assoc_parser for more details
+.Sh "obo_text format"
+.IX Subsection "obo_text format"
+<http://www.geneontology.org/GO.format.html>
+.Sh "new"
+.IX Subsection "new"
+.Vb 2
+\&  Usage   \- my $parser = GO::Parser\->new()
+\&  Returns \- GO::Parser
+.Ve
+.Sp
+creates a new parser
+.Sh "create_handler"
+.IX Subsection "create_handler"
+.Vb 3
+\&  Usage   \- my $handler = GO::Parser\->create_handler('obj');
+\&  Returns \- L<GO::Handlers::base>
+\&  Args    \- handler type [str]
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ParserEventNames.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ParserEventNames.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ParserEventNames.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,145 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::ParserEventNames 3pm"
+.TH GO::Parsers::ParserEventNames 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::ParserEventNames \- exports constants corresponding to XML
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  use GO::Parsers::ParserEventNames;
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::base_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::base_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::base_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,204 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::base_parser 3pm"
+.TH GO::Parsers::base_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::base_parser     \- base class for parsers
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+.Sh "show_messages"
+.IX Subsection "show_messages"
+.Vb 3
+\&  Usage   \-
+\&  Returns \-
+\&  Args    \-
+.Ve
+.Sh "normalize_files"
+.IX Subsection "normalize_files"
+.Vb 3
+\&  Usage   \- @files = $parser\->normalize_files(@files)
+\&  Returns \-
+\&  Args    \-
+.Ve
+.PP
+takes a list of filenames/paths, \*(L"glob\*(R"s them, uncompresses any compressed files and returns the new file list
+.Sh "litemode"
+.IX Subsection "litemode"
+.Vb 3
+\&  Usage   \- $p\->litemode(1)
+\&  Returns \-
+\&  Args    \- bool
+.Ve
+.PP
+when set, parser will only throw the following events:
+.PP
+id|name|is_a|relationship|namespace
+.PP
+(optimisation for fast parsing)
+.Sh "acc2name_h"
+.IX Subsection "acc2name_h"
+.Vb 3
+\&  Usage   \- $n = $p\->acc2name_h\->{'GO:0003673'}
+\&  Returns \- hashref
+\&  Args    \- hashref [optional]
+.Ve
+.PP
+gets/sets a hash mapping IDs to names
+.PP
+this will be automatically set by an ontology parser
+.PP
+a non-ontology parser will use this index to verify the parsed data
+(see \f(CW$p\fR\->acc_not_found($id), below)
+.Sh "acc_not_found"
+.IX Subsection "acc_not_found"
+.Vb 3
+\&  Usage   \- if ($p\->acc_not_found($go_id)) { warn("$go_id not known") }
+\&  Returns \- bool
+\&  Args    \- acc string
+.Ve
+.PP
+uses acc2name_h \- if this hash mapping has been created \s-1AND\s0 the acc is
+not in the hash, \s-1THEN\s0 it is considered not found
+.PP
+This is useful for non-ontology parsers (xref_parser, go_assoc_parser)
+to check whether a referenced \s-1ID\s0 is actually present in the ontology
+.PP
+note that if acc2name_h has not been created, then accs cannot be
+considered not\-found, and this will always return 0/false

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::generic_tagval_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::generic_tagval_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::generic_tagval_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,155 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::generic_tagval_parser 3pm"
+.TH GO::Parsers::generic_tagval_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::generic_tagval_parser     \- syntax parsing of GO .def flat files
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This generates Stag event streams from one of the various \s-1GO\s0 flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+.PP
+Examples of these files can be found at http://www.geneontology.org
+.PP
+A description of the event streams generated follows; Stag or an \s-1XML\s0
+handler can be used to catch these events
+.SH "GO DEFINITION FILES"
+.IX Header "GO DEFINITION FILES"
+These have a suffix .defs or .definitions
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_assoc_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_assoc_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_assoc_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,179 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::go_assoc_parser 3pm"
+.TH GO::Parsers::go_assoc_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::go_assoc_parser     \- syntax parsing of GO gene\-association flat files
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+do not use this class directly; use GO::Parser
+.PP
+This generates Stag/XML event streams from \s-1GO\s0 association files.
+Examples of these files can be found at http://www.geneontology.org,
+an example of lines from an association file:
+.PP
+.Vb 2
+\&  SGD     S0004660        AAC1            GO:0005743      SGD:12031|PMID:2167309 TAS             C       ADP/ATP translocator    YMR056C gene    taxon:4932 20010118
+\&  SGD     S0004660        AAC1            GO:0006854      SGD:12031|PMID:2167309 IDA             P       ADP/ATP translocator    YMR056C gene    taxon:4932 20010118
+.Ve
+.PP
+See <http://www.geneontology.org/GO.annotation.shtml#file>
+.PP
+See
+<http://www.godatabase.org/dev/xml/dtd/go_assoc\-parser\-events.dtd>
+For the \s-1DTD\s0 of the event stream that is generated
+.PP
+The following stag-schema describes the events that are generated in
+parsing an assoc file:
+.PP
+.Vb 17
+\&  (assocs
+\&   (dbset+
+\&     (proddb "s")
+\&     (prod+
+\&       (prodacc "s")
+\&       (prodsymbol "s")
+\&       (prodtype "s")
+\&       (prodtaxa "i")
+\&       (assoc+
+\&         (assocdate "i")
+\&         (source_db "s")
+\&         (termacc "s")
+\&         (is_not "i")
+\&         (aspect "s")
+\&         (evidence+
+\&           (evcode "s")
+\&           (ref "s"))))))
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_def_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_def_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_def_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,155 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::go_def_parser 3pm"
+.TH GO::Parsers::go_def_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::go_def_parser     \- syntax parsing of GO .def flat files
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This generates Stag event streams from one of the various \s-1GO\s0 flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+.PP
+Examples of these files can be found at http://www.geneontology.org
+.PP
+A description of the event streams generated follows; Stag or an \s-1XML\s0
+handler can be used to catch these events
+.SH "GO DEFINITION FILES"
+.IX Header "GO DEFINITION FILES"
+These have a suffix .defs or .definitions
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_ids_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_ids_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_ids_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,159 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::go_ids_parser 3pm"
+.TH GO::Parsers::go_ids_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::go_ids_parser  \- syntax parsing of flat files containing GO IDs.
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+do not use this class directly; use GO::Parser
+.PP
+This generates Stag/XML event streams from files containing \s-1GO\s0 IDs.
+Lines from such a file might be:
+.PP
+\&\s-1GO:0000003\s0 \s-1GO:0000166\s0   \s-1GO:0000228\s0
+\&\s-1GO:0000229\s0
+\&\s-1GO:0003674\s0
+\&\s-1GO:0003676\s0 \s-1GO:0003677\s0
+\&\s-1GO:0003682\s0
+.PP
+\&\s-1GO:0003700\s0
+\&\s-1GO:0003723\s0 \s-1GO:0003774\s0 \s-1GO:0003779\s0 \s-1GO:0005634\s0
+\&\s-1GO:0005635\s0
+\&\s-1GO:0005654\s0
+.PP
+See
+<http://www.godatabase.org/dev/xml/dtd/go_ids\-parser\-events.dtd>
+For the \s-1DTD\s0 of the event stream that is generated

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_ont_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_ont_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_ont_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,177 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::go_ont_parser 3pm"
+.TH GO::Parsers::go_ont_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::go_ont_parser     \- syntax parsing of GO .ontology flat files
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This generates Stag event streams from one of the various \s-1GO\s0 flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+.PP
+Examples of these files can be found at http://www.geneontology.org
+.PP
+A description of the event streams generated follows; Stag or an \s-1XML\s0
+handler can be used to catch these events
+.SH "GO ONTOLOGY FILES"
+.IX Header "GO ONTOLOGY FILES"
+These files have the .ontology suffix. The stag-schema for the event
+streams generated look like this:
+.PP
+.Vb 18
+\&  (ontology
+\&   (source
+\&     (source_type "s")
+\&     (source_path "s")
+\&     (source_mtime "i"))
+\&   (term+
+\&     (id "s")
+\&     (name "s")
+\&     (is_root? "i")
+\&     (relationship+
+\&       (type "s")
+\&       (to "s"))
+\&     (dbxref*
+\&       (dbname "s")
+\&       (acc "s"))
+\&     (synonym* "s")
+\&     (secondaryid* "s")
+\&     (is_obsolete? "i")))
+.Ve
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_xref_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_xref_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::go_xref_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,164 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::go_xref_parser 3pm"
+.TH GO::Parsers::go_xref_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::go_xref_parser     \- syntax parsing of GO xref flat files (eg eg2go, metacyc2go)
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This generates Stag event streams from one of the various \s-1GO\s0 flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+.PP
+Examples of these files can be found at http://www.geneontology.org
+.PP
+A description of the event streams generated follows; Stag or an \s-1XML\s0
+handler can be used to catch these events
+.SH "GO XREF FILES"
+.IX Header "GO XREF FILES"
+These files have a filename *2go; eg metacyc2go
+.PP
+.Vb 6
+\&  (dbxrefs
+\&   (termdbxref+
+\&     (termacc "s")
+\&     (dbxref
+\&       (xref_dbname "s")
+\&       (xref_key "s"))))
+.Ve
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::locuslink_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::locuslink_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::locuslink_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,138 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::locuslink_parser 3pm"
+.TH GO::Parsers::locuslink_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+GO::Parsers::locuslink_parser \- 
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::mesh_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::mesh_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::mesh_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,146 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::mesh_parser 3pm"
+.TH GO::Parsers::mesh_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::mesh_parser     \- Parses Mesh ascii text files
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\s-1EXPERIMENTAL\s0
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::mgi_assoc_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::mgi_assoc_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::mgi_assoc_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,150 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::mgi_assoc_parser 3pm"
+.TH GO::Parsers::mgi_assoc_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::mgi_assoc_parser \- parses MGI gene assoc stanza files
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This is an \s-1EXPERIMENTAL\s0 module for converting MGIs in-house stanza format
+.PP
+this is richer than go_assoc files as it allows combinatorial assocs
+.PP
+these are represented with the go-assoc xml <in> element
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ncbi_taxon_names_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ncbi_taxon_names_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ncbi_taxon_names_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,143 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::ncbi_taxon_names_parser 3pm"
+.TH GO::Parsers::ncbi_taxon_names_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::ncbi_taxon_names_parser     \- OBO Flat file parser object
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ncbi_taxonomy_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ncbi_taxonomy_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::ncbi_taxonomy_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,153 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::ncbi_taxonomy_parser 3pm"
+.TH GO::Parsers::ncbi_taxonomy_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::ncbi_taxonomy_parser
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+See <ftp://ftp.ebi.ac.uk/pub/databases/taxonomy/taxonomy.dat>
+.SH "PARSER ARCHITECTURE"
+.IX Header "PARSER ARCHITECTURE"
+This generates Stag event streams from one of the various \s-1GO\s0 flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+.PP
+Examples of these files can be found at http://www.geneontology.org
+.PP
+A description of the event streams generated follows; Stag or an \s-1XML\s0
+handler can be used to catch these events

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obj_emitter.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obj_emitter.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obj_emitter.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,141 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::obj_emitter 3pm"
+.TH GO::Parsers::obj_emitter 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+GO::Parsers::obj_emitter     \- 
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+do not use this class directly; use GO::Parser
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This is not a file parser \- it takes a GO::Model::Graph object as
+inputs and fires \s-1OBO\s0 \s-1XML\s0 events

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obo_text_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obo_text_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obo_text_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,143 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::obo_text_parser 3pm"
+.TH GO::Parsers::obo_text_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::obo_text_parser     \- OBO Flat file parser object
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obo_xml_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obo_xml_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::obo_xml_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,149 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::obo_xml_parser 3pm"
+.TH GO::Parsers::obo_xml_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::obo_xml_parser.pm     \- Parses xml made from events
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+this parser does a direct translation of \s-1XML\s0 to events, passed on to the handler
+.PP
+the \s-1XML\s0 used should be the attribute-less xml generated by the
+GO::Handlers::XmlOutHandler class
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::owl_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::owl_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::owl_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,146 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::owl_parser 3pm"
+.TH GO::Parsers::owl_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::owl_parser.pm     \- turns OWL XML into event stream
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+this parser does a direct translation of \s-1XML\s0 to events, passed on to the handler
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::references_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::references_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::references_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,146 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::references_parser 3pm"
+.TH GO::Parsers::references_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::references_parser     \- syntax parsing of GO.refences files
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Parses this file:
+.PP
+<http://www.geneontology.org/doc/GO.references>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::refgenomes_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::refgenomes_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::refgenomes_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,147 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::refgenomes_parser 3pm"
+.TH GO::Parsers::refgenomes_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::refgenomes_parser     \- syntax parsing of GO .def flat files
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "GO DEFINITION FILES"
+.IX Header "GO DEFINITION FILES"
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::unknown_format_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::unknown_format_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::unknown_format_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,145 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::unknown_format_parser 3pm"
+.TH GO::Parsers::unknown_format_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::unknown_format_parser     \- base class for parsers
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+.SH "AUTHOR"
+.IX Header "AUTHOR"

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::xrf_abbs_parser.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::xrf_abbs_parser.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Parsers::xrf_abbs_parser.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,146 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Parsers::xrf_abbs_parser 3pm"
+.TH GO::Parsers::xrf_abbs_parser 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+.Vb 1
+\&  GO::Parsers::xrf_abbs_parser     \- syntax parsing of GO xrf_abbs flat files
+.Ve
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  do not use this class directly; use GO::Parser
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Parses this file:
+.PP
+<http://www.geneontology.org/doc/GO.xrf_abbs>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Utils.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Utils.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/GO::Utils.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,205 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "GO::Utils 3pm"
+.TH GO::Utils 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.Sh "\fIrearrange()\fP"
+.IX Subsection "rearrange()"
+.Vb 10
+\& Usage    : n/a
+\& Function : Rearranges named parameters to requested order.
+\& Returns  : @params \- an array of parameters in the requested order.
+\& Argument : $order : a reference to an array which describes the desired
+\&                     order of the named parameters.
+\&            @param : an array of parameters, either as a list (in
+\&                     which case the function simply returns the list),
+\&                     or as an associative array (in which case the
+\&                     function sorts the values according to @{$order}
+\&                     and returns that new array.
+.Ve
+.PP
+.Vb 1
+\& Exceptions : carps if a non\-recognised parameter is sent
+.Ve
+.Sh "\fIget_param()\fP"
+.IX Subsection "get_param()"
+Usage    : get_param('name',(\-att1=>'ben',\-name=>'the_name'))
+Function : Fetches a  named parameter.
+Returns  : The value of the requested parameter.
+Argument : \f(CW$name\fR : The name of the the parameter desired
+           \f(CW at param\fR : an array of parameters, as an associative array 
+Exceptions : carps if a non-recognised parameter is sent
+.PP
+Based on \fIrearrange()\fR, which is originally from \s-1CGI\s0.pm by Lincoln
+Stein and BioPerl by Richard Resnick.  See \fIrearrange()\fR for details.
+.Sh "remove_duplicates"
+.IX Subsection "remove_duplicates"
+remove duplicate items from an array
+.PP
+.Vb 1
+\& usage: remove_duplicates(\e at arr)
+.Ve
+.PP
+affects the array passed in, and returns the modified array
+.SH "merge_hashes"
+.IX Header "merge_hashes"
+joins two hashes together
+.PP
+.Vb 1
+\& usage: merge_hashes(\e%h1, \e%h2);
+.Ve
+.PP
+%h1 will now contain the key/val pairs of \f(CW%h2\fR as well. if there are
+key conflicts, \f(CW%h2\fR values will take precedence.
+.SH "get_method_ref"
+.IX Header "get_method_ref"
+.Vb 3
+\& returns a pointer to a particular objects method
+\& e.g.   my $length_f = get_method_ref($seq, 'length');
+\&        $len = &$length_f();
+.Ve
+.Sh "pset2hash"
+.IX Subsection "pset2hash"
+.Vb 3
+\&  Usage   \- my $h = pset2hash([{name=>"id", value=>"56"}, {name=>"name", value=>"jim"}]);
+\&  Returns \- hashref
+\&  Args    \- arrayref of name/value keyed hashrefs
+.Ve
+.Sh "spell_greek"
+.IX Subsection "spell_greek"
+takes a word as a parameter and spells out any greek symbols encoded
+within (eg s/&agr;/alpha/g)
+.Sh "check_obj_graph"
+.IX Subsection "check_obj_graph"
+.Vb 3
+\&  Usage   \-
+\&  Returns \- true if cycle detected
+\&  Args    \- any object
+.Ve

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/go-perl.3pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/go-perl.3pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/man/man3/go-perl.3pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,371 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.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" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "go-perl 3pm"
+.TH go-perl 3pm "2004-11-24" "perl v5.8.8" "User Contributed Perl Documentation"
+.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=>'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\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;
+\&  }
+.Ve
+.PP
+.Vb 2
+\&  # ** 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 seperate 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
+.Sh "\s-1SIMPLE\s0 \s-1PROGRAMMERS\s0 \s-1INTERFACE\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\s0 \s-1XSL\s0 transform (by name) on an OBO-XML file
+.Sp
+For a full list of XSLs available, see
+<http://www.godatabase.org/xml/xsl>
+.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.

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Basic.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Basic.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Basic.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,204 @@
+# $Id: Basic.pm,v 1.4 2005/03/30 21:15:48 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Basic     - basic procedural interface to go-perl
+
+=head1 SYNOPSIS
+
+  use GO::Basic;
+  parse_obo(shift @ARGV);
+  find_term(name=>"cytosol");
+  print $term->acc();                 # OO usage
+  print acc();                        # procedural usage
+  get_parent;
+  print name();
+  
+
+=head1 DESCRIPTION
+
+=cut
+
+package GO::Basic;
+
+use Exporter;
+
+use Carp;
+use GO::Model::Graph;
+use GO::Parser;
+use FileHandle;
+use strict;
+use base qw(GO::Model::Root Exporter);
+use vars qw(@EXPORT);
+
+our $graph;
+our $terms;
+our $term;
+
+ at EXPORT =
+  qw(
+     parse
+     parse_obo
+     parse_goflat
+     parse_def
+     parse_assoc
+     term
+     terms
+     acc
+     accs
+     name
+     names
+     graph
+     find_term
+     find_terms
+     get_parents
+     get_rparents
+     get_children
+     get_rchildren
+    );
+
+sub parse_obo { parse(@_, {fmt=>'obo'}) }
+sub parse_goflat { parse(@_, {fmt=>'go_ont'}) }
+sub parse_def { parse(@_, {fmt=>'go_def'}) }
+sub parse_assoc { parse(@_, {fmt=>'go_assoc'}) }
+
+sub parse {
+    my $opt = {format=>'obo'};
+    my @files =
+      map {
+          if (ref($_)) {
+              if (ref($_) eq 'HASH') {
+                  my %h = %$_;
+                  $opt->{$_} = $h{$_} foreach keys %h;
+              }
+              else {
+                  throw("bad argument: $_");
+              }
+              ();
+          }
+          else {
+              $_;
+          }
+      } @_;
+    my $parser = GO::Parser->new({format=>$opt->{fmt}, 
+                                  use_cache=>$opt->{use_cache},
+                                  handler=>'obj'});
+    $parser->parse($_) foreach @files;
+    $graph = $parser->handler->graph;
+    $graph;
+}
+
+sub find_terms {
+    @_ < 1 && throw("must pass an argument!");
+    my %constr = @_==1 ? (name=>shift) : @_;
+    check_for_graph();
+    $terms = $graph->term_query(\%constr);
+    return $terms;
+}
+
+sub find_term {
+    find_terms(@_);
+    if (@$terms) {
+        if (@$terms > 1) {
+            message(">1 terms returned!");
+        }
+        $term = $terms->[0];
+        return $term;
+    }
+    return;
+}
+
+sub term {
+    check_for_term();
+    return $term;
+}
+
+sub terms {
+    check_for_terms();
+    return @$terms;
+}
+
+sub next_term {
+    $term = shift @$terms;
+}
+
+sub graph {
+    check_for_graph();
+    return $graph;
+}
+
+sub acc {
+    check_for_term();
+    return $term->acc;
+}
+
+sub accs {
+    check_for_terms();
+    return map {$_->acc} @$terms;
+}
+
+sub name {
+    check_for_term();
+    return $term->name;
+}
+
+sub names {
+    check_for_terms();
+    return map {$_->name} @$terms;
+}
+
+
+sub definition {
+    check_for_term();
+    return $term->definition;
+}
+
+sub check_for_term {
+    $term || throw("no term selected!");
+}
+sub check_for_terms {
+    $terms || throw("no term set selected!");
+}
+sub check_for_graph {
+    $graph || throw("no graph selected!");
+}
+
+sub get_parents {
+    check_for_graph();
+    check_for_term();
+    $terms = $graph->get_parent_terms($term->acc);
+}
+
+sub get_rparents {
+    check_for_graph();
+    check_for_term();
+    $terms = $graph->get_recursive_parent_terms($term->acc);
+}
+
+sub get_children {
+    check_for_graph();
+    check_for_term();
+    $terms = $graph->get_child_terms($term->acc);
+}
+
+sub get_rchildren {
+    check_for_graph();
+    check_for_term();
+    $terms = $graph->get_recursive_child_terms($term->acc);
+}
+
+sub throw {
+    confess "@_";
+}
+
+sub message {
+    print STDERR "@_\n";
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/abstract_prolog_writer.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/abstract_prolog_writer.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/abstract_prolog_writer.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,76 @@
+
+package GO::Handlers::abstract_prolog_writer;
+use base qw(GO::Handlers::base Exporter);
+use strict;
+
+sub out {
+    my $self = shift;
+    $self->print("@_");
+}
+
+sub cmt {
+    my $self = shift;
+    my $cmt = shift;
+    $self->out(" % $cmt") if $cmt;
+    return;
+}
+
+sub prologquote {
+    my $s = shift;
+    my $force = shift;
+    if (ref($s)) {
+        if (ref($s) ne 'HASH') {
+            sprintf("[%s]",
+                    join(',',map{prologquote($_)} @$s));
+        }
+        else {
+            my @keys = keys %$s;
+            if (@keys == 1) {
+                my $functor = $keys[0];
+                my $args = $s->{$functor};
+                sprintf("$functor(%s)",
+                        join(', ', map {prologquote($_)} @$args));
+            }
+            else {
+                warn "@keys != 1 - ignoring";
+            }
+        }
+    }
+    else {
+        $s = '' unless defined $s;
+        if ($s =~ /^\-?[0-9]+$/ && !$force) {
+            return $s;
+        }
+        $s =~ s/\'/\'\'/g;
+        "'$s'";
+    }
+}
+
+sub nl {
+    shift->print("\n");
+}
+
+sub fact {
+    my $self = shift;
+    my $pred = shift;
+    my @args = @{shift||[]};
+    my $cmt = shift;
+    $self->out(sprintf("$pred(%s).",
+		       join(', ', map {prologquote($_)} @args)));
+    $self->cmt($cmt);
+    $self->nl;
+}
+
+# ensure all fields are quoted
+sub factq {
+    my $self = shift;
+    my $pred = shift;
+    my @args = @{shift||[]};
+    my $cmt = shift;
+    $self->out(sprintf("$pred(%s).",
+		       join(', ', map {prologquote($_,1)} @args)));
+    $self->cmt($cmt);
+    $self->nl;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/abstract_sql_writer.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/abstract_sql_writer.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/abstract_sql_writer.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,40 @@
+
+package GO::Handlers::abstract_sql_writer;
+use base qw(Data::Stag::Writer Exporter);
+use strict;
+
+sub out {
+    my $self = shift;
+    print "@_";
+}
+
+sub cmt {
+    my $self = shift;
+    my $cmt = shift;
+    $self->out(" % $cmt") if $cmt;
+    return;
+}
+
+sub sqlquote {
+    my $s = shift;
+    $s =~ s/\'/\\\'/g;
+    "'$s'";
+}
+
+sub nl {
+    shift->print("\n");
+}
+
+sub fact {
+    my $self = shift;
+    my $pred = shift;
+    my @args = @{shift||[]};
+    my $cmt = shift;
+    $self->out(sprintf("INSERT INTO $pred VALUES (%s); ",
+		       join(', ', map {sqlquote($_)} @args)));
+    $self->cmt($cmt);
+    $self->nl;
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/base.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/base.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/base.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,164 @@
+# $Id: base.pm,v 1.5 2004/11/24 02:28:00 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::base     - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::base
+
+=cut
+
+=head1 DESCRIPTION
+
+Default Handler, other handlers inherit from this class
+
+this class catches events (start, end and body) and allows the
+subclassing module to intercept these. unintercepted events get pushed
+into a tree
+
+See GO::Parser for details on parser/handler architecture
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+package GO::Handlers::base;
+
+use strict;
+use Exporter;
+use Carp;
+use GO::Model::Root;
+use vars qw(@ISA @EXPORT_OK @EXPORT);
+use base qw(Data::Stag::Writer Exporter);
+
+ at EXPORT_OK = qw(lookup);
+
+sub EMITS    { () }
+sub CONSUMES {
+    qw(
+       header
+       source
+       term
+       typedef
+       prod
+      )
+}
+
+sub is_transform { 0 }
+
+=head2 strictorder
+
+  Usage   - $handler->strictorder(1);
+  Returns -
+  Args    -
+
+boolean accessor; if set, then terms passed must be in order
+
+=cut
+
+sub strictorder {
+    my $self = shift;
+    $self->{_strictorder} = shift if @_;
+    return $self->{_strictorder};
+}
+
+sub proddb {
+    my $self = shift;
+    $self->{_proddb} = shift if @_;
+    return $self->{_proddb};
+}
+
+sub ontology_type {
+    my $self = shift;
+    $self->{_ontology_type} = shift if @_;
+    return $self->{_ontology_type};
+}
+
+sub root_to_be_added {
+    my $self = shift;
+    $self->{_root_to_be_added} = shift if @_;
+    return $self->{_root_to_be_added};
+}
+
+
+
+# DEPRECATED
+sub messages {
+    my $self = shift;
+    $self->{_messages} = shift if @_;
+    return $self->{_messages};
+}
+
+*error_list = \&messages;
+
+sub message {
+    my $self = shift;
+    push(@{$self->messages},
+         shift);
+}
+
+
+sub lookup {
+    my $tree = shift;
+    my $k = shift;
+#    use Data::Dumper;
+#    print Dumper $tree;
+#    confess;
+    if (!ref($tree)) {
+        confess($tree);
+    }
+    my @v = map {$_->[1]} grep {$_->[0] eq $k} @$tree;
+    if (wantarray) {
+        return @v;
+    }
+    $v[0];
+}
+
+
+#sub print {
+#    my $self = shift;
+#    print "@_";
+#}
+sub print {shift->addtext(@_)}
+
+sub printf {
+    my $self = shift;
+    my $fmt = shift;
+    $self->addtext(sprintf($fmt, @_));
+}
+
+sub throw {
+    my $self = shift;
+    my @msg = @_;
+    confess("@msg");
+}
+sub warn {
+    my $self = shift;
+    my @msg = @_;
+    warn("@msg");
+}
+
+sub dbxref2str {
+    my $self = shift;
+    my $dbxref = shift;
+    return
+      $dbxref->sget_dbname . ':' . $dbxref->sget_acc;
+}
+
+sub xslt {
+    my $self = shift;
+    $self->{_xslt} = shift if @_;
+    return $self->{_xslt};
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_def.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_def.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_def.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,62 @@
+# $Id: go_def.pm,v 1.3 2005/03/22 04:51:08 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::go_def     - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::go_def
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::go_def;
+use GO::Parsers::ParserEventNames;
+use Data::Stag qw(:all);
+use base qw(GO::Handlers::base);
+use strict;
+
+
+sub e_term {
+    my $self = shift;
+    my $t = shift;
+    my $n = stag_get($t, NAME);
+    my $def = stag_get($t, DEF);
+    if ($def) {
+        $self->tag(term => $n);
+        $self->tag(goid => stag_sget($t, ID));
+        $self->tag(definition => stag_sget($def, DEFSTR));
+        $self->tag(definition_reference => stag_sget($_,DBNAME).':'.stag_sget($_,ACC)) foreach stag_get($def, DBXREF);
+        $self->tag(comment => stag_sget($t, COMMENT));
+
+        $self->print("\n");
+    }
+    return;
+
+}
+
+sub tag {
+    my $self = shift;
+    my ($t, $v) = @_;
+    return unless $v;
+    $self->printf("%s: %s\n", $t, $v);
+    return;
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_ont.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_ont.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_ont.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,41 @@
+# $Id: go_ont.pm,v 1.1 2004/01/27 23:52:24 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::go_ont     - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::go_ont
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::go_ont;
+use base qw(GO::Handlers::obj);
+use strict;
+
+sub e_obo {
+    my $self = shift;
+    my $g = $self->g;
+
+    $g->to_text_output(-fmt=>'gotext',
+		       -fh=>$self->safe_fh,
+		      );
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_xref.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_xref.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/go_xref.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,45 @@
+# $Id: go_xref.pm,v 1.1 2004/01/27 23:52:24 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::go_xref     - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::go_xref
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::go_xref;
+use base qw(GO::Handlers::base);
+use strict;
+
+
+sub e_term {
+    my $self = shift;
+    my $t = shift;
+    my ($name, $id) = $t->lget(qw(name id));
+    foreach ($t->get_dbxref) {
+	$self->printf("%s:%s > $name ; $acc\n",
+		      $_->sget_db, $_->sget_acc);
+    }
+    return;
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/godb_prestore.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/godb_prestore.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/godb_prestore.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,326 @@
+# $Id: godb_prestore.pm,v 1.9 2005/03/22 22:38:11 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::godb_prestore  - transforms OBO XML to GODB XML
+
+=head1 SYNOPSIS
+
+  
+
+=head1 DESCRIPTION
+
+This is a transform for turning OBO XML events into XML events that
+are isomorphic to the GO Database (ie XML element names match GO DB
+table and column names).
+
+This transformation is suitable for direct loading into a db using the
+generic DBIx::DBStag loader (see http://stag.sourceforge.net)
+
+This perl transform may later be replaced by an XSL transform (for
+speed)
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::godb_prestore;
+use Data::Stag qw(:all);
+use base qw(GO::Handlers::base);
+
+use strict;
+use Carp;
+use Data::Dumper;
+use Data::Stag qw(:all);
+use GO::Parsers::ParserEventNames;  # XML constants for elements
+
+sub EMITS {
+    qw(
+       dbstag_metadata
+       source_audit
+       term
+       gene_product
+      )
+}
+
+sub is_transform { 1 }
+
+sub dbstag_mapping {
+    return([
+            "type/term_synonym.synonym_type_id=term.id",
+            "term1/term2term.term1_id=term.id",
+            "term2/term2term.term2_id=term.id",
+            "type/term2term.relationship_type_id=term.id",
+            "type/gene_product.type_id=term.id",
+            "source_db/association.source_db_id=db.id",
+            ]
+           );
+}
+
+sub e_source {
+    my $self = shift;
+    my $source = shift;
+    stag_name($source, 'source_audit');
+    return $source;
+}
+
+sub e_header {
+    my ($self, $hdr) = @_;
+    [dbstag_metadata=>[
+                       map {[map=>$_]} @{$self->dbstag_mapping}
+                      ]
+    ];
+}
+
+sub e_term {
+    my ($self, $term) = @_;
+    my $id = stag_get($term, ID) || $self->throw($term->sxpr);
+    warn("DEPRECATED - use XSL instead");
+    stag_set($term, ACC, $id);
+    my $name_h = $self->{name_h};
+    my $name = stag_get($term, NAME);
+    my $ont = stag_get($term, NAMESPACE);
+    my $is_obs = stag_get($term, IS_OBSOLETE);
+ 
+    my @extra_events = ();
+    my @is_as = stag_get($term, IS_A);
+    my @rels = (stag_get($term, RELATIONSHIP),
+                map {[relationship=>[[to=>$_],[type=>'is_a']]]} @is_as);
+    if ($is_obs) {
+        my $obs = "obsolete_$ont";
+        @rels = ([relationship=>[[to=>$obs],
+                                 [type=>'is_a']]]);
+        if ($obs eq $id) {
+            # place root obs under root
+            @rels = ([relationship=>[[to=>$self->{__added_root} || 'all'],
+                                     [type=>'is_a']]]);
+        }
+        if (!$self->{"__added_obsnode_$ont"}) {
+            $self->{"__added_obsnode_$ont"} = $obs;
+            push(@extra_events,
+                 $self->e_term(Data::Stag->new(term=>[[id=>$obs],
+                                                      [name=>$obs],
+                                                      [namespace=>$ont],
+                                                      [is_obsolete=>1],
+                                                     ]
+                                              )
+                              )
+                );
+        }
+        # in go format, obsolete nodes may have 'fake' parentage;
+        # either to root (for root obsolete term) or to root 
+        # obsolete term;
+        # here we replace this with $obs
+    }
+    my @cvrels =
+      map {
+          my $to = stag_get($_=>TO);
+          my $type = stag_get($_=>TYPE);
+          Data::Stag->new(term2term=>[
+				      [term1=>[[term=>[[acc=>$to]]]]],
+				      [term2=>[[term=>[[acc=>$id]]]]],
+				      _type($type, 'relationship'),
+				     ]
+                         );
+      } @rels;
+
+    if ($name && !@cvrels) {
+        # add 'all' node;
+        # only for named node (to avoid adding root when parsing defs)
+        # and when there are no parents
+        # GO DB relies on having one single root node
+        my $all = $self->{__added_root};
+        if ($all) {
+        }
+        else {
+            my $alldef = 'This term is the most general term possible.';
+            $all = 'all';
+            $self->{__added_root} = $all;
+            @cvrels = 
+              (Data::Stag->new(term=>[
+                                      [acc=>'all'],
+                                      [name=>'all'],
+                                      [term_definition=>[
+                                                         [term_definition=>$alldef],
+                                                        ]],
+                                      [is_root=>1],
+                                      [term_type=>'universal'],
+                                     ])
+              );
+        }
+        push(@cvrels,
+             Data::Stag->new(term2term=>[
+                                         [term1=>[[term=>[[acc=>$all]]]]],
+                                         [term2=>[[term=>[[acc=>$id]]]]],
+                                         _type('is_a', 'relationship'),
+                                        ]
+                            )
+            );
+    }
+
+    my $def = stag_get($term, DEF);
+    my @alt_ids = stag_get($term, ALT_ID);
+    my @syns = stag_get($term, SYNONYM);
+
+    my $comment = stag_find($term, COMMENT);   # comment can be under term or def
+    my $t = time;
+    my $nuterm = 
+      Data::Stag->new(term=> 
+                      [
+                       [acc=>$id],
+                       $name ? [NAME=>$name] : (),,
+                       $ont ? [term_type=>$ont] : (),
+                       defined $is_obs ? [is_obsolete=>$is_obs && $is_obs ne 'false' ? 1:0] : (),
+                       $name ? [term_audit=>[
+                                             [term_loadtime=>$t]
+                                            ]] : (),
+                      ]
+                     );
+    my @term_dbxrefs =
+      map {
+	  Data::Stag->new(term_dbxref=>[[dbxref=>[_xref_stags($_)]]])
+      } stag_get($term, XREF_ANALOG);
+    if ($def || $comment) {
+	stag_set($nuterm, term_definition=> 
+                 [
+                  ($def ? [term_definition=>stag_sget($def, DEFSTR)]:()),
+                  ($comment ? [term_comment=>$comment] : ()),
+                 ]);
+        if ($def) {
+            push(@term_dbxrefs,
+                 Data::Stag->new(term_dbxref=>[[is_for_definition=>1],
+                                               [dbxref=>[_xref_stags($_)]]]))
+              foreach stag_get($def, DBXREF);
+        }
+    }
+    stag_add($nuterm, TERM_DBXREF, $_) foreach @term_dbxrefs;
+    stag_add($nuterm, term_synonym=>
+             [
+              [acc_synonym=>$_],
+              [term_synonym=>$_],
+              _type('acc','synonym'),
+             ])
+      foreach @alt_ids;
+
+    foreach (@syns) {
+	my $type = stag_sget($_, TYPE);
+	stag_add($nuterm, term_synonym=>
+                 [
+                  $type ? _type($type,'synonym') : (),
+                  [term_synonym=>stag_sget($_, SYNONYM_TEXT)]
+                 ]);
+    }
+    return (@extra_events,$nuterm, at cvrels);
+}
+
+sub e_typedef {
+    my ($self, $t) = @_;
+    my $id = stag_get($t, ID);
+    return
+      Data::Stag->new(term=>[
+			     [acc=>$id],
+			     [name=>$id]
+			    ]);
+}
+
+sub e_prod {
+    my ($self, $prod) = @_;
+    my $proddb = stag_sget($self->up(1), PRODDB);
+    my $full_name = stag_sget($prod, PRODNAME);
+    my @gpstags =
+      (
+       [symbol=>stag_sget($prod, PRODSYMBOL)],
+       ($full_name ? [full_name=>$full_name] : ()),
+       [dbxref=>[[xref_dbname=>$proddb],
+		 [xref_key=>stag_sget($prod, PRODACC)]]],
+       [species=>[[ncbi_taxa_id=>stag_sget($prod, PRODTAXA)]]],
+       _type(stag_sget($prod,TYPE) || 'gene', 'gene_product'),
+       (map {
+	   [gene_product_synonym=>[[product_synonym=>$_]]]
+       } stag_get($prod,PRODSYN)),
+      );
+    my @assocs = stag_get($prod,ASSOC);
+    foreach my $assoc (@assocs) {
+        my @quals = stag_sget($assoc,QUALIFIER);
+        my $source_db = stag_sget($assoc, SOURCE_DB);
+	push(@gpstags,
+	     [association=>[
+			    [term=>[[acc=>stag_sget($assoc,TERMACC)]]],
+			    [is_not=>stag_sget($assoc,IS_NOT)],
+                            (map {
+                                [association_qualifier=>[[term=>[[acc=>$_]]]]]
+                            } @quals),
+#			    ($qual ? [qualifier=>[[term=>[[acc=>$qual]]]]]: ()),
+			    ($source_db ? [source_db=>[[db=>[[name=>$source_db]]]]] : ()),
+			    [assocdate=>stag_sget($assoc,ASSOCDATE)],
+			    (map {
+				my @withs = stag_get($_,WITH);
+				[evidence=>[
+					    [code=>stag_sget($_,EVCODE)],
+					    (scalar(@withs) ? [seq_acc=>join('|', at withs)] : ()),
+					    _xref(stag_sget($_,REF)),
+					    scalar(@withs) ?
+                                            [evidence_dbxref=>[
+							       (map {
+								   _xref($_)
+							       } @withs)
+							      ]] : (),
+					   ]]
+			    } stag_get($assoc,EVIDENCE))
+			   ]
+	     ]
+	    );
+							  
+    }
+    return Data::Stag->new(gene_product=>[@gpstags]);
+}
+
+sub _xref_stags {
+    my $x = shift;
+    ([xref_key=>stag_sget($x,ACC)],
+     [xref_dbname=>stag_sget($x,DBNAME)]);
+}
+
+sub _type {
+    my $type = shift;
+    my $ont = shift;
+    [type=>[[term=>[
+		    [acc=>$type],
+		    [name=>$type],
+		    [term_type=>$ont],
+		   ]
+	    ]]
+    ];
+
+}
+
+sub _xref {
+    my $id = shift;
+    my ($dbname,$acc);
+    if ($id =~ /(\w+):(\S+)/) {
+        $dbname = $1;
+        $acc = $2;
+    }
+    else {
+        $dbname = '';
+        $acc = $id;
+    }
+    return 
+      [dbxref=>[
+                [xref_dbname=>$dbname],
+                [xref_key=>$acc]
+               ]
+      ];
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/lexanalysis.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/lexanalysis.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/lexanalysis.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,63 @@
+# stag-handle.pl -p GO::Parsers::GoOntParser -m <THIS> function/function.ontology
+
+package GO::Handlers::lexanalysis;
+use base qw(Data::Stag::Writer Exporter);
+use strict;
+
+
+sub e_term {
+    my ($self, $term) = @_;
+    my $name = $term->get_name;
+    my $ont = $term->get_ontology;
+    return if $term->get_is_obsolete;
+    my @words = split(/[\W_]/, $name);
+
+    for (my $i=0; $i < @words; $i++) {
+#	my $w = $words[$i];
+#	$self->fact(windex => [$ont, $i, ($i- at words)+1, $w, $name]);
+	for (my $j = 0; $j<3; $j++) {
+	    if ($i+$j < @words) {
+		my @set = @words[($i..($i+$j))];
+		my $size = $j+1;
+		$self->fact("w$size"=> [$i, ($i+$j+1)- at words, @set, $ont, $name]);
+	    }
+	}
+    }
+    $self->nl;
+    return;
+}
+
+sub out {
+    my $self = shift;
+    print "@_";
+}
+
+sub cmt {
+    my $self = shift;
+    my $cmt = shift;
+    $self->out(" % $cmt") if $cmt;
+    return;
+}
+
+sub prologquote {
+    my $s = shift;
+    $s =~ s/\'/\\\'/g;
+    "'$s'";
+}
+
+sub nl {
+    shift->print("\n");
+}
+
+sub fact {
+    my $self = shift;
+    my $pred = shift;
+    my @args = @{shift||[]};
+    my $cmt = shift;
+    $self->out(sprintf("$pred(%s).",
+		       join(', ', map {prologquote($_)} @args)));
+    $self->cmt($cmt);
+    $self->nl;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/lexanalysis2sql.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/lexanalysis2sql.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/lexanalysis2sql.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,6 @@
+
+package GO::Handlers::lexanalysis2sql;
+use base qw(GO::Handlers::abstract_sql_writer GO::Handlers::lexanalysis);
+use strict;
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,391 @@
+# $Id: obj.pm,v 1.23 2007/08/03 03:32:48 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::obj     - parses GO files into GO object model
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::obj
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 PUBLIC METHODS
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::obj;
+use Data::Stag qw(:all);
+use GO::Parsers::ParserEventNames;
+use base qw(GO::Handlers::base);
+use strict qw(vars refs);
+
+my $TRACE = $ENV{GO_TRACE};
+
+sub init {
+    my $self = shift;
+    $self->SUPER::init;
+
+    use GO::ObjCache;
+    my $apph = GO::ObjCache->new;
+    $self->{apph} = $apph;
+
+    use GO::Model::Graph;
+    my $g = $self->apph->create_graph_obj;
+    $self->{g} = $g;
+    return;
+}
+
+
+=head2 graph
+
+  Usage   - my $terms = $obj_handler->graph->get_all_terms;
+  Synonym - g
+  Synonym - ontology
+  Returns - GO::Model::Graph object
+  Args    -
+
+as files are parsed, objects are created; depending on what kind of
+datatype is being parsed, the classes of the created objects will be
+different - eg GO::Model::Term, GO::Model::Association etc
+
+the way to access all of thses is through the top level graph object
+
+eg
+
+  $parser = GO::Parser->new({handler=>'obj'});
+  $parser->parse(@files);
+  my $graph = $parser->graph;
+  
+
+=cut
+
+sub g {
+    my $self = shift;
+    $self->{g} = shift if @_;
+    return $self->{g};
+}
+
+*graph = \&g;
+*ontology = \&g;
+
+
+sub apph {
+    my $self = shift;
+    $self->{apph} = shift if @_;
+    return $self->{apph};
+}
+
+sub root_term {
+    my $self = shift;
+    $self->{_root_term} = shift if @_;
+    return $self->{_root_term};
+}
+
+# 20041029 - not currently used
+sub add_root {
+    my $self = shift;
+    my $g = $self->g;
+
+    my $root = $self->apph->create_term_obj;
+    $root->name('root');
+    $root->acc('root');
+    $g->add_term($root);
+    $self->root_term($root);
+    $self->root_to_be_added(1);
+    $root;
+}
+
+# -- HANDLER METHODS --
+
+sub e_obo {
+    my $self = shift;
+    my $g = $self->g;
+    return ();
+}
+
+sub e_typedef {
+    my $self = shift;
+    my $t = shift;
+    $self->stanza('Typedef', $t);
+}
+
+sub e_term {
+    my $self = shift;
+    my $t = shift;
+    $self->stanza('Term', $t);
+}
+
+sub stanza {
+    my $self = shift;
+    my $stanza = lc(shift);
+    my $tree = shift;
+    my $acc = stag_get($tree, ID);
+    if (!$acc) {
+        $self->throw( "NO ACC: $@\n" );
+    }
+    my $term;
+    eval {
+        $term = $self->g->get_term($acc);
+    };
+    if ($@) {
+        $self->throw( "ARG:$@" );
+    }
+    # no point adding term twice; we
+    # assume the details are the same
+    return $term if $term && $self->strictorder;
+
+    $term = $self->apph->create_term_obj;
+    my %h = ();
+    foreach my $sn (stag_kids($tree)) {
+        my $k = $sn->name;
+        my $v = $sn->data;
+
+        if ($k eq RELATIONSHIP) {
+            my $obj = stag_get($sn, TO);
+            $self->g->add_relationship($obj, $term->acc, stag_get($sn, TYPE));
+        }
+        elsif ($k eq IS_A) {
+            $self->g->add_relationship($v, $term->acc, IS_A);
+        }
+        elsif ($k eq DEF) {
+            my $defstr = stag_get($sn, DEFSTR);
+	    my @xrefs = stag_get($sn, DBXREF);
+	    $term->definition($defstr);
+	    $term->add_definition_dbxref($self->dbxref($_)) foreach @xrefs;
+        }
+        elsif ($k eq SYNONYM) {
+            my $synstr = stag_get($sn, SYNONYM_TEXT);
+            my $type = stag_find($sn, 'scope');
+	    my @xrefs = stag_get($sn, DBXREF);
+	    $term->add_synonym_by_type(lc($type), $synstr);
+#	    $term->add_definition_dbxref($_) foreach @xrefs;
+        }
+        elsif ($k eq ALT_ID) {
+	    $term->add_alt_id($v);
+        }
+        elsif ($k eq CONSIDER) {
+	    $term->add_consider($v);
+        }
+        elsif ($k eq REPLACED_BY) {
+	    $term->add_replaced_by($v);
+        }
+        elsif ($k eq ALT_ID) {
+	    $term->add_alt_id($v);
+        }
+        elsif ($k eq XREF_ANALOG || $k eq XREF) {
+            my $xref =
+	      $self->apph->create_xref_obj(stag_pairs($sn));
+            $term->add_dbxref($xref);
+        }
+        elsif ($k eq XREF_UNKNOWN) {
+            my $xref =
+	      $self->apph->create_xref_obj(stag_pairs($sn));
+            $term->add_dbxref($xref);
+        }
+        elsif ($k eq ID) {
+            $term->acc($v);
+        }
+        elsif ($k eq NAMESPACE) {
+            $term->namespace($v);
+        }
+        elsif ($k eq NAME) {
+            $term->name($v);
+        }
+        elsif ($k eq SUBSET) {
+            $term->add_subset($v);
+        }
+        elsif ($k eq COMMENT) {
+            $term->comment($v);
+        }
+        elsif ($k eq IS_ROOT) {
+            $term->is_root($v);
+        }
+        elsif ($k eq BUILTIN) {
+            # ignore
+        }
+        elsif ($k eq PROPERTY_VALUE) {
+            # ignore
+        }
+        elsif ($k eq IS_METADATA_TAG) {
+            # ignore
+        }
+        elsif ($k eq IS_OBSOLETE) {
+            $term->is_obsolete($v);
+        }
+        elsif ($k eq IS_TRANSITIVE ||
+               $k eq IS_SYMMETRIC  ||
+               $k eq IS_ANTI_SYMMETRIC  ||
+               $k eq IS_REFLEXIVE  ||
+               $k eq INVERSE_OF ||
+               $k eq TRANSITIVE_OVER ||
+               $k eq DOMAIN ||
+               $k eq RANGE) {
+            my $m = lc($k);
+            $term->$m($v);
+        }
+        elsif ($term->can("add_$k")) {
+            # CONVENIENCE METHOD - map directly to object method
+            warn("add method for $k");
+            my $m = "add_$k";
+            $term->$m($v);
+        }
+        elsif ($term->can($k)) {
+            warn("add method for $k");
+            # CONVENIENCE METHOD - map directly to object method
+            $term->$k($v);
+        }
+        elsif ($k eq INTERSECTION_OF) {
+            my $rel = stag_get($sn, TYPE);
+            my $obj = stag_get($sn, TO);
+            my $isect = [$rel,$obj];
+            my $ns = stag_find($sn, 'namespace');
+            if (!$rel) {
+                shift @$isect;
+            }
+            my $ldef = $term->logical_definition;
+            if (!$ldef) {
+                $ldef = $self->apph->create_logical_definition_obj();
+                $term->logical_definition($ldef);
+            }
+            $ldef->namespace($ns) if ($ns);
+            $ldef->add_intersection($isect);
+        }
+        elsif ($k eq UNION_OF) {
+            $term->add_equivalent_to_union_of_term($v);
+        }
+        elsif ($k eq DISJOINT_FROM) {
+            $term->add_disjoint_from_term($v);
+        }
+        else {
+            warn("add method for $k");
+            $term->stag->add($k, $v);
+
+#            $self->throw("don't know what to do with $k");
+#            print "no $k\n";
+        }
+    }
+    if ($self->root_to_be_added &&
+	!$term->is_obsolete &&
+        $stanza eq 'term') {
+	my $parents = $self->g->get_parent_relationships($term->acc);
+	if (!@$parents) {
+	    my $root = $self->root_term || $self->throw("no root term");
+            $self->g->add_relationship($root, $term->acc, IS_A);
+	}
+    }
+
+#    $term->type($self->{ontology_type}) unless $term->type;
+    if (!$term->name) {
+#        warn("no name; using acc ".$term->acc);
+#        $term->name($term->acc);
+    }
+    if ($stanza eq 'typedef') {
+        $term->is_relationship_type(1);
+    }
+
+    $self->g->add_term($term);
+    printf STDERR "Added term %s %s\n", $term->acc, $term->name 
+      if $TRACE;
+#    $term;
+    return ();
+}
+
+sub dbxref {
+    my $self = shift;
+    my $x = shift;
+    $self->apph->create_xref_obj(stag_pairs($x))
+}
+
+
+sub e_proddb {
+    my $self = shift;
+    $self->proddb(shift->data);
+    return;
+}
+
+sub e_prod {
+    my $self = shift;
+    my $tree = shift;
+    my $g = $self->g;
+    my $prod =
+      $self->apph->create_gene_product_obj({symbol=>stag_sget($tree, PRODSYMBOL),
+                                            type=>stag_sget($tree, PRODTYPE),
+                                            full_name=>stag_sget($tree, PRODNAME),
+                                            speciesdb=>$self->proddb,
+                                      });
+    my @syns = stag_get($tree, PRODSYN);
+    $prod->xref->xref_key(stag_sget($tree, PRODACC));
+    $prod->synonym_list(\@syns);
+    my @assocs = stag_get($tree, ASSOC);
+    my $taxid = stag_get($tree, PRODTAXA);
+    my $species;
+    if ($taxid) {
+        $species =       
+          $self->apph->create_species_obj({ncbi_taxa_id=>$taxid});
+        $prod->species($species);
+
+    }
+    foreach my $assoc (@assocs) {
+        my $acc = stag_get($assoc, TERMACC);
+        if (!$acc) {
+            $self->message("no accession given");
+            next;
+        }
+
+        
+        my $t = $g->get_term($acc);
+        if (!$t) {
+            if (!$self->strictorder) {
+                $t = $self->apph->create_term_obj({acc=>$acc});
+                $self->g->add_term($t);
+            }
+            else {
+                $self->message("no such term $acc");
+                next;
+            }
+        }
+        my $aspect = stag_get($assoc, ASPECT);
+        if ($aspect) {
+            $t->set_namespace_by_code($aspect);
+        }
+
+        my @evs = stag_get($assoc, EVIDENCE);
+        my $ao =
+          $self->apph->create_association_obj({gene_product=>$prod,
+                                               is_not=>stag_sget($assoc, IS_NOT),
+                                              });
+        my $date = stag_get($assoc,ASSOCDATE);
+        $ao->assocdate($date) if $date;
+
+        my $assigned_by = stag_get($assoc,SOURCE_DB);
+        $ao->assigned_by($assigned_by) if $assigned_by;
+
+        foreach my $ev (@evs) {
+            my $eo =
+              $self->apph->create_evidence_obj({
+                                                code=>stag_sget($ev, EVCODE),
+                                               });
+            my @seq_xrefs = stag_get($ev, WITH),
+            my @refs = stag_get($ev, REF);
+            map { $eo->add_seq_xref($_) } @seq_xrefs;
+            map { $eo->add_pub_xref($_) } @refs;
+            $ao->add_evidence($eo);
+        }
+        $t->add_association($ao);
+    }
+    return;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj_storable.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj_storable.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj_storable.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,25 @@
+package GO::Handlers::obj_storable;
+use base qw(GO::Handlers::obj);
+use strict;
+use FileHandle;
+use Storable qw(store_fd);
+
+sub e_obo {
+    my $self = shift;
+    my $fh = $self->fh;
+    if (!$fh) {
+        my $f = $self->file;
+        if ($f) {
+            $fh = FileHandle->new(">$f") ||
+              $self->throw("cannot write to: $f");
+        }
+        else {
+            $self->throw("$self requires file or fh");
+        }
+    }
+    my $g = $self->g;
+    store_fd $g, $fh;
+    return;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj_yaml.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj_yaml.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obj_yaml.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,13 @@
+package GO::Handlers::obj_yaml;
+use base qw(GO::Handlers::obj);
+use strict;
+use YAML;
+
+sub e_obo {
+    my $self = shift;
+    my $g = $self->g;
+    $self->print(Dump $g);
+    return;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,3 @@
+package GO::Handlers::obo;
+use base qw(GO::Handlers::obo_text);
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_godb_flat.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_godb_flat.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_godb_flat.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,408 @@
+# $Id: obo_godb_flat.pm,v 1.4 2007/06/12 21:59:18 benhitz Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::obo_godb_flat    - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::obo_godb_flat
+
+=cut
+
+=head1 DESCRIPTION
+
+transforms OBO XML events into flat tables for mysql to load
+part of the association bulk loading pipeline
+
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::obo_godb_flat;
+use Data::Stag qw(:all);
+use Data::Dumper;
+use GO::Parsers::ParserEventNames;
+use base qw(GO::Handlers::base);
+use strict qw(vars refs);
+
+my %TABLES = (
+    dbxref       => [ qw(id xref_key xref_keytype xref_dbname) ], # must append many dbxrefs
+    term         => [ qw(id name term_type acc is_obsolete is_root) ], # must append SO terms, qualifiers
+    gene_product => [ qw(id symbol dbxref_id species_id secondary_species_id type_id full_name) ],
+    association  => [ qw(id term_id gene_product_id is_not role_group assocdate source_db_id) ],
+    db           => [ qw(id name fullname datatype generic_url url_syntax) ], # last 4 all null in current load
+    evidence     => [ qw(id code association_id dbxref_id seq_acc) ],
+    association_qualifier => [ qw(id association_id term_id value) ], # must append 
+    species               => [ qw(id ncbi_taxa_id common_name lineage_string genus species) ],
+    # linking tables
+    gene_product_synoynm => [ qw(gene_product_id product_synonym)],
+    evidence_dbxref      => [ qw(evidence_id dbxref_id) ]
+    );
+    
+my %fh = ( map (("$_.txt" => 0), keys %TABLES));
+
+
+sub init {
+
+    my $self = shift;
+
+    $self->SUPER::init();
+    $self->{pk} = { map (($_ => 0), keys %TABLES) };
+
+}
+    
+sub apph {
+    my $self = shift;
+    $self->{apph} = shift if @_;
+    return $self->{apph};
+}
+    
+
+sub _obo_escape {
+    my $s=shift;
+    $s =~ s/\\/\\\\/;
+    $s =~ s/([\{\}])/\\$1/g;
+    $s;
+}
+
+
+sub safe {
+    my $word = shift;
+    $word =~ s/ /_/g;
+    $word =~ s/\-/_/g;
+    $word =~ s/\'/prime/g;
+    $word =~ tr/a-zA-Z0-9_//cd;
+    $word =~ s/^([0-9])/_$1/;
+    $word;
+}
+
+sub quote {
+    my $word = shift;
+    #$word =~ s/,/\\,/g;  ## no longer required
+    $word =~ s/\"/\\\"/g;
+    "\"$word\"";
+}
+
+
+
+sub e_prod {
+    my $self = shift;
+    my $prod = shift;
+
+    my $proddb = $self->up_to('dbset')->get_proddb;
+
+    $self->file('gene_product.txt'); # we actually to map these to file handles somewhere
+
+    my $gp_id = $self->add_gene_product($prod, $proddb);
+    
+    my @assocs = $prod->get_assoc;
+
+    for my $assoc (@assocs) {
+
+	# first dump the ASSOCIATION table
+	$self->file('association.txt');       
+	$self->write(join("\t", (
+				 ++$self->{pk}{association},
+				 $self->get_term_id($assoc->get_termacc),
+				 $gp_id,
+				 stag_get($assoc, IS_NOT),
+				 '\N', # role_group current always NULL
+				 $assoc->sget_assocdate,
+				 $self->get_sourcedb_id($assoc->sget_source_db),))
+		     );
+
+        $self->write("\n");
+	# now the qualifiers
+	$self->file('association_qualifier.txt');
+	for my $qual ($assoc->get_qualifier) {
+
+	    $self->write(join("\t", (
+				     ++$self->{pk}{association_qualifier},
+				     $self->{pk}{association},
+				     $self->get_term_id($qual, 'association_qualifier'),
+				     '\N',)) # value is currently always NULL
+			 );
+	    $self->write("\n");
+	}
+
+	# now evidence and evidence dbxref
+	for my $ev ($assoc->get_evidence) {
+	    
+	    $self->file('evidence.txt');
+	    $self->write(join("\t", (
+				     ++$self->{pk}{evidence},
+				     $ev->sget_evcode,
+				     $self->{pk}{association},
+				     $self->get_dbxref_id($ev->sget_ref), # only the first one here
+				     $ev->sget_with || "",  # put only the first one here, I dunno why
+				     ))
+			 );
+	    $self->write("\n");
+
+	    $self->file('evidence_dbxref.txt');
+	    for my $ref ($ev->get_ref) {
+
+		next; # skip whole loop until we figure this out.
+		$self->write(join("\t", (
+					  $self->{pk}{evidence},
+					  $self->get_dbxref_id($ref),
+					  ))
+			     );
+		$self->write("\n");
+
+	    }
+	    for my $with ($ev->get_with) {
+
+		$self->write(join("\t", (
+					  $self->{pk}{evidence},
+					  $self->get_dbxref_id($with),
+					  ))
+			     );
+		$self->write("\n");
+
+	    }
+
+				     
+	}
+	
+    }
+    
+}
+
+
+sub add_gene_product {
+
+    my $self = shift;
+    my $prod = shift;
+    my $proddb = shift;
+
+    my $acc = $prod->get_prodacc;
+
+    if ($self->apph->dbxref2gpid_h->{$proddb}->{$acc}) {
+    # check to see if we've already added it
+#	warn "checking $proddb, $acc ".$self->apph->dbxref2gpid_h->{$proddb}->{$acc};
+    # unique key for gene product is actually dbxref_id, but need the gp_id
+    } else {
+#	warn "$proddb, $acc, does not exist, creating";
+    
+	# if not, write a line to gene_product.txt
+	# new dbxref_id is added by get_dbxref_id.
+	$self->write(join("\t", (
+				 ++$self->{pk}{gene_product},
+				 $prod->sget_prodsymbol,
+				 $self->get_dbxref_id($proddb, $acc),
+				 $self->get_taxon_id($prod->sget_prodtaxa),
+				 '\N', # currently no secondary species ids
+				 $self->get_term_id($prod->get_prodtype, 'sequence'),
+				 $prod->sget_prodname || "") )# that should be full name.
+		     );
+
+	$self->write("\n");
+	$self->apph->dbxref2gpid_h->{$proddb}->{$acc} = $self->{pk}{gene_product};
+
+    }
+
+    # add synoyms if necessary
+    $self->file('gene_product_synonym.txt');
+
+    for my $syn ($prod->get_prodsyn) {
+
+	$self->write(join("\t", ($self->{pk}{gene_product}, $syn)));
+	$self->write("\n");
+    }
+
+    return $self->apph->dbxref2gpid_h->{$proddb}->{$acc};
+    
+}
+
+sub get_dbxref_id {
+
+    my $self = shift;
+    my $dbname = shift;
+    my $key = shift;
+
+    if (!$key) {
+
+        if ($dbname =~ /^([^:]+):+(\S+)/) {
+	    $dbname = $1;
+	    $key = $2;
+	} 
+
+    }
+
+
+
+    if (!$dbname || !$key) {
+	warn "Must supply dbname and key: ($dbname),($key) attempting to write $self->{_file}\n";
+	return 0;
+
+    }
+
+    my $ucKey = uc($key);
+    my $ucDb  = uc($dbname);
+
+    # mysql will handle case-insensitivity, but perl keeps seperate
+
+    return $self->apph->dbxref2id_h->{$ucDb}->{uc($ucKey)} if $self->apph->dbxref2id_h->{$ucDb}->{$ucKey};
+
+    # doesn't exist, add it to dbxref file and hash
+    my $oldfile = $self->file;
+
+    $self->file('dbxref.txt');
+
+    $self->write(join("\t", (
+			     ++$self->{pk}{dbxref},
+			     $key,
+			     '\N',
+			     $dbname,))
+		 );
+
+    $self->write("\n");
+
+    $self->file($oldfile); # set it back
+
+    $self->apph->dbxref2id_h->{$ucDb}->{$ucKey} = $self->{pk}{dbxref};  # return the id
+
+
+}
+			     
+sub get_term_id {
+
+    # note this hopeless fails if 2 terms in different CVs have the same name!
+
+    my $self = shift;
+    my $term = shift;
+    my $termType = shift;
+    my $acc = shift || $term;
+
+    $term = lc($term) unless $term =~ /^GO:/; # sometimes people use Gene instead of gene
+
+    return $self->apph->acc2id_h->{$term} if $self->apph->acc2id_h->{$term};
+
+    die "No term type specified for $term, and not in hash" if !$termType;
+
+    # doesn't exist, add it to dbxref file and hash
+    my $oldfile = $self->file;
+
+    $self->file('term.txt');
+
+    $self->write(join("\t", (
+			     ++$self->{pk}{term},
+			     $term,
+			     $termType,
+			     $acc,
+			     0,    # never is_obsolete
+			     0,))  # never is_root
+		 );
+    $self->write("\n");
+
+    $self->file($oldfile); # set it back
+
+    $self->apph->acc2id_h->{$term} = $self->{pk}{term};  # return the id
+
+
+}
+    
+sub get_sourcedb_id {
+
+    my $self = shift;
+    my $db = shift;
+ 
+    return $self->apph->source2id_h->{$db} if $self->apph->source2id_h->{$db};
+
+    # doesn't exist, add it to file and hash
+    my $oldfile = $self->file;
+
+    $self->file('db.txt');
+
+    $self->write(join("\t", (
+			     ++$self->{pk}{db},
+			     $db,
+			     '\N',
+			     '\N',
+			     '\N',   
+			     '\N',))  # last 4 columns always null
+		 );
+    $self->write("\n");
+
+    $self->file($oldfile); # set it back
+
+    $self->apph->source2id_h->{$db} = $self->{pk}{db};  # return the id
+
+
+}
+sub get_taxon_id {
+
+    my $self = shift;
+    my $taxonId = shift;
+    
+    return $self->apph->taxon2id_h->{$taxonId} if $self->apph->taxon2id_h->{$taxonId};
+    warn "Could not find id in db for taxon $taxonId, adding\n";
+
+    my $oldfile = $self->file;
+
+    $self->file('species.txt');
+
+    $self->write(join("\t", (
+			     ++$self->{pk}{species},
+			     $taxonId,
+			     '\N',  # name unknown
+			     '\N',  # lineage unknown
+			     '\N',  # genuss unknown
+			     '\N',))  # species unknown
+		 );
+    $self->write("\n");
+
+    $self->file($oldfile); # set it back
+
+    $self->apph->taxon2id_h->{$taxonId} = $self->{pk}{species};  # return the id
+
+
+}
+
+
+sub file {
+# overrides Data::Stag::Writer file
+    my $self = shift;
+
+    if (@_) {
+	
+	$self->{_file} = shift;
+	$self->{_fh} = undef;
+    }
+
+    unless ( $fh{$self->{_file}} ) {
+
+#	print STDERR "opening file $self->{_file}...\n";
+	$fh{$self->{_file}} = $self->safe_fh;
+
+    }
+    
+    $self->{_fh} = $fh{$self->{_file}};
+
+    return $self->{_file};
+
+}
+
+sub close_files {
+
+    my $self = shift;
+    for my $fh (values %fh) {
+
+	close($fh) if $fh;
+    }
+
+    close($self->{_fh}) if $self->{_fh};
+}
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_html.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_html.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_html.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,36 @@
+# $Id: obo_html.pm,v 1.2 2004/09/07 23:51:03 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::obo_html     - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::obo_html
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::obo_html;
+use base qw(GO::Handlers::xsl_base);
+use strict;
+
+our $d = `dirname $0`;
+chomp $d;
+$ENV{XSLT_FILE} = "$d/../xml/xsl/obo_html.xsl";
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_sxpr.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_sxpr.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_sxpr.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,5 @@
+# stag-handle.pl -p GO::Parsers::GoOntParser -m <THIS> function/function.ontology
+
+package GO::Handlers::obo_sxpr;
+use base qw(Data::Stag::SxprWriter Exporter);
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_text.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_text.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_text.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,369 @@
+# $Id: obo_text.pm,v 1.14 2007/08/01 16:01:59 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::obo_text     - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::obo_text
+
+=cut
+
+=head1 DESCRIPTION
+
+transforms OBO XML events into OBO Text
+
+L<http://www.geneontology.org/GO.format.html#oboflat>
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::obo_text;
+use Data::Stag qw(:all);
+use GO::Parsers::ParserEventNames;
+use base qw(GO::Handlers::base);
+use strict qw(vars refs);
+
+sub s_obo {
+    my $self = shift;
+    #$self->SUPER::s_obo(@_);
+    return;
+}
+
+sub e_header {
+    my $self = shift;
+    my $hdr = shift;
+
+    my $fmt = stag_get($hdr,'format-version');
+    $self->tag("format-version"=> 
+               (stag_sget($hdr,'format-version') || '1.2'));
+    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = 
+      localtime(time);
+    $self->tag('date'=>sprintf("%02d:%02d:%04d %02d:%02d",
+                               $mday,$mon+1,$year+1900,$hour,$min));
+    $self->tag('autogenerated-by'=>$0);
+    foreach (stag_tnodes($hdr)) {
+        $self->tag(stag_name($_), _obo_escape($_->data));
+    }
+    my @sts = stag_get($hdr,'synonymtypedef');
+    foreach (@sts) {
+        my $scope = stag_sget($_,'scope');
+        $self->tag(synonymtypedef => sprintf("%s \"%s\" %s",
+                                             stag_sget($_,NAME),
+                                             stag_sget($_,DEFSTR) || '',
+                                             ($scope ? uc($scope) : '')));
+    }
+
+    my @ssdefs = stag_get($hdr,'subsetdef');
+    foreach (@ssdefs) {
+        $self->tag(subsetdef => sprintf("%s \"%s\"",
+                                        stag_sget($_,ID),
+                                        stag_sget($_,NAME)));
+    }
+    $self->{__emitted_header} = 1;
+
+    $self->print("\n");
+    return;
+}
+
+sub e_typedef {
+    my $self = shift;
+    my $t = shift;
+    $self->stanza('Typedef', $t);
+}
+
+sub e_term {
+    my $self = shift;
+    my $t = shift;
+    if (!$self->{__emitted_header}) {
+        $self->e_header(stag_new(HEADER,[]));
+    }
+    $self->stanza('Term', $t);
+}
+
+sub e_instance {
+    my $self = shift;
+    my $t = shift;
+    if (!$self->{__emitted_header}) {
+        $self->e_header(stag_new(HEADER,[]));
+    }
+    $self->stanza('Instance', $t);
+}
+
+sub stanza {
+    my $self = shift;
+    my $stanza = shift;
+    my $t = shift;
+    $self->print("[$stanza]\n");
+    my @BOOLEAN_TAGS =
+      (
+       IS_ANONYMOUS,
+       IS_OBSOLETE,
+       IS_CYCLIC,
+       IS_TRANSITIVE,
+       IS_SYMMETRIC,
+       IS_ANTI_SYMMETRIC,
+       IS_REFLEXIVE,
+       IS_METADATA_TAG,
+      );
+    my @TAGS =
+      (ID,
+       NAME,
+       ALT_ID,
+       NAMESPACE,
+       DEF,
+       COMMENT,
+       SUBSET,
+       IS_A ,
+       RELATIONSHIP,
+       UNION_OF,
+       INTERSECTION_OF,
+       SYNONYM,
+       PROPERTY_VALUE,
+       XREF_ANALOG,
+       XREF_UNKNOWN,
+       @BOOLEAN_TAGS,
+      );
+    my %IS_BOOLEAN = map { ($_=>1) } @BOOLEAN_TAGS;
+    my @IGNORE = qw(is_root);
+    foreach my $tag (@IGNORE) {
+        stag_unset($t, $tag);
+    }
+    foreach my $tag (@TAGS) {
+        my @vals = stag_get($t, $tag);
+        next unless @vals;
+
+        if ($tag eq DEF) {
+            my $def = shift @vals;
+            my $defstr = $def->get_defstr;
+            my $qn = stag_sget($t, "$tag/@");
+            $self->tag(def => _obo_escape($defstr), [$def->get_dbxref], $qn);
+        }
+        elsif ($tag eq RELATIONSHIP) {
+            $self->tag(relationship => sprintf("%s %s",
+                                               $_->sget_type,
+                                               $_->sget_to),
+                       undef,
+                       $_->sget('@'))
+              foreach @vals;
+        }
+        elsif ($tag eq INTERSECTION_OF) {
+            $self->tag(intersection_of => sprintf("%s %s",
+                                                  $_->sget_type,
+                                                  $_->sget_to),
+                       undef,
+                       $_->sget('@'))
+              foreach @vals;
+        }
+        elsif ($tag eq UNION_OF) {
+            $self->tag(union_of => sprintf("%s %s",
+                                           $_->sget_type,
+                                           $_->sget_to),
+                       undef,
+                       $_->sget('@'))
+              foreach @vals;
+        }
+        elsif ($tag eq SYNONYM) {
+            foreach my $syn (@vals) {
+                my $type = $syn->sget('@/synonym_type');
+                my $scope = $syn->sget('@/scope');
+                my @vals = (quote($syn->sget_synonym_text));
+                push(@vals,uc($scope)) if $scope;
+                push(@vals,$type) if $type;
+                $self->tag($tag,
+                           join(' ', at vals),
+                           [$syn->get_dbxref]);
+            }
+        }
+        elsif ($tag eq XREF_ANALOG) {
+            $self->tag('xref', dbxref($_),undef,$_->sget('@'))
+              foreach @vals;
+        }
+        elsif ($tag eq PROPERTY_VALUE) {
+            foreach (@vals) {
+                my $dt = $_->sget_datatype;
+                if ($dt) {
+                    $self->tag('property_value' => sprintf("%s %s %s",
+                                                           $_->sget_type,
+                                                           quote($_->sget_value),
+                                                           $dt));
+                }
+                else {
+                    $self->tag('property_value' => sprintf("%s %s",
+                                                           $_->sget_type,
+                                                           $_->sget_to));
+                }
+            }
+        }
+        elsif ($IS_BOOLEAN{$tag}) {
+            $self->tag($tag, $vals[0] ? "true" : "false");
+        }
+        else {
+            foreach (@vals) {
+                if (ref($_)) {
+                    $self->tag($tag, $_->sget('.'),undef,$_->sget('@'))
+                }
+                else {
+                    $self->tag($tag, _obo_escape($_));
+                }
+            }
+        }
+        stag_unset($t, $tag);
+    }
+    my @tnodes = stag_tnodes($t);
+    $self->tag($_->name, _obo_escape($_->data))
+      foreach @tnodes;
+
+    my @ntnodes = stag_ntnodes($t);
+    if (@ntnodes) {
+        print STDERR $_->xml foreach @ntnodes;
+        $self->throw( "unknown elements");
+    }
+
+    $self->print("\n");
+
+}
+
+sub tag {
+    my $self = shift;
+    my ($t, $v, $xrefsr, $qualsr) = @_;
+    my @xrefs = @{$xrefsr || []};
+    return unless defined $v;
+    if ($t eq DEF) {
+        $v=quote($v);
+    }
+    my $xrefl = '';
+    if ($xrefsr) {
+	$xrefl =
+	  ' ['.join(', ',
+		   map {
+		       dbxref($_);
+		   } @xrefs).']';
+    }
+    my $ql = '';
+    if ($qualsr) {
+        my %qh = stag_pairs($qualsr);
+        $ql = ' {'.join(
+                        ', ',
+                        map {
+                            "$_=".quote($qh{$_})
+                        } keys %qh
+                       ).'}';
+    }
+    $self->printf("%s: %s$xrefl$ql\n", $t, $v);
+    return;
+}
+
+sub _obo_escape {
+    my $s=shift;
+    $s =~ s/\\/\\\\/;
+    $s =~ s/([\{\}])/\\$1/g;
+    $s;
+}
+
+sub dbxref {
+    my $x = shift;
+    if (ref($x)) {
+        my $xref = $x->sget_dbname . ':' . $x->sget_acc;
+        my $name = $x->sget_name;
+        if (defined($name)) {
+            $name =~ s/\"/\\\"/g;
+            $xref." \"$name\"";
+        }
+        else {
+            $xref;
+        }
+    }
+    else {
+        $x;
+    }
+}
+
+sub safe {
+    my $word = shift;
+    $word =~ s/ /_/g;
+    $word =~ s/\-/_/g;
+    $word =~ s/\'/prime/g;
+    $word =~ tr/a-zA-Z0-9_//cd;
+    $word =~ s/^([0-9])/_$1/;
+    $word;
+}
+
+sub quote {
+    my $word = shift;
+    #$word =~ s/,/\\,/g;  ## no longer required
+    $word =~ s/\"/\\\"/g;
+    "\"$word\"";
+}
+
+# -- EXPERIMENTAL CODE --
+# obo format for gene_assocs
+
+# we are hardcoding aspects here; this is OK, only for
+# gene_assoc file which is GO specific
+our %ASPECT_IDX =
+  (F => 'has_activity',
+   P => 'involved_in',
+   C => 'localised_to'
+  );
+
+sub e_prod {
+    my $self = shift;
+    my $prod = shift;
+
+    my $proddb = $self->up_to('dbset')->get_proddb;
+    
+    my $acc = $prod->get_prodacc;
+    my $id = "$proddb:$acc";
+    my $type = $prod->get_prodtype || 'gene_product';
+    $self->print("!! ***************************** \n");
+    $self->print("!! Gene Product: $id \n");
+    $self->print("!! ***************************** \n");
+    $self->print("[$type]\n");
+    $self->tag(id=>$id);
+    $self->tag(dbname=>$proddb);
+    $self->tag(acc=>$acc);
+    $self->tag(symbol=>$prod->sget_prodsymbol);
+    $self->tag(name=>$prod->sget_prodname);
+    $self->tag(synonym=>$_) foreach $prod->sget_prodsyn;
+    $self->tag(has_taxon=>'NCBI:'.$prod->sget_prodtaxa);
+    $self->print("\n");
+
+    my @assocs = $prod->get_assoc;
+    foreach my $assoc (@assocs) {
+        my $termacc = $assoc->get_termacc;
+        my $aspect = $assoc->get_aspect;
+        my $ns = $ASPECT_IDX{$aspect};
+        $self->print("[gene_product_annotation]\n");
+        $self->tag(involves_gene_product=>$id);
+        $self->tag($ns=>$termacc);
+        $self->tag($_=>'true') foreach $assoc->get_qualifier;
+        $self->tag(date=>$assoc->sget_assocdate);
+        $self->tag(source_db=>$assoc->sget_source_db);
+        my @evs = $assoc->get_evidence;
+        foreach my $ev (@evs) {
+            $self->tag(has_evidence=>$ev->sget_evcode, $ev->get_ref);
+            $self->tag(with=>$_) foreach $ev->get_with;
+        }
+        $self->print("\n");
+    }
+    $self->print("!! //\n\n");
+    
+}
+
+sub dbxrefstr {
+
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_xml.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_xml.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/obo_xml.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,5 @@
+# stag-handle.pl -p GO::Parsers::GoOntParser -m <THIS> function/function.ontology
+
+package GO::Handlers::obo_xml;
+use base qw(Data::Stag::XMLWriter Exporter);
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/owl.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/owl.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/owl.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,180 @@
+# stag-handle.pl -p GO::Parsers::GoOntParser -m <THIS> function/function.ontology
+
+# $Id: owl.pm,v 1.5 2004/07/08 04:08:42 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::owl     - writes OWL 
+
+=head1 SYNOPSIS
+
+  use GO::Parser;
+  my $p = GO::Parser->new({handler=>'owl'});
+  $p->parse("function.ontology");
+
+=head1 DESCRIPTION
+
+Consumes an OBO-XML event stream and generates OWL XML
+
+See the file
+
+  go-dev/doc/mapping-obo-to-owl.txt
+
+For more details
+
+=head1 COMMAND LINE
+
+go2fmt.pl -w owl function.obo
+
+=cut
+
+
+package GO::Handlers::owl;
+use base qw(Data::Stag::Writer Exporter);
+use XML::Writer;
+use strict;
+
+sub is_transform { 0 }
+
+sub init {
+    my $self = shift;
+    $self->SUPER::init(@_);
+    my $gen = XML::Writer->new(OUTPUT=>$self->safe_fh);
+    $self->{writer} = $gen;
+
+    $gen->setDataMode(1);
+    $gen->setDataIndent(4);
+}
+
+sub s_obo {
+    my $self = shift;
+
+    $self->{writer}->xmlDecl("UTF-8");
+#    $self->{writer}->doctype("owl:RDF", 
+#			     '-//Gene Ontology//Custom XML/RDF Version 2.0//EN',
+#			     'http://www.godatabase.org/dtd/go.dtd');
+    $self->{writer}->startTag('rdf:RDF', 
+			      'xmlns:rdf'=>"http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+			      'xmlns:rdfs'=>"http://www.w3.org/2000/01/rdf-schema#",
+			      'xmlns:owl'=>"http://www.w3.org/2002/07/owl#",
+
+			      'xmlns'=>"http://www.geneontology.org/owl/obo/#",
+			      'xmlns:obo'=>"http://www.geneontology.org/owl/obo/#",
+			      'xml:base'=>"http://www.geneontology.org/owl/obo/",
+			      'xmlns:dc'=>"http://purl.org/dc/elements/1.1/",
+			     );
+}
+
+sub e_obo {
+    my $self = shift;
+
+    $self->{writer}->endTag('rdf:RDF');
+}
+
+sub w {
+    shift->{writer}
+}
+
+sub e_term {
+    my ($self, $term) = @_;
+    my $id = $term->get_id || $self->throw($term->sxpr);
+    my $w = $self->w;
+    $id = rdfsafe($id);
+    my $name_h = $self->{name_h};
+    my $name = $term->get_name;
+    $w->startTag('owl:Class', 'rdf:ID'=>$id);
+    if ($name) {
+	if (!$name_h) {
+	    $name_h = {};
+	    $self->{name_h} = $name_h;
+	}
+	$name_h->{$id} = $name;
+	$self->cmt("-- $name --\n");
+	$w->dataElement('rdfs:label', $name);
+    }
+    my $def = $term->get_definition;
+    if ($def) {
+	$w->dataElement('dc:description',
+			$def->get_definition_text);
+    }
+    my $ont = $term->get_ontology;
+#    if ($ont) {
+#	$self->fact('belongs', [$id, $ont]);
+#    }
+    my @is_as = $term->get_is_a;
+    $w->dataElement('rdfs:subClassOf',
+		       '',
+		       'rdf:resource'=>rdfres($_)) foreach @is_as;
+    my @rels = $term->get_relationship;
+    foreach (@rels) {
+	$w->startTag('rdfs:subClassOf');
+	$w->startTag('owl:Restriction');
+	$w->dataElement('owl:onProperty', '',
+			   'rdf:resource'=>rdfres($_->get_type));
+	$w->dataElement('owl:someValuesFrom', '',
+			   'rdf:resource'=>rdfres($_->get_to));
+	$w->endTag('owl:Restriction');
+	$w->endTag('rdfs:subClassOf');
+    }
+    $w->endTag('owl:Class');
+    return;
+}
+
+sub e_typedef {
+    my ($self, $typedef) = @_;
+    my $id = $typedef->get_id || $self->throw($typedef->sxpr);
+    my $w = $self->w;
+    $id = rdfsafe($id);
+    my $name = $typedef->get_name;
+    $w->startTag('owl:ObjectProperty', 'rdf:ID'=>$id);
+    if ($name) {
+#	$w->dataElement('rdfs:label', $name);
+    }
+    my $def = $typedef->get_definition;
+    if ($def) {
+	$w->dataElement('dc:description',
+			$def->get_definition_text);
+    }
+    my @is_as = $typedef->get_is_a;
+    $w->dataElement('rdfs:subPropertyOf',
+		       '',
+		       'rdf:resource'=>rdfres($_)) foreach @is_as;
+    my $domain = $typedef->get_domain;
+    my $range = $typedef->get_range;
+    $w->dataElement('rdfs:domain','','rdf:resource'=>rdfres($domain)) if $domain;
+    $w->dataElement('rdfs:range','','rdf:resource'=>rdfres($range)) if $range;
+    $w->endTag('owl:ObjectProperty');
+    return;
+}
+
+sub out {
+    my $self = shift;
+    print "@_";
+}
+
+sub cmt {
+    my $self = shift;
+    my $cmt = shift;
+#    $self->out(" % $cmt") if $cmt;
+    return;
+}
+
+sub rdfres {
+    my $w = rdfsafe(shift);
+    return "#$w";
+}
+
+sub rdfsafe {
+    my $w = shift;
+    $w =~ s/:/_/g;
+    $w;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/owl_to_obo_text.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/owl_to_obo_text.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/owl_to_obo_text.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,162 @@
+# $Id: owl_to_obo_text.pm,v 1.2 2004/07/08 04:08:42 cmungall Exp $
+# BioPerl module for Bio::Parser::owl_to_obo
+#
+# cjm
+#
+# POD documentation - main docs before the code
+
+=head1 NAME
+
+Bio::Parser::owl_to_obo_text
+
+=head1 SYNOPSIS
+
+Do not use this module directly.
+
+=head1 DESCRIPTION
+
+=head1 FEEDBACK
+
+=head1 AUTHORS - Chris Mungall
+
+Email: cjm at fruitfly.org
+
+=cut
+
+# Let the code begin...
+
+package GO::Handlers::owl_to_obo_text;
+use vars qw(@ISA);
+use strict;
+
+# Object preamble - inherits from Bio::Root::Object
+
+use base qw(GO::Handlers::base);
+
+our $BASE;
+
+sub e_rdf_RDF_xml_base {
+    my ($self, $base) = @_;
+    $BASE = $base->data;
+    return;
+}
+
+sub e_owl_ObjectProperty {
+    my ($self, $prop) = @_;
+    my $id = $prop->sget("owl:ObjectProperty-rdf:ID");
+    $self->printf("\n[Typedef]\nid:%s\nname:%s\n",
+		  $id, $id);
+
+
+    $prop->free;
+    return;
+}
+
+sub e_owl_AnnotationProperty {
+    my ($self, $prop) = @_;
+    
+    $prop->free;
+    return;
+}
+
+sub _xml {
+    my $str = shift;
+    my $xml = "<foo>$str</foo>";
+    my $struct;
+    eval {
+	$struct = Data::Stag->parsestr($xml);
+    };
+    if ($@) {
+	print STDERR $@;
+	print STDERR $str,"\n";
+	$struct = Data::Stag->new(foo=>[]);
+    }
+    $struct;
+}
+
+sub e_owl_Class {
+    my ($self, $owlclass) = @_;
+
+    print $owlclass->xml;
+    my $id = $owlclass->sget("owl:Class-rdf:ID");
+    my $name = $owlclass->sget("Preferred_Name") || $id;
+    my @defh = 
+      map {
+	  my $struct = _xml($_);
+	  ($struct->sget("def-definition") =>
+	   $struct->sget("def-source"));
+      } $owlclass->get("DEFINITION");
+    my %defh = @defh;
+    my @defrefs = values %defh;
+    my $defref = join(" ", map {"[$_]"} @defrefs) || "[]";
+    my $def = join(";;\\n", keys %defh);
+    
+    my @subclasses =
+      map {
+	  my @R = $_->get("owl:Restriction");
+	  if (@R) {
+	      @R;
+	  }
+	  else {
+	      my $sid = $_->sget("rdfs:subClassOf-rdf:resource");
+	      if (!$sid) {
+		  die $owlclass->sxpr;
+		  $sid = '';
+	      }
+	      _get_ID($sid);
+	  }
+      } $owlclass->get("rdfs:subClassOf");
+    my @restrictions = grep {ref($_)} @subclasses;
+    @subclasses = grep {!ref($_)} @subclasses;
+    
+    my @stypes = $owlclass->get("Semantic_Type");
+    
+    # weird xml-inside-xml
+    my @syns = $owlclass->get("FULL_SYN");
+    @syns = map {
+	my $struct = _xml($_);
+	$struct->sget("term-name");
+    } @syns;
+    push(@syns, $owlclass->get("Synonym"));
+    my @lines =
+      (id => $id,
+       name => $name,
+       (map {(is_a => $_ )} @subclasses),
+       (map {(synonym => safeqt($_)." []")} @syns),
+       $def ? (definition => safeqt($def)." $defref") : (),
+       (map {
+	   (relationship =>
+	    sprintf("%s %s",
+		    (_get_IDs($_->sfindval("owl:onProperty-rdf:resource")),
+		     _get_IDs($_->sfindval("owl:someValuesFrom-rdf:resource")),
+		    )))
+       } @restrictions),
+      );
+    $self->printf("\n[Term]\n");
+    while (my ($tag, $val) = splice(@lines, 0, 2)) {
+	$self->print("$tag: $val\n");
+    }
+    $owlclass->free;
+    return;
+}
+
+sub safeqt {
+    my $str = shift || '';
+    $str =~ s/\"/\\\"/g;
+    "\"$str\"";
+}
+sub _get_ID {
+    my @l = _get_IDs(@_);
+    return shift @l;
+}
+
+sub _get_IDs {
+    my @ids = @_;
+    map {
+	$_ = '' unless $_;
+	s/^\#//;
+	$_;
+    } @ids;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/pathlist.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/pathlist.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/pathlist.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,26 @@
+package GO::Handlers::pathlist;
+use base qw(GO::Handlers::obj);
+use strict;
+
+sub e_obo {
+    my $self = shift;
+    my $g = $self->g;
+    $self->export_graph($g);
+}
+
+sub export_graph {
+    my $self = shift;
+    my $g = shift;
+
+    $g->iterate(sub {
+		     my $n=shift->term;
+		     my $paths = $g->paths_to_top($n->acc);
+		     foreach my $path (@$paths) {
+			 $self->print($n->acc . " ");
+			 $self->print($path->to_text('acc'));
+			 $self->print("\n");
+		     }
+		 });
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/prolog.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/prolog.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/prolog.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,444 @@
+# stag-handle.pl -p GO::Parsers::GoOntParser -m <THIS> function/function.ontology
+
+package GO::Handlers::prolog;
+use base qw(GO::Handlers::abstract_prolog_writer 
+	    Data::Stag::Writer);
+use strict;
+
+sub s_obo {
+    my $self = shift;
+    $self->cmt("-- ********************************************************* --\n");
+    $self->cmt("-- Autogenerated Prolog factfiles \n");
+    $self->cmt("-- see http://www.blipkit.org for details \n");
+    $self->cmt("-- ********************************************************* --\n");
+    $self->nl;
+}
+
+sub e_header {
+    my ($self, $hdr) = @_;
+    my $idspace = $hdr->sget_idspace;
+    if ($idspace && $idspace =~ /(\S+)\s+(\S+)/) {
+        $self->factq('metadata_db:idspace'=>[$1]);
+        $self->factq('metadata_db:idspace_uri'=>[$1,$2]);
+    }
+    foreach ($hdr->get_subsetdef) {
+        my $id = $_->sget_id;
+        my $name = $_->sget_name;
+        $self->factq('metadata_db:partition'=>[$id]);
+        $self->factq('metadata_db:entity_label', [$id, $name]) if $name;
+    }
+    foreach ($hdr->get_import) {
+        $self->factq('ontol_db:import_directive'=>[$_]);
+    }
+    $self->nl;
+    return;
+}
+
+
+sub e_typedef {
+    my ($self, $typedef) = @_;
+    $self->cmt("-- Property/Slot --\n");
+    my $ont = $typedef->get_namespace;
+    my $id = $typedef->get_id || $self->throw($typedef->sxpr);
+    my $proptype = 'property';
+    my $domain = $typedef->get_domain;
+    my $range = $typedef->get_range;
+    if ($range && $range =~ /^xsd:/) {
+        $proptype = 'slot';
+    }
+    #$self->fact($proptype, [$id, $typedef->sget_name]);
+    $self->factq($proptype, [$id]);
+    my $name = $typedef->sget_name;
+    $self->factq('metadata_db:entity_label', [$id, $name]) if $name;
+    my @is_as = $typedef->get_is_a;
+    $self->factq('subclass', [$id, $_]) foreach @is_as;
+    if ($ont) {
+	$self->factq('metadata_db:entity_resource', [$id, $ont]);
+    }
+    if ($typedef->get_is_obsolete) {
+	$self->factq('metadata_db:entity_obsolete', [$id, 'property']);
+    }
+    foreach (qw(is_reflexive 
+                is_anti_symmetric 
+                is_symmetric 
+                is_transitive 
+                is_proper 
+                is_cyclic 
+                is_metadata_tag
+                is_class_level
+                all_some
+                holds_for_all_times
+                is_symmetric_on_instance_level 
+                is_transitive_on_instance_level)) {
+        if ($typedef->sget($_)) {
+            $self->factq($_,[$id]);
+        }
+    }
+    $self->export_tags($typedef);
+    foreach (qw(domain range)) {
+        my $val = $typedef->sget($_);
+        if ($val) {
+            $self->fact("property_$_",[$id,convert_to_ref($val)]);
+        }
+    }
+    foreach (qw(transitive_over inverse_of class_level_inverse_of)) {
+        my $val = $typedef->sget($_);
+        if ($val) {
+            $self->factq($_,[$id,$val]);
+        }
+    }
+    my $relchain = $typedef->sget_holds_over_chain;
+    if ($relchain) {
+        my @rels = $relchain->get_relation;
+        if (@rels) {
+            $self->factq(holds_over_chain=>[$id,\@rels]);
+        }
+    }
+    foreach (qw(holds_temporally_between holds_atemporally_between)) {
+        my $holds = $typedef->sget($_);
+        if ($holds) {
+            $self->factq($_,[$id,$holds->get_subject,$holds->get_object]);
+        }
+    }
+    $self->nl;
+    return;
+}
+
+sub e_term {
+    my ($self, $term) = @_;
+    my $id = $term->get_id || $self->throw($term->sxpr);
+    my $name_h = $self->{name_h};
+    my $name = $term->get_name;
+    #$name =~ s/_/ /g;   # ontologies lack consistency; force use of spc
+    my $ont = $term->get_namespace || 'unknown';
+
+    if ($name) {
+        # cache the name; useful for use in comment fields later
+	if (!$name_h) {
+	    $name_h = {};
+	    $self->{name_h} = $name_h;
+	}
+	$name_h->{$id} = $name;
+	#$self->cmt("-- $name --\n");
+	$self->factq('metadata_db:entity_label', [$id, $name]) if $name;
+    }
+    if ($ont) {
+	$self->factq('metadata_db:entity_resource', [$id, $ont]);
+    }
+
+    if ($term->get_is_obsolete) {
+	$self->factq('metadata_db:entity_obsolete', [$id, 'class']);
+    }
+    else {
+        # only declare this to be a class if not obsolete
+        $self->factq('class', [$id]);
+    }
+
+    my @is_as = $term->findval_is_a;
+    $self->factq('subclass', [$id, $_], $name_h->{$_}) foreach @is_as;
+    my @xp = $term->get_intersection_of;
+    if (@xp) {
+        my @genus_l = ();
+        @xp = grep {
+            # new style genus-differentia:
+            #  we say intersection_of: ID rather than
+            #         intersection_of: relation ID
+            if (!$_->get_type || $_->get_type eq 'is_a') {
+                if (@genus_l) {
+                    $self->warn(">1 genus for $id/$name");
+                }
+                push(@genus_l, $_->get_to);
+                0;
+            }
+            else {
+                1;
+            }
+        } @xp;
+        $self->factq('genus',[$id, $_])
+          foreach @genus_l;
+        $self->factq('differentium', [$id, $_->get_type, $_->sget_to])
+          foreach @xp;
+    }
+    my @rels = $term->get_relationship;
+    foreach (@rels) {
+        my @args =
+          ($id, $_->get_type, convert_to_ref($_->get_to));
+        $self->factq('restriction', 
+                     [@args], 
+                     $name_h->{$_->get_to});
+        my $link_id = $_->get('@/id');
+        if ($link_id) {
+            $self->factq('reification',
+                         [$link_id,{restriction=>[@args]}]);
+        }
+    }
+
+    # subject to change:
+    if ($term->get_all_direct_subclasses_disjoint) {
+        $self->factq('all_direct_subclasses_disjoint', [$id]);
+    }
+    $self->factq('disjoint_from', [$id, $_]) foreach $term->get_disjoint_from;
+    $self->factq('class_union_element', [$id, $_]) foreach $term->get_union_of;
+
+    foreach (qw(is_anonymous)) {
+        if ($term->sget($_)) {
+            $self->factq($_,[$id]);
+        }
+    }
+    $self->export_tags($term);
+    $self->nl;
+
+    # metadata
+
+    return;
+}
+
+sub _flatten_dbxref {
+    my $x = shift;
+    my $db = $x->sget_dbname;
+    my $acc = $x->sget_acc;
+    if ($db eq "URL" && $acc =~ /http/) {  # TODO - check for all URI forms (LSID,...)
+        return $acc;
+    }
+    else {
+        return "$db:$acc";
+    }
+}
+
+# stuff common to terms and typedefs and insts
+sub export_tags {
+    my ($self, $entity) = @_;
+    my $def = $entity->get_def;
+    my $id = $entity->sget_id;
+    if ($def) {
+        $self->factq('def',[$id, $def->sget_defstr]);
+        foreach ($def->get_dbxref) {
+            $self->factq('def_xref',[$id, _flatten_dbxref($_)]);
+        }
+    }
+    foreach ($entity->get_alt_id) {
+        $self->factq('metadata_db:entity_alternate_identifier',[$id, $_]);
+    }
+    foreach ($entity->get_consider) {
+        $self->factq('metadata_db:entity_consider',[$id, $_]);
+    }
+    foreach ($entity->get_replaced_by) {
+        $self->factq('metadata_db:entity_replaced_by',[$id, $_]);
+    }
+    foreach ($entity->get_comment) {
+        $self->factq('metadata_db:entity_comment',[$id, $_]);
+    }
+    foreach ($entity->get_subset) {
+        $self->factq('metadata_db:entity_partition',[$id, $_]);
+    }
+    foreach ($entity->get_synonym) {
+        my $syn = $_->sget_synonym_text;
+        my $scope = $_->sget('@/scope');
+        my $type = $_->sget('@/synonym_type');
+        $self->factq('metadata_db:entity_synonym',[$id,$syn]);
+        $self->factq('metadata_db:entity_synonym_scope',[$id,$syn,$scope]) if $scope;
+        $self->factq('metadata_db:entity_synonym_type',[$id,$syn,$type]) if $type;
+        $self->factq('metadata_db:entity_synonym_xref',[$id,$syn,_flatten_dbxref($_)]) foreach $_->get_dbxref;
+    }
+    foreach ($entity->get_xref_analog) {
+        my $xref = _flatten_dbxref($_);
+        #$self->factq('class_xref',[$id, sprintf("%s:%s",$_->sget_dbname,$_->sget_acc)]);
+        $self->factq('metadata_db:entity_xref',[$id, $xref]);
+        if ($_->get_name) {
+            $self->factq('metadata_db:entity_label',[$xref, $_->get_name]);
+        }
+    }
+    #foreach ($entity->get_subset) {
+    #    $self->fact('belongs_subset',$_->findval_scope || '',$_->sget_synonym_text);
+    #}
+    foreach (qw(lexical_category)) {
+        my $val = $entity->sget($_);
+        if ($val) {
+            $self->factq($_,[$id,$val]);
+        }
+    }
+    # property tag-val pairs
+    foreach my $pv ($entity->get_property_value) {
+        my $dt = $pv->sget_datatype;
+        my @args = ($id,$pv->sget_type);
+        my $link_id = $pv->get('@/id');
+        if ($dt) {
+            $self->factq('inst_sv',[@args,$pv->sget_value,$dt]);
+        }
+        else {
+            $self->factq('inst_rel',[@args,$pv->sget_to]);
+            if ($link_id) {
+                $self->factq('reification',
+                             [$link_id,{inst_rel=>[@args,$pv->sget_to]}]);
+            }
+        }
+
+    }
+    return;
+}
+
+sub nextid_by_prod {
+    my $self = shift;
+    $self->{_nextid_by_prod} = shift if @_;
+    $self->{_nextid_by_prod} = {} 
+      unless $self->{_nextid_by_prod};
+
+    return $self->{_nextid_by_prod};
+}
+
+sub e_prod {
+    my ($self, $gp) = @_;   
+    my $proddb = $self->up(-1)->sget_proddb;
+    my $prodacc = $gp->sget_prodacc;
+
+    # all gene products go in seqfeature_db module
+    my $id = "$proddb:$prodacc";
+    $self->factq('seqfeature_db:feature',[$id]);
+    $self->factq('seqfeature_db:feature_type',
+                [$id,$gp->sget_prodtype]);
+    $self->factq('metadata_db:entity_label',
+                [$id,$gp->sget_prodsymbol]);
+    $self->factq('metadata_db:entity_source',
+                [$id,$gp->sget_proddb]);
+    # duplicate?
+    $self->factq('seqfeature_db:feature_organism',
+                [$id,'NCBITaxon:'.$gp->sget("prodtaxa")]);
+    $self->factq('taxon_db:entity_taxon',
+                [$id,'NCBITaxon:'.$gp->sget("prodtaxa")]);
+    $self->factq('seqfeature_db:featureprop',
+                [$id,'description',$gp->sget_prodname]);
+    $self->factq('metadata_db:entity_synonym',
+                [$id,$_])
+      foreach $gp->get_prodsyn;
+
+    # associations between gp and term'
+    my @assocs = $gp->get_assoc;
+    my $idh = $self->nextid_by_prod;
+    foreach my $assoc (@assocs) {
+        my $n = $idh->{$id}++;
+        my $term_acc = $assoc->sget_termacc;
+        my $is_not = $assoc->sget_is_not ? 1 : 0;
+        my $aid = "$proddb:association-$id-$term_acc-$is_not";
+        $self->fact('curation',[$aid]);
+        my $pred = 'curation_statement';
+        if ($is_not) {
+            $pred = 'negative_'.$pred;
+        }
+        $self->fact($pred,
+                    [$aid,$id,'has_role',$term_acc]);
+        my @evs = $assoc->get_evidence;
+        my $ne=0;
+        foreach my $ev (@evs) {
+            my $eid = "$aid-$ne";
+            $ne++;
+            # eg PMID
+            $self->factq('metadata_db:entity_source',
+                        [$aid,$ev->sget_ref]);
+            $self->factq('evidence',[$eid]);
+            $self->factq('curation_evidence',
+                         [$aid,$eid]);
+            $self->factq('evidence_type',
+                        [$eid,$ev->sget_evcode]);
+            $self->factq('evidence_with',
+                         [$eid,$_])
+              foreach $ev->get_with;
+        }
+        # note: we treat the source DB as the publisher (the source is the provenance)
+        $self->factq('metadata_db:entity_publisher',
+                     [$aid,$_])
+          foreach $assoc->get_source_db;
+        foreach ($assoc->get_assocdate) {
+            if (length($_) eq 8) {
+                $_ = sprintf("%s-%s-%s",
+                             substr($_,0,4),
+                             substr($_,4,2),
+                             substr($_,6,2));
+            }
+            $self->factq('metadata_db:entity_created',
+                         [$aid,$_])
+        }
+        my @pvs = $assoc->get_property_value;
+        foreach my $pv (@pvs) {
+            $self->factq('curation_qualifier',
+                        [$aid,$pv->sget_type,$pv->sget_to]);
+        }
+    }
+}
+
+sub e_annotation {
+    my ($self, $annotation) = @_;   
+
+    my $idh = $self->nextid_by_prod;
+
+    my $proddb = $annotation->sget_namespace || 'unknown';
+    my $subj = $annotation->sget_subject;
+    my $rel = $annotation->sget_relation;
+    my $obj = $annotation->sget_object;
+    my $is_not = $annotation->sget_is_not ? 1 : 0;
+    my $aid = "$proddb:$subj-$obj-$is_not";
+    $self->fact('curation',[$aid]);
+    my $pred = 'curation_statement';
+    if ($is_not) {
+        $pred = 'negative_'.$pred;
+    }
+    $self->fact($pred,
+                    [$aid,$subj,$rel,$obj]);
+#        my @evs = $assoc->get_evidence;
+#        my $ne=0;
+#        foreach my $ev (@evs) {
+#            my $eid = "$aid-$ne";
+#            $ne++;
+#            # eg PMID
+#            $self->factq('metadata_db:entity_source',
+#                        [$aid,$ev->sget_ref]);
+#            $self->factq('evidence',[$eid]);
+#            $self->factq('curation_evidence',
+#                         [$aid,$eid]);
+#            $self->factq('evidence_type',
+#                        [$eid,$ev->sget_evcode]);
+#            $self->factq('evidence_with',
+#                         [$eid,$_])
+#              foreach $ev->get_with;
+#        }
+        # note: we treat the source DB as the publisher (the source is the provenance)
+    $self->factq('metadata_db:entity_publisher',
+                 [$aid,$_])
+      foreach $annotation->get_provenance;
+    $self->factq('metadata_db:entity_creator',
+                 [$aid,$_])
+      foreach $annotation->get_creator;
+    $self->factq('metadata_db:entity_resource',
+                 [$aid,$_])
+      foreach $annotation->get_namespace;
+    my @pvs = $annotation->get_property_value;
+    foreach my $pv (@pvs) {
+        $self->factq('curation_qualifier',
+                     [$aid,$pv->sget_type,$pv->sget_to]);
+    }
+}
+
+
+sub e_instance {
+    my ($self, $inst) = @_; 
+    my $id = $inst->get_id;
+    my $class = $inst->get_instance_of;
+    $self->factq('inst', [$id]);
+    $self->factq('inst_of',[$id,$class]);
+    my $name = $inst->sget_name;
+    $self->factq('metadata_db:entity_label', [$id, $name]) if $name;
+    $self->export_tags($inst);
+    return;
+}
+
+# todo
+sub convert_to_ref {
+    my $to = shift;
+    if (ref($to)) { # may be enum
+        return '';
+    }
+    else {
+        return $to;
+    }
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/rdf.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/rdf.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/rdf.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,29 @@
+# makes objects from parser events
+
+package GO::Handlers::rdf;
+use base qw(GO::Handlers::obj);
+use FileHandle;
+use GO::IO::XML;
+use strict;
+
+sub _valid_params { qw(w fh strictorder) }
+#sub init {
+#    my $self = shift;
+#    $self->SUPER::init(@_);
+#    my $fh = FileHandle->new;
+#    my $fh = \*STDOUT;
+#    $self->fh($fh);
+#    return;
+#}
+
+sub e_obo {
+    my $self = shift;
+    my $g = $self->g;
+    my $xml_out = GO::IO::XML->new(-output=>$self->safe_fh);
+    $xml_out->start_document();
+    $xml_out->draw_node_graph(-graph=>$g);
+    $xml_out->end_document();
+    return;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/summary.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/summary.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/summary.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,95 @@
+# $Id: summary.pm,v 1.3 2004/11/24 02:28:00 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::summary     - 
+
+=head1 SYNOPSIS
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+package GO::Handlers::summary;
+use base qw(GO::Handlers::base);
+
+sub init {
+    my $self = shift;
+    $self->{i} = 0;
+    $self->{counts} = {};
+}
+
+sub count {
+    my $self = shift;
+    my $type = shift;
+    if (!$self->{counts}->{$type}) {
+	$self->{counts}->{$type} = 0;
+    }
+    $self->{counts}->{$type}++;
+}
+
+sub start_event {
+    my $self = shift;
+    my $ev = shift;
+    return;
+}
+
+sub end_event {
+    my $self = shift;
+    my $ev = shift;
+    $self->count($ev);
+    if ($ev eq "assocs") {
+	print "TOTAL ASSOCS  : $self->{counts}->{assoc}\n";
+	print "TOTAL PRODUCTS: $self->{counts}->{prod}\n";
+	print "TOTAL DBSETS  : $self->{counts}->{dbset}\n";
+    }
+    if ($ev eq "obo") {
+	print "TOTAL TERMS   : $self->{counts}->{term}\n";
+	print "TOTAL DEFS    : $self->{counts}->{def}\n" if $self->{counts}->{def};
+	print "TOTAL SYNS    : $self->{counts}->{synonym}\n";
+	print "TOTAL RELS    : $self->{counts}->{relationship}\n" if $self->{counts}->{relationship};
+	print "TOTAL XREFS   : $self->{counts}->{xref_analog}\n";
+    }
+    if ($ev eq "defs") {
+	print "TOTAL DEFS    : $self->{counts}->{def}\n";
+    }
+    if ($ev eq "dbxrefs") {
+	print "TOTAL TERMXREFS : $self->{counts}->{termdbxref}\n";
+    }
+    #return $self->SUPER::end_event($ev);
+    return;
+}
+
+#sub e_term {
+#    my $self = shift;
+#    my $term = shift;
+#    my $ns = shift;
+#    return;
+#}
+
+sub event {
+    my $self = shift;
+    my $ev = shift;
+    my @args = @_;
+    my $arg = $args[0];
+    if (!ref($arg)) {
+    }
+    else {
+        $self->start_event($ev);
+        $self->evbody(@args);
+        $self->end_event($ev);
+    }
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/sxpr.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/sxpr.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/sxpr.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,5 @@
+# stag-handle.pl -p GO::Parsers::GoOntParser -m <THIS> function/function.ontology
+
+package GO::Handlers::sxpr;
+use base qw(Data::Stag::SxprWriter Exporter);
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/tbl.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/tbl.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/tbl.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,72 @@
+# $Id: tbl.pm,v 1.3 2004/11/24 02:28:00 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::tbl     - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::tbl
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::tbl;
+use base qw(GO::Handlers::base);
+use strict;
+
+
+sub e_term {
+    my $self = shift;
+    my $t = shift;
+    my $def = $t->get_def;
+    my $defstr = '';
+    if ($def) {
+	$defstr = $def->get_defstr;
+    }
+    my @syns = $t->get_synonym;
+    my @synstrs = map {$_->get_synonym_text} @syns;
+    my @cols =
+      ($t->get_id,
+       $t->get_name,
+       $defstr,
+       join('; ', @synstrs));
+    $self->print(join("\t", @cols));
+    $self->print("\n");
+    return;
+}
+
+sub e_prod {
+    my $self = shift;
+    my $p = shift;
+    my $proddb = $self->up(1)->sget_proddb;
+    my @cols =
+      ($proddb,
+       $p->get_prodacc,
+       $p->get_prodsymbol,
+       $p->get_prodtype,
+       $p->get_prodtaxa,
+       join('; ', map { ($_->get_is_not ? "NOT:" : "").$_->get_termacc  } $p->get_assoc),
+      );
+    $self->print(join("\t", @cols));
+    $self->print("\n");
+    return;
+
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/text_html.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/text_html.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/text_html.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,35 @@
+# $Id: text_html.pm,v 1.5 2004/07/02 17:46:48 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::text_html     - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::text_html
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::text_html;
+use base qw(GO::Handlers::xsl_base);
+use strict;
+
+$ENV{XSLT_FILE} = "$ENV{GO_ROOT}/xml/xsl/text_html.xsl";
+
+1;
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/xml.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/xml.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/xml.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,5 @@
+# stag-handle.pl -p GO::Parsers::GoOntParser -m <THIS> function/function.ontology
+
+package GO::Handlers::xml;
+use base qw(Data::Stag::XMLWriter Exporter);
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/xsl_base.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/xsl_base.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Handlers/xsl_base.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,53 @@
+# $Id: xsl_base.pm,v 1.1 2004/03/04 23:18:09 bradmars Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Handlers::text_html     - 
+
+=head1 SYNOPSIS
+
+  use GO::Handlers::text_html
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 PUBLIC METHODS - 
+
+=cut
+
+# makes objects from parser events
+
+package GO::Handlers::xsl_base;
+use base qw(GO::Handlers::base);
+use XML::LibXML;
+use XML::LibXSLT;
+
+use strict;
+
+
+sub e_obo {
+    my $self = shift;
+    my $obo_stag = shift;
+    
+    my $parser = XML::LibXML->new();
+    my $source = $parser->parse_string($obo_stag->xml);
+    
+    my $xslt = XML::LibXSLT->new();
+    my $file_name = $ENV{'XSLT_FILE'};
+    my $styledoc = $parser->parse_file($file_name);
+    my $stylesheet = $xslt->parse_stylesheet($styledoc);
+
+    my $results = $stylesheet->transform($source);
+    print $stylesheet->output_string($results);
+
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Analysis.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Analysis.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Analysis.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,125 @@
+# $Id: Analysis.pm,v 1.2 2004/11/24 02:28:00 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::IO::Analysis;
+
+=head1 NAME
+
+  GO::IO::Analysis     - preliminary analysis object
+
+=head1 SYNOPSIS
+
+
+
+=cut
+
+
+
+=head1 DESCRIPTION
+
+top level module for doing analyses eg clustalw on the fly
+
+=head1 CREDITS
+
+
+=head1 PUBLIC METHODS
+
+
+=cut
+
+
+use strict;
+use base qw(GO::Model::Root);
+use GO::Utils qw(rearrange);
+#use GO::IO::Blast;
+
+sub _valid_params { qw() };
+
+
+sub clustalw {
+    my $self = shift;
+    my ($products, $seqs, $seqf) = rearrange([qw(products seqs file)], @_);
+    
+    my $leave = $seqf ? 1 : 0;
+
+    if (!$seqs) {
+        $seqs = [];
+	my %h = ();
+        foreach my $p (@$products) {
+            push(@$seqs, 
+		 grep {
+		     !$h{$_->display_id} && ($h{$_->display_id} = 1)
+		 } @{$p->seq_list});
+        }
+    }
+
+    # TODO : use displatcher class to allow 
+    # other ways of calling programs
+
+    my $seqf = $seqf || "/tmp/$$.clustalin.fa";
+    my $outf = $seqf;
+    $outf =~ s/fa$/aln/;
+    open(F, ">$seqf") || die;
+    map {print F $_->to_fasta} @$seqs;
+    close(F);
+    
+    my $cmd = "clustalw -infile=$seqf -outfile=$outf";
+    print "cmd=$cmd\n";
+    print `$cmd`;
+
+    open(F, "$outf") || die;
+    my $out = join("", <F>);
+    close(F);
+
+    unless ($leave) {
+        unlink $seqf;
+        unlink $outf;
+    }
+    
+    return $out;
+}
+
+#sub blastp {
+#    my $self = shift;
+#    my ($fn) = rearrange([qw(file)], @_);
+    
+
+#    # TODO : use displatcher class to allow 
+#    # other ways of calling programs
+
+
+#    #HARDCODE ALERT!!!!!!!!!!!!!!!!!!!!
+#    # this is a still a VERY preliminary module
+#    my $db = "/www/whitefly_80/WWW/annot/go/fasta/go_pep.fa";
+#    my $outf = "/tmp/$$.blastout.fa";
+##   my $cmd = "blastp $db $fn -filter SEG+XNU > $outf";
+#    my $cmd = "blastp $db $fn > $outf";
+#    print "cmd=$cmd\n";
+#    print `$cmd`;
+
+#    my $blast = 
+#      GO::IO::Blast->new({apph=>$self->apph,
+#                          file=>"$outf"});
+#    return $blast;
+#}
+
+
+=head1 FEEDBACK
+
+Email cjm at fruitfly.berkeley.edu
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself
+
+=cut
+
+
+1;
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Blast.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Blast.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Blast.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,340 @@
+# $Id: Blast.pm,v 1.2 2004/11/24 02:28:00 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::IO::Blast;
+
+=head1 NAME
+
+  GO::IO::Blast     - Gene Ontology Blast Reports DEPRECATED
+
+=head1 SYNOPSIS
+
+
+
+=cut
+
+
+
+=head1 DESCRIPTION
+
+parses a blast report (must be a a blast that was performed on a seqdb
+that can with headers that can be mapped to go terms via the go
+database)
+
+takes the blast hits, and finds the corresponding GO terms (currently
+it requires the fasta to have "genename:" in header but we should make
+it configurable)
+
+using the GO terms, a GO::Model::Graph is built, with the blast hits
+attached according to product<->term links.
+
+Any blast hit H that corresponds to a term T implicitly corresponds to
+all the terms above T in the DAG; eg a hit to a G-protein coupled
+receptor is implicitly a hit to a transmembrane receptor.
+
+At every node, all the scores (including implicit scores from hits
+further down) are combined. Currently we
+are playing with this as the scording scheme: 
+
+log2( 2 ** score1 + 2 ** score2 +.... 2** scoreN)
+
+Hits are only counted once at each node.
+
+  TODO - use bioperl to parse full report if required 
+           (currently parses summary)
+
+  TODO - configurable ways to go from fasta header to GO terms
+
+  TODO - different scoring schemes
+
+  TODO - result object
+
+=head1 PUBLIC METHODS - Blast
+
+
+=cut
+
+
+use strict;
+use Carp;
+use base qw(GO::Model::Root);
+use GO::Utils qw(rearrange);
+sub _valid_params { qw(apph output file raw) };
+
+sub load_file {
+    my $self = shift;
+    my $file = shift || $self->file;
+    my $fh = FileHandle->new($file);
+    my $raw = join("", <$fh>);
+    $self->raw($raw);
+    $raw;
+}
+
+sub showgraph {
+    my $self = shift;
+    $self->getgraph(@_);
+    print $self->output;
+}
+
+
+sub getTermListByGPs {
+    my $self = shift;
+    my ($raw, $apph) = @_;
+
+    if (!$raw) {
+        $raw = $self->load_file;
+    }
+
+    my @lines = split(/\n/, $raw);
+    my $in_summary = 0;
+
+    my @symbols = ();
+    my $symbol_h = {};
+    foreach (@lines) {
+        chomp;
+        if (!$_) {
+            next;
+        }
+        if (/^\>/) {
+            $in_summary = 0;
+        }
+        if (/^\>/) {
+            $in_summary = 0;
+        }
+        if (/Sequences producing/) {
+            $in_summary = 1;
+            next;
+        }
+        else {
+            if ($in_summary) {
+                my @w = split;
+                my ($n, $p, $score, @rest) = reverse @w;
+#                if ($p >= 0.1) {
+#                    next;
+#                }
+                my $hit = join(" ", @rest);
+                if ($hit =~ /genename:(\S+)/) {
+                    my $s = $1;
+                    push(@symbols, $s);
+                    $symbol_h->{$s} = {score=>$score};
+                }
+            }
+        }
+    }
+
+#    my $terms = 
+#      $apph->get_terms({products=>[@symbols], type=>"function"});
+    my $terms = 
+      $apph->get_terms({products=>[@symbols]});
+    #my $graph = $apph->get_graph_by_terms($terms, 0);
+
+
+    return $terms;
+}
+
+
+sub getgraph {
+    my $self = shift;
+    my ($raw, $apph) = @_;
+
+#    print '<pre>';
+#    print $raw;
+#    print '</pre>';
+    if (!$raw) {
+        $raw = $self->load_file;
+    }
+
+    my @lines = split(/\n/, $raw);
+    my $in_summary = 0;
+
+    my @symbols = ();
+    my $symbol_h = {};
+    foreach (@lines) {
+        chomp;
+        if (!$_) {
+            next;
+        }
+        if (/^\>/) {
+            $in_summary = 0;
+        }
+        if (/^\>/) {
+            $in_summary = 0;
+        }
+        if (/Sequences producing/) {
+            $in_summary = 1;
+            next;
+        }
+        else {
+            if ($in_summary) {
+                my @w = split;
+                my ($n, $p, $score, @rest) = reverse @w;
+#                if ($p >= 0.1) {
+#                    next;
+#                }
+                my $hit = join(" ", @rest);
+                if ($hit =~ /symbol:(\S+)/) {
+#                if ($hit =~ /genename:(\S+)/) {
+                    my $s = $1;
+                    push(@symbols, $s);
+#                    if (!$symbol_h->{$s}) {
+#                        $symbol_h->{$s} = [];
+#                    }
+#                    push(@{$symbol_h->{$s}}, {score=>$score});
+                    $symbol_h->{$s} = {score=>$score};
+                }
+            }
+        }
+    }
+#    printf "<h2>SYMBOLS meeting threshold:%s\n</h2>", join(" ", @symbols);
+#    my $apph = $self->apph;
+
+#    my $terms = 
+#      $apph->get_terms({products=>[@symbols], type=>"function"});
+    $apph->filters({});
+    my $terms = 
+      $apph->get_terms({products=>[@symbols]});
+#    print $terms;
+#    foreach my $term (@$terms) {
+#        $self->out(" ".$term->public_acc);
+#    }
+    my $graph = $apph->get_graph_by_terms($terms, 0);
+
+    return $graph, \@symbols;
+
+#    return $symbol_h;;
+
+###################################################
+
+    # ----------------
+
+    # associate every product in graph with
+    # all the nodes at or above the current position,
+    # counting each product only once at each node
+
+    # look up a hash of products (explicit and implict) by term
+    my @term_lookup = ();
+
+    # recurse down graph to get implicit products
+    # from node beneath
+    sub myrecurse {
+        my $terms = shift;
+
+        foreach my $term (@$terms) {
+
+            # get the list of nodes below this one
+            my $children = $graph->get_child_terms($term);
+
+            if (@$children) {
+                # not a leaf node
+
+                # recurse further
+                myrecurse($children);
+                foreach my $child (@$children) {
+                    my $ph = $term_lookup[$child->acc];
+                    foreach (keys %{$ph || {}}) {
+                        $term_lookup[$term->acc]->{$_} = $ph->{$_};
+                    }
+                }
+            }
+
+            if (!$term_lookup[$term->acc]) {
+                $term_lookup[$term->acc] = {};
+            }
+            # count all the products at this point in the DAG
+            foreach (@{$term->selected_association_list || []}) {
+                $term_lookup[$term->acc]->{$_->gene_product->id} = 
+                  $_->gene_product;
+            }
+        }
+    }
+    myrecurse($graph->get_top_nodes);
+
+    
+    sub shownode {
+        my $ni = shift;
+        my $depth = $ni->depth;
+        my $term = $ni->term;
+        my $reltype = $ni->parent_rel ? $ni->parent_rel->type : "";
+        my $tab = $graph->is_focus_node($term) ? "->->" : "    ";
+        my $ph = $term_lookup[$term->acc];
+        # all the products by symbol at this node or below
+        my @allsymbols = map {$_->symbol} values %$ph;
+#        my $logsum = 0;
+#        map { $logsum += 2 ** $symbol_h->{$_}->{score} } @allsymbols;
+#        my $score = log($logsum)/log(2);
+
+        my $logsum = 0;
+	my $score = 0;
+	if (@allsymbols) {
+	    map { $logsum += 2 ** $symbol_h->{$_}->{score} } @allsymbols;
+	    $score = log($logsum)/log(2);
+	}
+	# fudgefactor: (assumes 90% of prod2term assoc being correct)
+	# prod2terms aren't independent but we treat them like
+	# they are
+	$score *= 1 - (0.1 ** scalar(@allsymbols));
+
+
+#	my $score = 0;
+#	map { $score += $symbol_h->{$_}->{score} } @allsymbols;
+        my $out =
+          sprintf 
+            "%s %2s Term = %s (%s); SCORE=%.2f\n",
+            "  . " x $depth,
+            $reltype eq "isa" ? "%" : "<",
+            $term->name,
+            $term->public_acc,
+            $score,
+            ;
+        foreach (@{$term->selected_association_list || []}) {
+            my $sym = $_->gene_product->symbol;
+            $out.= $tab x $depth . "    :: " . $sym;
+            $out.= " ".$_->gene_product->xref->as_str;
+            $out.= " ".$_->evidence_as_str(1)." ";
+            $out.= " ".$symbol_h->{$sym}->{score}.";";
+            $out.= "\n";
+            
+        }
+        $self->out("$out");
+    }
+
+#    my $it = $graph->create_iterator;
+    # returns a GO::Model::GraphIterator object
+
+    #$graph->iterate(\&shownode);
+    return $graph;
+
+    
+}
+
+sub out {
+    my $self = shift;
+    my $str = shift;
+    $self->output($self->output().$str);
+}
+
+
+sub parse {
+
+}
+
+
+=head1 FEEDBACK
+
+Email cjm at fruitfly.berkeley.edu
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself
+
+=cut
+
+
+1;
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Dotty.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Dotty.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/Dotty.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,129 @@
+# $Id: Dotty.pm,v 1.1 2005/02/11 05:44:56 cmungall Exp $
+
+package GO::IO::Dotty;
+
+=head1 NAME
+
+  GO::IO::Dotty;
+
+=head1 SYNOPSIS
+
+  Utility functions for producing Dotty diagrams from GO graphs
+
+  Contributed to the go-database list by Philip Lord
+
+=head1 REQUIREMENTS
+
+http://www.research.att.com/sw/tools/graphviz/
+http://search.cpan.org/search?dist=GraphViz
+
+=cut
+
+use strict;
+use Exporter;
+use GraphViz;
+my @ISA=qw{Exporter};
+
+my %labellednodes;
+
+sub graphviz_to_dotty{
+  my $graphviz = shift;
+
+  open( DOTTY, "|dotty -" );
+  print DOTTY $graphviz->as_text;
+  close( DOTTY );
+}
+
+sub go_graph_to_graphviz {
+  my $graph = shift;
+  my %gopts = %{shift || {}};
+  my %opts = %{shift || {}};
+  my $it = $graph->create_iterator;
+  my %relationships;
+  my %labellednodes;
+
+  my $graphviz = GraphViz->new(%gopts);
+
+  while (my $ni = $it->next_node_instance ){
+      my $term = $ni->term;
+      my $rel = $ni->parent_rel;
+      my $parents = $graph->get_parent_terms($term->acc);
+      _graphviz_label( $term, $graph,
+                       \%labellednodes, $graphviz, \%opts );
+      
+      foreach my $p (@$parents){
+          _graphviz_label( $p, $graph->is_focus_node( $p ),
+                           \%labellednodes, $graphviz, \%opts );
+          
+          my $identifier = $p->acc . " " . $term->acc;
+          unless( $relationships{ $identifier } ){
+              ## for some reason graphviz assumes that a number is only a
+              ## label, and not a node name which is irritating.
+              my $node = "acc" . $term->acc;
+              my $pnode = "acc" . $p->acc;
+              my $apph = $term->apph;
+              $graphviz->add_edge($node=>$pnode, label=>$rel->type);
+              $relationships{ $identifier } = 1;
+          }
+      }
+      
+    if ($opts{selected_assocs}) {
+        my @prs = map {$_->gene_product } @{$term->selected_association_list || []};
+        my $node = "acc" . $term->acc;
+        foreach my $pr (@prs) {
+            my $nid = $pr->xref->as_str;
+            unless($labellednodes{$nid}) {
+                $graphviz->add_node($nid, label=>$pr->symbol,
+                                    color=>'red');
+                  $labellednodes{$nid} = 1;
+            }
+            $graphviz->add_edge( $nid=>$node, label=>"annotated_to");
+        }
+    }
+  }
+  return $graphviz;
+}
+
+sub _graphviz_label{
+  my $term = shift;
+  my $graph = shift;
+  my $labellednodes = shift;
+  my $graphviz = shift;
+  my %opts = %{ shift || {}};
+  my $acc = $term->acc;
+  my $node = "acc" . $term->acc;
+
+  unless( $labellednodes->{$acc} ){
+      if ($opts{sub}) {
+          $graphviz->add_node($opts{sub}->($node, $term));
+      }
+      else {
+          $graphviz->add_node
+            ( $node, 
+              label=>$term->name . " " . $term->acc ,
+              URL=>%opts->{'base_url'}.$term->acc,
+              fontname=>'Courier'
+            );
+      }
+      $labellednodes->{$acc} = 1;
+  }
+}
+
+sub label_nodes_with_colour{
+  my $graphviz = shift;
+  my $terms = shift;
+  my $colour = shift;
+
+  foreach my $term (@$terms){
+     my $node = "acc" . $term->public_acc;
+    $graphviz->add_node
+      ( $node,
+        style=>"filled", color=>$colour ,
+      fontname=>'Courier');
+   }
+}
+
+# support US spelling
+*label_nodes_with_color = \&label_nodes_with_colour;
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/OBDXML.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/OBDXML.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/OBDXML.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,440 @@
+# $Id: OBDXML.pm,v 1.3 2006/11/28 01:08:46 sjcarbon Exp $
+#
+# This GO module is maintained by Seth Carbon <sjcarbon at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself.
+
+##
+## TODO: Should the links to classes from instances be put in?
+## TODO: Should I add the links to 'obd:with' from the ev instances?
+## WARNING: Written using version XML::Writer 6.0.1. Earlier version
+##          may not work.
+##
+
+package GO::IO::OBDXML;
+
+=head1 NAME
+
+  GO::IO::OBDXML;
+
+=head1 SYNOPSIS
+
+    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::OBDXML->new(-output=>$out);
+    $xml_out->start_document();
+    $xml_out->draw_term($term);
+    $xml_out->end_document();
+
+OR:
+
+    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::OBDXML(-output=>$out);
+    $xml_out->start_document();
+    $xml_out->draw_graph($term, 3677);
+    $xml_out->end_document();
+
+=head1 DESCRIPTION
+
+Utility class to dump GO terms as OBD XML.  Currently you just call
+start_ducument, then draw_term for each term, then end_document.
+
+=cut
+
+use strict;
+use GO::Utils qw(rearrange);
+use XML::Writer;
+
+
+####################
+
+=head2 new
+
+    Usage   - my $xml_out = GO::IO::OBDXML->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::OBDXML(-output=>$out);
+
+=cut
+
+sub new {
+  my $class = shift;
+  my $self = {};
+  bless $self, $class;
+  my ($out) =
+    rearrange([qw(output)], @_);
+
+  $out = new FileHandle(">-") unless $out;
+  my $gen = new XML::Writer(OUTPUT=>$out);
+  $self->{writer} = $gen;
+
+  $gen->setDataMode(1);
+  $gen->setDataIndent(2);
+
+  return $self;
+}
+
+
+####################
+
+=head2 cgi_header
+
+    Usage   - $xml_out->cgi_header;
+    Returns - None
+    Args    - None
+
+cgi_header prints the "Content-type: text/xml" statement.
+If creating a CGI script, you should call this before start_document.
+
+=cut
+
+sub cgi_header {
+  my $self = shift;
+  print "Content-type: text/xml\n\n";
+}
+
+
+####################
+
+=head2 start_document
+
+    Usage   - $xml_out->start_document;
+    Returns - None
+    Args    - None
+
+start_document 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.
+
+=cut
+
+sub start_document {
+  my $self = shift;
+
+  $self->{writer}->xmlDecl('utf-8');
+  $self->{writer}->startTag('graphset',
+			    'xmlns'=>
+			    'http://www.bioontology.org/obd/schema/obd-generic');
+}
+
+
+####################
+
+=head2 start_graph
+
+    Usage   - $xml_out->start_graph;
+    Returns - None
+    Args    - None
+
+start_graph opens a new graph segment.
+
+=cut
+
+sub start_graph {
+  my $self = shift;
+  $self->{writer}->startTag('graph');
+}
+
+
+####################
+
+=head2 end_document
+
+    Usage   - $xml_out->end_document;
+
+Call this when done.
+
+=cut
+
+sub end_document{
+  my $self = shift;
+  $self->{writer}->endTag('graphset');
+}
+
+
+####################
+
+=head2 end_graph
+
+    Usage   - $xml_out->end_graph;
+
+Call this when done a graph segment.
+
+=cut
+
+sub end_graph {
+  my $self = shift;
+  $self->{writer}->endTag('graph');
+}
+
+
+####################
+
+=head2 draw_node_graph
+
+    Usage   - $xml_out->draw_node_graph(-graph=>$graph);
+    Returns - None
+    Args    -graph=>$graph,
+            -show_associations=>'yes' or 'no', # optional, default 'yes'.
+            -show_terms=>'yes' or 'no',        # optional, default 'yes'.
+            -show_xrefs=>'yes' or 'no',        # optional, default 'yes'.
+            -show_evidence=>'yes' or 'no',     # optional, default 'yes'.
+
+=cut
+
+##
+sub draw_graph {
+  my $self = shift;
+  my ($graph, $show_associations, $show_evidence, $show_terms, $show_xrefs) =
+    rearrange([qw(graph show_associations show_evidence
+		  show_terms show_xrefs)], @_);
+
+  foreach my $term (@{$graph->get_all_nodes}) {
+    $self->draw_term(-term=>$term,
+		     -graph=>$graph,
+		     -show_associations=>$show_associations,
+		     -show_terms=>$show_terms,
+		     -show_xrefs=>$show_xrefs,
+		     -show_evidence=>$show_evidence
+		    );
+  }
+}
+
+
+####################
+
+=head2 draw_term
+
+    Usage   - $xml_out->draw_term();
+    Returns - None
+    Args    -term=>$term,
+            -graph=>$graph,                    # optional
+            -show_associations=>'yes' or 'no', # optional, default 'yes'.
+            -show_terms=>'yes' or 'no',        # optional, default 'yes'.
+            -show_xrefs=>'yes' or 'no',        # optional, default 'yes'.
+            -show_evidence=>'yes' or 'no',     # optional, default 'yes'.
+
+=cut
+
+sub draw_term {
+  my $self = shift;
+  my ($term, $graph,
+      $show_associations, $show_terms,
+      $show_xrefs, $show_evidence) =
+	rearrange([qw(term graph
+		      show_associations show_terms
+		      show_xrefs show_evidence)], @_);
+
+  $show_terms = $show_terms || 'yes';
+  $show_xrefs = $show_xrefs || 'yes';
+  $show_associations = $show_associations || 'yes';
+  $show_evidence = $show_evidence || 'yes';
+
+  ## We are going to show the terms in the graph.
+  if ($show_terms eq 'yes') {
+
+    ## Draw term node. Way of drawing depends on $show_ xrefs.
+    if(	$show_xrefs eq 'yes'){
+      $self->__draw_node(-id=>$term->acc, -metadata=>'class',
+			 -label=>$term->name, -source=>$term->type,
+			 -description=>$term->definition,
+			 -aliases=>$term->synonym_list,
+			 -xrefs=>$term->dbxref_list);
+    }else{
+      $self->__draw_node(-id=>$term->acc, -metadata=>'class',
+			 -label=>$term->name, -source=>$term->type,
+			 -description=>$term->definition,
+			 -aliases=>$term->synonym_list);
+    }
+
+    ## Write out the links from the term if a graph was given.
+    if( defined $graph ){
+      my $rel_list = $graph->get_relationships($term->acc);
+      foreach my $rel ( @$rel_list ){
+	$self->__draw_link(-subject=>$rel->subject_acc,
+			   -object=>$rel->object_acc,
+			   -predicate=>$rel->type);
+      }
+    }
+  }
+
+  ## Write out associations if not nixed.
+  if( $show_associations eq 'yes') {
+    my $assoc_list = $term->association_list;
+    foreach my $assoc (@$assoc_list) {
+
+      ## Get gp and draw gp node.
+      my $gp = $assoc->gene_product;
+      $self->__draw_node(-id=>$gp->acc,
+			 -metadata=>'class',
+			 -label=>$gp->symbol,
+			 -source=>$gp->type,
+			 -description=>$gp->full_name,
+			 -aliases=>$gp->synonym_list);
+
+      ## Link the gp to the term.
+      $self->__draw_link(-subject=>$gp->acc,
+			 -object=>$term->acc,
+			 -predicate=>'obd:has_role',
+			 -id=>$gp->acc . '_obd:has_role_' . $term->acc);
+
+      ## Make an ID for the node.
+      my $ann_inst_id = 'AIID:' . $assoc->id;
+
+      ## Create an annotation instance node.
+      $self->__draw_node(-id=>$ann_inst_id,
+			 -metadata=>'instance');
+
+      ## Link annotation node to gp/term link.
+      $self->__draw_link(-subject=>$ann_inst_id,
+			 -object=>$gp->acc . '_obd:has_role_' . $term->acc,
+			 -predicate=>'obd:posits',
+			 -id=>$ann_inst_id . '_obd:posits_assoc');
+
+      ## Now we'll deal with all the evidence...
+      if( $show_evidence eq 'yes') {
+	my $ev_list = $assoc->evidence_list;
+	foreach my $ev (@$ev_list) {
+
+	  ## Make an ID for the node.
+	  #my $ev_node_id = $ev->xref->xref_key;
+	  my $ev_node_id = 'ENID:' . $ev->id;
+
+	  ## Draw term node. Way of drawing depends on $show_ xrefs.
+	  if(	$show_xrefs eq 'yes'){
+	    $self->__draw_node(-id=>$ev_node_id,
+			       -metadata=>'instance',
+			       -label=>$ev->code,
+			       -xrefs=>$ev->xref_list);
+	  }else{
+	    ## Create evidence instance node w/o xrefs.
+	    $self->__draw_node(-id=>$ev_node_id,
+			       -metadata=>'instance',
+			       -label=>$ev->code);
+	  }
+
+	  ## Create link from annotation instance to evidence instance.
+	  $self->__draw_link(-subject=>$ann_inst_id,
+			     -object=>$ev_node_id,
+			     -predicate=>'obd:has_evidence');
+	}
+      }
+    }
+  }
+}
+
+
+##
+sub __draw_node {
+
+  my $self = shift;
+  my ($id, $metadata, $label, $source, $description, $aliases, $xrefs) =
+    rearrange([qw(id metadata label source description aliases xrefs)], @_);
+
+  # Open node.
+  if( $metadata ){
+    $self->{writer}->startTag('node', 'id'=>$id, 'metadata'=>$metadata);
+  }else{
+    $self->{writer}->startTag('node', 'id'=>$id);
+  }
+
+  # Populate the node with: label, source, and description.
+  if( $label ){
+    $self->{writer}->startTag('label');
+    $self->{writer}->cdata($label);
+    $self->{writer}->endTag('label');
+  }
+  if( $source ){
+    $self->{writer}->emptyTag('source', 'about'=>$source);
+  }
+  if( $description ){
+    $self->__draw_sit(-tag=>'description', -label=>$description);
+  }
+
+  # Add any aliases.
+  if( $aliases ){
+    foreach my $alias ( @$aliases ) {
+      $self->__draw_sit(-tag=>'alias', -label=>$alias, -scope=>'exact');
+    }
+  }
+
+  # Add any xrefs.
+  if( $xrefs ){
+    foreach my $xref ( @$xrefs ) {
+      $self->__draw_xref(-about=>$xref->xref_key, -context=>$xref->dbname);
+    }
+  }
+
+  # Close node.
+  $self->{writer}->endTag('node');
+}
+
+
+##
+sub __draw_link {
+  my $self = shift;
+  my ($subject, $object, $predicate, $id) =
+    rearrange([qw(subject object predicate id)], @_);
+
+  if( $id ){
+    $self->{writer}->startTag('link', 'id'=>$id);
+  }else{
+    $self->{writer}->startTag('link');
+  }
+  $self->{writer}->emptyTag('predicate', 'about'=>$predicate);
+  $self->{writer}->emptyTag('subject', 'about'=>$subject);
+  $self->{writer}->emptyTag('object', 'about'=>$object);
+  $self->{writer}->endTag('link');
+}
+
+
+## BUG: xrefs not implemented here.
+sub __draw_sit {
+  my $self = shift;
+  my ($tag, $label, $id, $scope, $type) =
+    rearrange([qw(tag label id scope type)], @_);
+
+  my %attr_hash;
+  if( $id ){ $attr_hash{'id'} = $id; }
+  if( $scope ){ $attr_hash{'scope'} = $scope; }
+  if( $type ){ $attr_hash{'type'} = $type; }
+
+  $self->{writer}->startTag($tag,
+			    %attr_hash);
+  $self->{writer}->startTag('label');
+  $self->{writer}->cdata($label);
+  $self->{writer}->endTag('label');
+  $self->{writer}->endTag($tag);
+}
+
+
+##
+sub __draw_xref {
+  my $self = shift;
+  my ($about, $context) =
+    rearrange([qw(about context)], @_);
+  if( $context ){
+    $self->{writer}->startTag('xref', 'context'=>$context);
+  }else{
+    $self->{writer}->startTag('xref');
+  }
+  $self->{writer}->emptyTag('linkref', 'about'=>$about);
+  $self->{writer}->endTag('xref');
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/ObanOwl.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/ObanOwl.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/ObanOwl.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,466 @@
+# $Id: ObanOwl.pm,v 1.1 2007/05/14 18:29:39 cmungall Exp $
+#
+# This GO module is maintained by Brad Marshall <bradmars at yahoo.com>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::IO::ObanOwl;
+
+=head1 NAME
+
+  GO::IO::ObanOwl;
+
+=head1 SYNOPSIS
+
+    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);
+    $xml_out->start_document();
+    $xml_out->draw_term($term);
+    $xml_out->end_document();
+
+OR:
+
+    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->start_document();
+    $xml_out->draw_node_graph($term, 3677);
+    $xml_out->end_document();
+
+=head1 DESCRIPTION
+
+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.
+
+
+=cut
+
+use strict;
+use GO::Utils qw(rearrange);
+use XML::Writer;
+
+=head2 new
+
+    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);
+
+=cut
+
+sub new {
+    my $class = shift;
+    my $self = {};
+    bless $self, $class;
+    my ($out) =
+	rearrange([qw(output)], @_);
+
+    $out = new FileHandle(">-") unless $out;
+    my $gen = new XML::Writer(OUTPUT=>$out);    
+    $self->{writer} = $gen;
+
+    $gen->setDataMode(1);
+    $gen->setDataIndent(4);
+
+    return $self;
+}
+
+=head2 xml_header
+
+    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.
+
+=cut
+
+
+sub xml_header {
+    my $self = shift;
+    
+    print "Content-type: text/xml\n\n";
+
+}
+
+
+
+=head2 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.
+
+=cut
+
+
+
+sub start_document {
+    my $self = shift;
+    my ($timestamp) =
+	rearrange([qw(timestamp)], @_);
+
+    $self->{writer}->xmlDecl("UTF-8");
+    $self->{writer}->startTag('rdf:RDF',
+                              'xmlns:oban'=>'http://www.berkeleybop.org/ontologies/oban/alpha#',
+                              'xmlns:rdf'=>'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
+                              'xmlns:rdfs' => 'http://www.w3.org/2000/01/rdf-schema#',
+                              'xmlns:owl' => 'http://www.w3.org/2002/07/owl#',
+                              'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema#',
+                              'xmlns:obo_rel' => 'http://www.obofoundry.org/ro/ro.owl#',
+                              'xmlns:obo' => 'http://purl.org/obo/owl');
+}
+
+
+=head2 end_document
+
+    Usage   - $xml_out->end_document();
+
+Call this when done.
+
+=cut
+
+sub end_document{
+    my $self = shift;
+
+    $self->{writer}->endTag('rdf:RDF');
+}
+ 
+=head2 draw_node_graph
+
+    Usage   - $xml_out->draw_node_graph(-graph=>$graph);
+    Returns - None
+    Args    -graph=>$node_graph, 
+            -focus=>$acc,                      ## optional
+            -show_associations=>"yes" or "no"  ## optional
+
+=cut
+
+   
+sub draw_node_graph {
+    my $self = shift;
+    my ($graph, $focus, $show_associations, $show_terms, $show_xrefs) =
+	rearrange([qw(graph focus show_associations show_terms show_xrefs)], @_);
+    
+    foreach my $term (@{$graph->get_all_nodes}) {
+        $self->draw_term(-term=>$term, 
+                         -graph=>$graph,
+                         #		       -focus=>$is_focus, 
+                         -show_associations=>$show_associations,
+                         -show_terms=>$show_terms,
+                         -show_xrefs=>$show_xrefs
+                        );
+    }
+}
+
+sub write_all {
+    my $self = shift;
+    my ($terms, $graph, $focus, $show_associations, $show_terms, $show_xrefs) =
+	rearrange([qw(terms graph focus show_associations show_terms show_xrefs)], @_);
+    
+    
+    $self->start_document;
+    if (!$terms) {
+        $terms = $graph->get_all_terms;
+    }
+    foreach my $term (@$terms) {
+        $self->draw_term(-term=>$term, 
+                         -graph=>$graph,
+#                         -focus=>$is_focus, 
+                         -show_associations=>$show_associations,
+                         -show_terms=>$show_terms,
+                         -show_xrefs=>$show_xrefs
+		      );
+    }
+}
+
+sub __is_focus {
+  my $self = shift;
+  my ($node_list, $term) =
+    rearrange([qw(node_list term)], @_);
+  
+  foreach my $node (@$node_list) {
+    if ($node->acc eq $term->acc) {
+      return "yes";
+    } 
+  }
+      return "no";
+}
+
+
+=head2 draw_term
+
+    Usage   - $xml_out->draw_term();
+    Returns - None
+    Args    -term=>$term, 
+            -graph=>$graph, 
+            -is_focus=>"yes" or "no",    ## optional
+            -show_associations=>"yes" or "no",    ## optional
+            -show_terms=>"yes" or "no",    ## optional, just draws associations
+  
+
+=cut
+
+sub draw_term {
+    my $self = shift;
+    my ($term, $graph, $is_focus, $show_associations, $show_terms, $show_xrefs) =
+	rearrange([qw(term graph focus show_associations show_terms show_xrefs)], @_);
+    
+    $show_terms = $show_terms || "";
+    $is_focus = $is_focus || "";
+    $show_xrefs = $show_xrefs || "";
+
+    if ($show_terms ne 'no') {
+	$self->startTag('owl:Class', 
+                        #'focus'=>'yes', 
+                        'rdf:about'=>$self->class_uri($term->public_acc),
+                       );
+        $self->dataElement('oboInOwl:identifier', $term->acc);
+        $self->dataElement('rdfs:label', $term->name);
+        
+        my $syn_idx = $term->synonyms_by_type_idx || {};
+        foreach my $scope (keys %$syn_idx) {
+            my $syn_prop = $self->_synonym_property($scope);
+            foreach my $syn (@{$syn_idx->{$scope}}) {
+                $self->startTag($syn_prop);
+                $self->startTag('oboInOwl:Synonym');
+                $self->dataElement('rdfs:label', $syn);
+                $self->endTag;
+                $self->endTag;
+            }	
+        }
+        if ($term->definition) {
+            $self->startTag('oboInOwl:hasDefinition');
+            $self->startTag('oboInOwl:Definition');
+            $self->dataElement('rdfs:label', $term->definition );
+            $self->dataElement('go:definition', 
+                               $term->definition);
+            $self->draw_dbxref($_) foreach @{$self->definition_dbxref_list || []};
+            $self->endTag;
+            $self->endTag;
+        };
+        if ($term->comment) {
+            $self->dataElement('rdfs:comment', 
+                               $term->comment);
+        };
+        if (defined $graph) {
+            foreach my $rel (sort by_acc1 @{$graph->get_parent_relationships($term->acc)}) {
+                my $to = $rel->acc1;
+                if (lc($rel->type) eq 'is_a') {
+                    $self->emptyTag('rdfs:subClassOf', 
+                                    'rdf:resource'=>$self->class_uri($to));
+                }
+                else {
+                    $self->startTag('rdfs:subClassOf');
+                    $self->startTag('owl:Restriction');
+                    $self->emptyTag('owl:onProperty', 
+                                    'rdf:resource'=>$self->class_uri($to));
+                    # assume OBO REL defs; always existential
+                    $self->emptyTag('owl:someValuesFrom', 
+                                    'rdf:resource'=>$self->class_uri($to));
+                    $self->endTag;
+                    $self->endTag;
+                }
+            }    
+        }
+      
+        if ($show_xrefs ne 'no') {
+            if ($term->dbxref_list) {
+                $self->draw_dbxref($_) foreach @{$self->dbxref_list || []};
+            }
+        }
+      
+        $self->endTag('owl:Class');
+        if (defined ($term->selected_association_list)) {
+            foreach my $selected_ass (sort by_gene_product_symbol @{$term->selected_association_list}) {
+                $self->__draw_association($selected_ass, 1, $term);
+            }
+        }
+      
+        if ($show_associations && $show_associations eq 'yes') {
+            foreach my $ass (sort by_gene_product_symbol @{$term->association_list}) { 
+                $self->__draw_association($ass, 0, $term);
+            }	
+        }
+    } 
+    else {
+        if (defined ($term->selected_association_list)) {
+            foreach my $selected_ass (sort by_gene_product_symbol @{$term->selected_association_list}) {
+                $self->__draw_association($selected_ass, 1, $term);
+            }
+        }
+    }
+    
+}
+
+sub by_acc1 {
+  lc($a->acc1) cmp lc($b->acc1);
+
+}
+
+sub by_xref_key {
+  lc($a->xref_key) cmp lc($b->xref_key);
+}
+
+sub by_gene_product_symbol {
+  lc($a->gene_product->symbol) cmp lc($b->gene_product->symbol);
+
+}
+
+sub draw_dbxref {
+  my $self = shift;
+  my $dbxref = shift;
+  $self->startTag('oboInOwl:hasDbXref');
+  $self->startTag('oboInOwl:DbXref');
+  $self->dataElement('rdfs:label',$dbxref->as_str);
+  $self->endTag;
+  $self->endTag;
+
+}
+
+sub __draw_association {
+  my $self = shift;
+  my $ass = shift;
+  my $term = shift;
+  
+  my $rdf_id = 'http://www.geneontology.org/go#'.$ass->go_public_acc;
+
+  $self->startTag('oban:Annotation'); # bNode
+  foreach my $ev (@{$ass->evidence_list}) {
+      $self->startTag('oban:has_evidence');
+      $self->startTag('rdf:Description');
+      $self->dataElement('rdf:type',
+                         'rdf:about'=>$self->class_uri($ev->code));
+      foreach my $with (@{$ev->seq_xref_list || []}) {
+          $self->dataElement('oban:with',
+                             'rdf:about'=>$self->class_uri($with->as_str));
+      }
+      foreach my $pub (@{$ev->pub_xref_list || []}) {
+          $self->dataElement('oban:has_source',
+                             'rdf:about'=>$self->class_uri($pub->as_str));
+      }
+      $self->startTag('oban:posits');
+      $self->startTag('rdf:Statement');
+      $self->dataElement('rdf:subject',
+                         'rdf:about'=>$self->data_uri($ass->gene_product->dbxref->as_str));
+      $self->dataElement('rdf:predicate',
+                         'rdf:about'=>'oban:has_role'); # TODO
+      $self->dataElement('rdf:object',
+                         'rdf:about'=>$self->class_uri($term->public_acc));
+      $self->endTag;
+      $self->endTag;
+      $self->endTag;
+      $self->endTag;
+  }
+  $self->endTag;
+  
+}
+
+sub class_uri {
+    my $self = shift;
+    my $id = shift;
+    my ($db, at rest) = split(/:/,$id);
+    if (@rest) {
+        my $local = join(':', at rest);
+        return sprintf("http://purl.org/obo/owl/%s#%s_%s",$db,$db,$local);
+    }
+}
+
+=head2 
+
+sub characters
+
+  This is simply a wrapper to XML::Writer->characters
+  which strips out any non-ascii characters.
+
+=cut
+
+sub characters {
+  my $self = shift;
+  my $string = shift;
+  
+  if ($string) {
+      $self->{writer}->characters($self->__strip_non_ascii($string));
+  }
+  
+}
+
+=head2 
+
+sub dataElement
+
+  This is simply a wrapper to XML::Writer->dataElement
+  which strips out any non-ascii characters.
+
+=cut
+
+sub dataElement {
+  my $self = shift;
+  my $tag = shift;
+  my $content = shift;
+
+  $self->{writer}->dataElement($tag,
+			       $self->__strip_non_ascii($content));
+  
+}
+
+sub startTag {
+  my $self = shift;
+
+  $self->{writer}->startTag(@_);
+}
+
+sub endTag {
+  my $self = shift;
+
+  $self->{writer}->endTag(@_);
+}
+
+
+sub emptyTag {
+  my $self = shift;
+
+  $self->{writer}->emptyTag(@_);
+}
+
+sub __strip_non_ascii {
+  my $self = shift;
+  my $string = shift;
+
+  $string =~ s/\P{IsASCII}//g;
+
+  return $string;
+}
+
+sub __make_go_from_acc {
+  my $self = shift;
+  my $acc = shift;
+  return $acc;
+}
+
+1;
+
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/RDFXML.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/RDFXML.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/RDFXML.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,431 @@
+# $Id: RDFXML.pm,v 1.9 2007/07/11 05:37:59 cmungall Exp $
+#
+# This GO module is maintained by Brad Marshall <bradmars at yahoo.com>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::IO::RDFXML;
+
+=head1 NAME
+
+  GO::IO::RDFXML;
+
+=head1 SYNOPSIS
+
+    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);
+    $xml_out->start_document();
+    $xml_out->draw_term($term);
+    $xml_out->end_document();
+
+OR:
+
+    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->start_document();
+    $xml_out->draw_node_graph($term, 3677);
+    $xml_out->end_document();
+
+=head1 DESCRIPTION
+
+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.
+
+
+=cut
+
+use strict;
+use GO::Utils qw(rearrange);
+use XML::Writer;
+
+=head2 new
+
+    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);
+
+=cut
+
+sub new {
+    my $class = shift;
+    my $self = {};
+    bless $self, $class;
+    my ($out) =
+	rearrange([qw(output)], @_);
+
+    $out = new FileHandle(">-") unless $out;
+    my $gen = new XML::Writer(OUTPUT=>$out);    
+    $self->{writer} = $gen;
+
+    $gen->setDataMode(1);
+    $gen->setDataIndent(4);
+
+    return $self;
+}
+
+=head2 xml_header
+
+    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.
+
+=cut
+
+
+sub xml_header {
+    my $self = shift;
+    
+    print "Content-type: text/xml\n\n";
+
+}
+
+
+
+=head2 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.
+
+=cut
+
+
+
+sub start_document {
+    my $self = shift;
+    my ($timestamp) =
+	rearrange([qw(timestamp)], @_);
+
+    $self->{writer}->xmlDecl("UTF-8");
+    $self->{writer}->doctype("go:go", 
+			     '-//Gene Ontology//Custom XML/RDF Version 2.0//EN',
+			     'http://www.geneontology.org/dtd/go.dtd');
+    $self->{writer}->startTag('go:go', 
+		   'xmlns:go'=>'http://www.geneontology.org/dtds/go.dtd#',
+		   'xmlns:rdf'=>'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
+
+    if (defined ($timestamp)) {
+	#$self->{writer}->emptyTag('go:version', 'timestamp'=>$timestamp);
+    }
+    $self->{writer}->startTag('rdf:RDF');
+
+}
+
+
+=head2 end_document
+
+    Usage   - $xml_out->end_document();
+
+Call this when done.
+
+=cut
+
+sub end_document{
+    my $self = shift;
+
+    $self->{writer}->endTag('rdf:RDF');
+    $self->{writer}->endTag('go:go');    
+}
+ 
+=head2 draw_node_graph
+
+    Usage   - $xml_out->draw_node_graph(-graph=>$graph);
+    Returns - None
+    Args    -graph=>$node_graph, 
+            -focus=>$acc,                      ## optional
+            -show_associations=>"yes" or "no"  ## optional
+
+=cut
+
+   
+sub draw_node_graph {
+    my $self = shift;
+    my ($graph, $focus, $show_associations, $show_terms, $show_xrefs) =
+	rearrange([qw(graph focus show_associations show_terms show_xrefs)], @_);
+    
+    my $is_focus;
+    
+    foreach my $term (@{$graph->get_all_nodes}) {
+      $is_focus = $self->__is_focus(-node_list=>$graph->focus_nodes,
+				    -term=>$term
+				   );
+      $self->draw_term(-term=>$term, 
+		       -graph=>$graph,
+		       -focus=>$is_focus, 
+		       -show_associations=>$show_associations,
+		       -show_terms=>$show_terms,
+		       -show_xrefs=>$show_xrefs
+		      );
+    }
+}
+
+sub __is_focus {
+  my $self = shift;
+  my ($node_list, $term) =
+    rearrange([qw(node_list term)], @_);
+  
+  foreach my $node (@$node_list) {
+    if ($node->acc eq $term->acc) {
+      return "yes";
+    } 
+  }
+      return "no";
+}
+
+
+=head2 draw_term
+
+    Usage   - $xml_out->draw_term();
+    Returns - None
+    Args    -term=>$term, 
+            -graph=>$graph, 
+            -is_focus=>"yes" or "no",    ## optional
+            -show_associations=>"yes" or "no",    ## optional
+            -show_terms=>"yes" or "no",    ## optional, just draws associations
+  
+
+=cut
+
+
+sub draw_term {
+    my $self = shift;
+    my ($term, $graph, $is_focus, $show_associations, $show_terms, $show_xrefs) =
+	rearrange([qw(term graph focus show_associations show_terms show_xrefs)], @_);
+    
+    $show_terms = $show_terms || "";
+    $is_focus = $is_focus || "";
+    $show_xrefs = $show_xrefs || "";
+
+    if ($show_terms ne 'no') {
+      if ($is_focus eq "yes") {
+	$self->{writer}->startTag('go:term', 
+				  'focus'=>'yes', 
+				  'rdf:about'=>'http://www.geneontology.org/go#'.$term->public_acc,
+#				  'n_associations'=>$term->n_deep_products
+				 );
+      } else {
+	$self->{writer}->startTag('go:term', 
+				  'rdf:about'=>'http://www.geneontology.org/go#'.$term->public_acc,
+				  #'n_associations'=>$term->n_deep_products
+				 );
+      }
+      $self->{writer}->startTag('go:accession');
+      $self->characters($term->acc);
+      $self->{writer}->endTag('go:accession');
+      $self->dataElement('go:name', $term->name);
+      
+      if ($term->synonym_list) {
+	foreach my $syn (sort @{$term->synonym_list}) {
+	  $self->{writer}->startTag('go:synonym');
+	  $self->characters($syn);  
+	  $self->{writer}->endTag('go:synonym');
+	}	
+      }
+      if ($term->definition) {
+	$self->dataElement('go:definition', 
+			   $term->definition);
+      };
+      if ($term->comment) {
+	$self->dataElement('go:comment', 
+			   $term->comment);
+      };
+      if (defined $graph) {
+	foreach my $rel (sort by_acc1 @{$graph->get_parent_relationships($term->acc)}) {
+	  if (lc($rel->type) eq 'partof') {
+	    $self->{writer}->emptyTag('go:part-of', 
+				      'rdf:resource'=>"http://www.geneontology.org/go#"
+				      .$self->__make_go_from_acc($rel->acc1));
+	  } else {
+	    $self->{writer}->emptyTag("go:".$rel->type, 
+				      'rdf:resource'=>"http://www.geneontology.org/go#"
+				      .$self->__make_go_from_acc($rel->acc1));
+	  }
+	}    
+      }
+      
+      if ($show_xrefs ne 'no') {
+	  if ($term->dbxref_list) {
+	      if (scalar(@{$term->dbxref_list}) > 0) {
+		  foreach my $xref (sort by_xref_key @{$term->dbxref_list}) {
+		      $self->{writer}->startTag('go:dbxref',
+					       'rdf:parseType'=>'Resource');
+		      $self->{writer}->startTag('go:database_symbol');
+		      $self->characters($xref->xref_dbname);
+		      $self->{writer}->endTag('go:database_symbol');
+		      $self->{writer}->startTag('go:reference');
+		      $self->characters($xref->xref_key);
+		      $self->{writer}->endTag('go:reference');
+		      $self->{writer}->endTag('go:dbxref');
+		  }
+	      }
+	  }
+      }
+      
+      if (defined ($term->selected_association_list)) {
+	foreach my $selected_ass (sort by_gene_product_symbol @{$term->selected_association_list}) {
+	  $self->__draw_association($selected_ass, 1);
+	}
+      }
+      
+      if ($show_associations && $show_associations eq 'yes') {
+	foreach my $ass (sort by_gene_product_symbol @{$term->association_list}) { 
+	  $self->__draw_association($ass, 0);
+	}	
+      }
+      $self->{writer}->endTag('go:term');
+    } else {
+      if (defined ($term->selected_association_list)) {
+	foreach my $selected_ass (sort by_gene_product_symbol @{$term->selected_association_list}) {
+            next if $selected_ass->is_not(); # skip negative associations
+            $self->__draw_association($selected_ass, 1);
+	}
+      }
+    }
+    
+}
+
+sub by_acc1 {
+  lc($a->acc1) cmp lc($b->acc1);
+
+}
+
+sub by_xref_key {
+  lc($a->xref_key) cmp lc($b->xref_key);
+}
+
+sub by_gene_product_symbol {
+  lc($a->gene_product->symbol) cmp lc($b->gene_product->symbol);
+
+}
+
+sub __draw_association {
+  my $self = shift;
+  my $ass = shift;
+  my $is_selected = shift;
+  
+  my $rdf_id = 'http://www.geneontology.org/go#'.$ass->go_public_acc;
+
+
+  if ($is_selected) {
+    $self->{writer}->startTag('go:association', 
+			      'selected'=>'yes',
+			      'rdf:parseType'=>'Resource'
+			     );	  
+
+  } else {
+    $self->{writer}->startTag('go:association', 
+			      'rdf:parseType'=>'Resource'
+			     );
+
+  }
+  foreach my $ev (@{$ass->evidence_list}) {
+    $self->{writer}->startTag('go:evidence', 'evidence_code'=>$ev->code);
+    if (defined($ev->xref)) {
+      $self->{writer}->startTag('go:dbxref',
+			       'rdf:parseType'=>'Resource');
+      $self->{writer}->startTag('go:database_symbol');
+      $self->characters($ev->xref->xref_dbname);
+      $self->{writer}->endTag('go:database_symbol');
+      $self->{writer}->startTag('go:reference');##, 'type'=>$ev->xref->xref_keytype);
+      $self->characters($ev->xref->xref_key);
+      $self->{writer}->endTag('go:reference');
+      $self->{writer}->endTag('go:dbxref');
+    }
+    $self->{writer}->endTag('go:evidence');
+  }
+  $self->{writer}->startTag('go:gene_product',
+			   'rdf:parseType'=>'Resource');
+  $self->dataElement('go:name', $ass->gene_product->symbol);
+  $self->{writer}->startTag('go:dbxref',
+			   'rdf:parseType'=>'Resource');
+  $self->dataElement('go:database_symbol', $ass->gene_product->speciesdb);
+  $self->dataElement('go:reference', $ass->gene_product->acc);
+  $self->{writer}->endTag('go:dbxref');
+  $self->{writer}->endTag('go:gene_product');   
+  $self->{writer}->endTag('go:association');
+  
+}
+
+=head2 
+
+sub characters
+
+  This is simply a wrapper to XML::Writer->characters
+  which strips out any non-ascii characters.
+
+=cut
+
+sub characters {
+  my $self = shift;
+  my $string = shift;
+  
+  if ($string) {
+      $self->{writer}->characters($self->__strip_non_ascii($string));
+  }
+  
+}
+
+=head2 
+
+sub dataElement
+
+  This is simply a wrapper to XML::Writer->dataElement
+  which strips out any non-ascii characters.
+
+=cut
+
+sub dataElement {
+  my $self = shift;
+  my $tag = shift;
+  my $content = shift;
+
+  $self->{writer}->dataElement($tag,
+			       $self->__strip_non_ascii($content));
+  
+}
+
+sub __strip_non_ascii {
+  my $self = shift;
+  my $string = shift;
+
+  $string =~ s/\P{IsASCII}//g;
+
+  return $string;
+}
+
+sub __make_go_from_acc {
+  my $self = shift;
+  my $acc = shift;
+  return $acc;
+}
+
+1;
+
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/XML.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/XML.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/XML.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,7 @@
+package GO::IO::XML;
+use base qw(GO::IO::RDFXML);
+1;
+
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/go_assoc.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/go_assoc.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/IO/go_assoc.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,477 @@
+# $Id: go_assoc.pm,v 1.5 2007/06/12 01:26:54 sjcarbon Exp $
+#
+# This GO module is maintained by Seth Carbon <sjcarbon at berkeleybop.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself.
+
+##
+## TODO: Fix documentation.
+##
+
+package GO::IO::go_assoc;
+
+=head1 NAME
+
+  GO::IO::go_assoc;
+
+=head1 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);
+
+=head1 DESCRIPTION
+
+Utility class to dump GO terms as OBD XML.  Currently, you just call
+start_document, write_term for each term, then end_document.
+
+=cut
+
+
+use strict;
+use GO::Utils qw(rearrange);
+
+
+####################
+
+=head2 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);
+
+=cut
+
+sub new {
+  my $class = shift;
+  my $self = {};
+  #my $outhandle = rearrange([qw(output)], @_);
+  my $outhandle = shift;
+  $self->{OUT} = $outhandle;
+
+  bless $self, $class;
+  return $self;
+}
+
+
+####################
+
+=head2 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.
+
+=cut
+
+sub cgi_header {
+  my $self = shift;
+  my $fh = $self->{OUT};
+  print $fh "Content-type: text/plain\n\n";
+}
+
+
+####################
+
+=head2 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.
+
+=cut
+
+##
+sub write_graph {
+  my $self = shift;
+  my ($graph, $deep, $qualifier,
+      $with, $object_name, $object_synonym) =
+	rearrange([qw(graph deep qualifier
+		      with object_name object_synonym)], @_);
+
+  my $term_list = $graph->get_all_nodes;
+  $self->write_term_list(-term_listref=>$term_list,
+			 -deep=>$deep,
+			 -qualifier=>$qualifier,
+			 -with=>$with,
+			 -object_name=>$object_name,
+			 -object_synonym=>$object_synonym
+			);
+}
+
+
+####################
+
+=head2 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.
+
+=cut
+
+##
+sub write_term_list {
+  my $self = shift;
+  my ($term_listref, $deep, $qualifier, $with, $object_name, $object_synonym) =
+    rearrange([qw(term_listref deep qualifier
+		  with object_name object_synonym)], @_);
+
+  #print STDERR "\n\n" . @$term_listref . "\n\n";
+  #print STDERR "\n\n" . $term->acc . "\n\n";
+  #sleep 1;
+
+  ##
+  foreach my $term (@$term_listref) {
+
+    $self->write_term(-term=>$term,
+		      -deep=>$deep,
+		      -qualifier=>$qualifier,
+		      -with=>$with,
+		      -object_name=>$object_name,
+		      -object_synonym=>$object_synonym);
+  }
+}
+
+
+####################
+
+=head2 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.
+
+=cut
+
+sub write_term{
+
+  my $self = shift;
+  my ($term, $deep, $qualifier, $with, $object_name, $object_synonym) =
+	rearrange([qw(term deep qualifier
+		      with object_name object_synonym)], @_);
+
+  $deep = $deep || 0;
+  $qualifier = $qualifier || 1;
+  $with = $with || 1;
+  $object_name = $object_name || 1;
+  $object_synonym = $object_synonym || 1;
+
+  my @output = ();
+
+  my $assoc_listref;
+  if( $deep ){
+    $assoc_listref = $term->get_all_associations || [];
+  }else{
+    #$assoc_listref = $term->selected_association_list || [];
+    $assoc_listref = $term->association_list;
+  }
+
+  foreach my $assoc (@$assoc_listref) {
+
+    ## Get evidence info.
+    my $ev_listref = $assoc->evidence_list;
+    foreach my $ev (@$ev_listref) {
+
+      ## Get gp info.
+      my $gp = $assoc->gene_product;
+
+      ## 1  DB   gene_product x dbxref.xref_dbname
+      push @output, $gp->speciesdb;
+      push @output, "\t";
+
+      ## 2  DB_Object_ID  gene_product x dbxref.xref_xref_key
+      push @output, $gp->acc;
+      push @output, "\t";
+
+      ## 3  DB_Object_Symbol  gene_product.symbol
+      push @output, $gp->symbol;
+      push @output, "\t";
+
+      ## 4  NOT         association.is_not
+      ##    Qualifiers  association_qualifier
+      if ( $qualifier ) {
+	if ( $assoc->is_not ) {
+	  push @output, 'NOT';
+	  #}else{
+	  #push @output, 'IS';
+	}
+      }
+      push @output, "\t";
+
+      ## 5  GOid   association x term.acc
+      push @output, $term->acc;
+      push @output, "\t";
+
+      ## 6  DB:Reference  association x evidence.dbxref_id
+      my $xref_listref = $ev->xref_list;
+      foreach my $xref ( @$xref_listref ) {
+	push @output, $xref->dbname . ':' . $xref->xref_key;
+	push @output, '|';
+      }
+      ## Get rid of trailing '|'.
+      pop @output if $output[$#output] eq '|';
+      push @output, "\t";
+
+      ## 7  Evidence   association x evidence.code
+      push @output, $ev->code;
+      push @output, "\t";
+
+      ## 8  With/From  evidence.seq_acc [DENORMALIZED]
+      ##               evidence x evidence_dbxref x dbxref [NORMALIZED]
+      if ( $with && $ev->seq_acc ) {
+	push @output, $ev->seq_acc;
+	push @output, '|';
+      }
+      ## Get rid of trailing '|'.
+      pop @output if $output[$#output] eq '|';
+      push @output, "\t";
+
+      ## 9  Aspect  association x term.term_type
+      my $aspect = $term->type;
+      if ( $aspect eq 'cellular_component' ||
+	   $aspect eq 'C' || $aspect eq 'c' ) {
+	push @output, 'C';
+      } elsif ( $aspect eq 'molecular_function' ||
+		$aspect eq 'F' || $aspect eq 'f' ) {
+	push @output, 'F';
+      } elsif ( $aspect eq 'biological_process' ||
+		$aspect eq 'P' || $aspect eq 'p' ) {
+	push @output, 'P';
+      }
+      push @output, "\t";
+
+      ## 10  DB_Object_Name  gene_product.full_name
+      if ( $object_name && $gp->full_name ) {
+	push @output, $gp->full_name;
+      }
+      push @output, "\t";
+
+      ## 11  Synonym  gene_product x gene_product_synonym
+      my $syn_listref = $gp->synonym_list;
+      if ( $syn_listref && @$syn_listref && $object_synonym ) {
+	foreach my $syn (@$syn_listref) {
+	  push @output, $syn;
+	  push @output, '|';
+	}
+	## Get rid of trailing '|'.
+	pop @output if $output[$#output] eq '|';
+      }
+      push @output, "\t";
+
+      ## 12  DB_Object_type  gene_product.type_id x term.name [TBA]
+      push @output, $gp->type;
+      push @output, "\t";
+
+      ## 13  Taxon  gene_product x species.ncbi_taxa_id
+      push @output, 'taxon:';
+      push @output, $gp->species->ncbi_taxa_id;
+      push @output, "\t";
+
+      ## 14  Date  association.assoc_date
+      push @output, $assoc->assocdate;
+      push @output, "\t";
+
+      ## 15  Assigned_by  association.source_db_id x db.name
+      ## TODO/NOTE: Hidden API.
+      push @output, $assoc->assigned_by;
+
+      push @output, "\n";
+    }
+  }
+
+  my $fh = $self->{OUT};
+  print $fh join '', @output;
+}
+
+
+# ####################
+
+
+# =head2 write_association_list
+
+#     Usage   - $ga_out->write_association();
+#     Returns - None
+#     Args    -term=>$term,
+#             -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.
+
+# =cut
+
+# sub write_association_list{
+
+#   my $self = shift;
+#   my ($assoc_listref,
+#       $qualifier, $with, $object_name, $object_synonym) =
+# 	rearrange([qw(assoc_listref
+# 		      qualifier with object_name object_synonym)], @_);
+
+#   $qualifier = $qualifier || 1;
+#   $with = $with || 1;
+#   $object_name = $object_name || 1;
+#   $object_synonym = $object_synonym || 1;
+
+#   my @output = ();
+
+#   foreach my $assoc (@$assoc_listref) {
+
+#     ## Get evidence info.
+#     my $ev_listref = $assoc->evidence_list;
+#     foreach my $ev (@$ev_listref) {
+
+#       ## Get gp info.
+#       my $gp = $assoc->gene_product;
+
+#       ## 1  DB   gene_product x dbxref.xref_dbname
+#       push @output, $gp->speciesdb;
+#       push @output, "\t";
+
+#       ## 2  DB_Object_ID  gene_product x dbxref.xref_xref_key
+#       push @output, $gp->acc;
+#       push @output, "\t";
+
+#       ## 3  DB_Object_Symbol  gene_product.symbol
+#       push @output, $gp->symbol;
+#       push @output, "\t";
+
+#       ## 4  NOT         association.is_not
+#       ##    Qualifiers  association_qualifier
+#       if ( $qualifier ) {
+# 	if ( $assoc->is_not ) {
+# 	  push @output, 'NOT';
+# 	  #}else{
+# 	  #push @output, 'IS';
+# 	}
+#       }
+#       push @output, "\t";
+
+#       ## 5  GOid   association x term.acc
+#       #push @output, $term->acc;
+#       push @output, "\t";
+
+#       ## 6  DB:Reference  association x evidence.dbxref_id
+#       my $xref_listref = $ev->xref_list;
+#       foreach my $xref ( @$xref_listref ) {
+# 	push @output, $xref->dbname . ':' . $xref->xref_key;
+# 	push @output, '|';
+#       }
+#       ## Get rid of trailing '|'.
+#       pop @output if $output[$#output] eq '|';
+#       push @output, "\t";
+
+#       ## 7  Evidence   association x evidence.code
+#       push @output, $ev->code;
+#       push @output, "\t";
+
+#       ## 8  With/From  evidence.seq_acc [DENORMALIZED]
+#       ##               evidence x evidence_dbxref x dbxref [NORMALIZED]
+#       if ( $with && $ev->seq_acc ) {
+# 	push @output, $ev->seq_acc;
+# 	push @output, '|';
+#       }
+#       ## Get rid of trailing '|'.
+#       pop @output if $output[$#output] eq '|';
+#       push @output, "\t";
+
+#       ## 9  Aspect  association x term.term_type
+#       #my $aspect = $term->type;
+#       my $aspect = 'foo';
+#       if ( $aspect eq 'cellular_component' ||
+# 	   $aspect eq 'C' || $aspect eq 'c' ) {
+# 	push @output, 'C';
+#       } elsif ( $aspect eq 'molecular_function' ||
+# 		$aspect eq 'F' || $aspect eq 'f' ) {
+# 	push @output, 'F';
+#       } elsif ( $aspect eq 'biological_process' ||
+# 		$aspect eq 'P' || $aspect eq 'p' ) {
+# 	push @output, 'P';
+#       }
+#       push @output, "\t";
+
+#       ## 10  DB_Object_Name  gene_product.full_name
+#       if ( $object_name && $gp->full_name ) {
+# 	push @output, $gp->full_name;
+#       }
+#       push @output, "\t";
+
+#       ## 11  Synonym  gene_product x gene_product_synonym
+#       my $syn_listref = $gp->synonym_list;
+#       if ( $syn_listref && @$syn_listref && $object_synonym ) {
+# 	foreach my $syn (@$syn_listref) {
+# 	  push @output, $syn;
+# 	  push @output, '|';
+# 	}
+# 	## Get rid of trailing '|'.
+# 	pop @output if $output[$#output] eq '|';
+#       }
+#       push @output, "\t";
+
+#       ## 12  DB_Object_type  gene_product.type_id x term.name [TBA]
+#       push @output, $gp->type;
+#       push @output, "\t";
+
+#       ## 13  Taxon  gene_product x species.ncbi_taxa_id
+#       push @output, 'taxon:';
+#       push @output, $gp->species->ncbi_taxa_id;
+#       push @output, "\t";
+
+#       ## 14  Date  association.assoc_date
+#       push @output, $assoc->assocdate;
+#       push @output, "\t";
+
+#       ## 15  Assigned_by  association.source_db_id x db.name
+#       ## TODO/NOTE: Hidden API.
+#       push @output, $assoc->assigned_by;
+
+#       push @output, "\n";
+#     }
+#   }
+
+#   my $fh = $self->{OUT};
+#   print $fh join '', @output;
+# }
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Association.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Association.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Association.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,426 @@
+# $Id: Association.pm,v 1.7 2007/03/27 22:36:16 sjcarbon Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.fruitfly.org/annot/go
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::Association;
+
+=head1 NAME
+
+  GO::Model::Association;
+
+=head1 SYNOPSIS
+
+  # print all gene products associated with a GO::Model::Term
+  my $assoc_l = $term->association_list;
+  foreach my $assoc (@$assoc_l) {
+    printf "gene product:%s %s %s (evidence: %s)\n",
+      $assoc->gene_product->symbol,
+      $assoc->is_not ? "IS NOT" : "IS",
+      $term->name,
+      map {$_->code} @{$assoc->evidence_list};
+  }
+
+=head1 DESCRIPTION
+
+Represents an association between a GO term (GO::Model::Term) and a
+gene product (GO::Model::GeneProduct)
+
+=cut
+
+
+use Carp;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use GO::Model::Evidence;
+use strict;
+use vars qw(@ISA);
+
+use Data::Dumper;
+
+use base qw(GO::Model::Root Exporter);
+
+
+sub _valid_params {
+    return qw(id gene_product evidence_list is_not role_group qualifier_list source_db_id assigned_by assocdate);
+}
+
+
+sub _initialize 
+{
+    my $self = shift;
+    my $paramh = shift;
+
+    # an association is a compound obj of both Association and
+    # GeneProduct; both objs created together from same hash
+
+    # sometimes this is from the external world and sometimes from the db
+    my $product_h = {};
+    my $ev_h = {};
+  
+    # SHULY Nov 28, 04 - added the gene product type to the product hash 
+    if (defined ($paramh->{gene_product_id})) {
+	$product_h->{speciesdb} = $paramh->{xref_dbname};
+	$product_h->{acc} = $paramh->{xref_key};
+	$product_h->{id} = $paramh->{gene_product_id};
+	$product_h->{symbol} = $paramh->{symbol};
+	$product_h->{full_name} = $paramh->{full_name} 
+	if defined ($paramh->{full_name});
+        # SHULY - added the type to the hash
+	#$product_h->{type} = $paramh->{type_id};
+	$product_h->{type_id} = $paramh->{type_id};
+    
+        if (!$self->apph) {
+            confess("ASSERTION ERROR");
+        }
+
+	my $product = $self->apph->create_gene_product_obj($product_h);
+	$product->{species_id} = $paramh->{species_id};
+
+	$self->gene_product($product);
+
+	delete $paramh->{xref_dbname};
+	delete $paramh->{xref_key};
+	delete $paramh->{gene_product_id};
+	delete $paramh->{symbol};
+	delete $paramh->{full_name};
+        # SHULY - added the type to the hash
+	delete $paramh->{type_id};
+	delete $paramh->{species_id};
+    
+    }
+
+    $self->SUPER::_initialize($paramh);
+}
+
+
+
+=head2 go_public_acc
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub go_public_acc {
+    my $self = shift;
+    $self->{go_public_acc} = shift if @_;
+    return $self->{go_public_acc} || '';
+}
+
+
+
+=head2 add_evidence
+
+  Usage   - $assoc->add_evidence($my_evid);
+  Returns -
+  Args    - GO::Model::Evidence
+
+=cut
+
+sub add_evidence {
+    my $self = shift;
+    if (!$self->{evidence_list}) {
+	$self->{evidence_list} = [];
+    }
+    push(@{$self->{evidence_list}}, (shift));
+    return $self->{evidence_list};
+}
+
+
+=head2 evidence_list
+
+  Usage   - my $ev_l = $assoc->evidence_list;
+  Returns -
+  Args    -
+
+gets/sets arrayref of GO::Model::Evidence
+
+=cut
+
+sub evidence_list {
+    my $self = shift;
+    $self->{evidence_list} = shift if @_;
+    return $self->{evidence_list};
+}
+
+
+=head2 evidence_as_str
+
+  Usage   - print $assoc->evidence_as_str
+  Usage   - print $assoc->evidence_as_str(1); #verbose
+  Returns -
+  Args    - verbose
+
+concatenates evcodes together, for display
+
+=cut
+
+sub evidence_as_str {
+    my $self = shift;
+    my $v = shift;
+    if ($v) {
+        return 
+          join("; ", 
+               map {
+                   sprintf("%s %s %s",
+                           $_->code,
+                           $_->seq_acc ? $_->seq_acc->as_str : "",
+                           $_->xref ? $_->xref->as_str : "")
+               } @{$self->evidence_list || []});
+    }
+    else {
+        return join("; ", map {$_->code} @{$self->evidence_list || []});
+    }
+}
+
+=head2 has_evcode
+
+  Usage   - if $assoc->has_evcode("IEA");
+  Returns - boolean
+  Args    - evcode [string]
+
+=cut
+
+sub has_evcode {
+    my $self = shift;
+    my $code = shift;
+    return grep {$_->code eq $code} @{$self->evidence_list || []};
+}
+
+=head2 remove_evcode
+
+  Usage   - $assoc->remove_evcode("IEA");
+  Returns - 
+  Args    - evcode [string]
+
+removes all evidence of the specified type from the
+association; useful for filtering
+
+=cut
+
+sub remove_evcode {
+    my $self = shift;
+    my $code = shift;
+    my @ok_ev =
+      grep {$_->code ne $code} @{$self->evidence_list || []};
+    $self->evidence_list(\@ok_ev);
+}
+
+
+=head2 evidence_score
+
+  Usage   - my $score = $assoc->evidence_score
+  Returns - 0 <= float <= 1
+  Args    -
+
+returns a score for the association based on the evidence;
+
+This is an EXPERIMENTAL method; it may be removed in future versions.
+
+The evidence fields can be thought of in a loose hierachy: 
+
+TAS
+   IDA
+      IMP/IGI/IPI
+                 ISS
+                    NAS
+
+see http://www.geneontology.org/GO.evidence.html
+
+=cut
+
+sub evidence_score {
+    my $self = shift;
+    my %probs = qw(IEA 0.1
+		   NAS 0.3
+		   NR  0.3
+		   ISS 0.4
+		   IMP 0.6
+		   IGI 0.6
+		   IPI 0.6
+		   IDA 0.8
+		   TAS 0.9);
+    my $np = 1;
+    map {$np *= (1 - $probs{$_}) } @{$self->evcodes||[]};
+    return 1 - $np;
+}
+
+=head2 gene_product
+
+  Usage   - my $gp = $assoc->gene_product
+  Returns -
+  Args    -
+
+gets sets GO::Model::GeneProduct
+
+=cut
+
+sub gene_product {
+    my $self = shift;
+    $self->{gene_product} = shift if @_;
+    return $self->{gene_product};
+}
+
+
+=head2 assigned_by
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+#autoloaded
+
+=head2 is_not
+
+  Usage   -
+  Returns -
+  Args    -
+
+gets/sets boolean representing whether this relationship is negated
+
+=cut
+
+sub is_not {
+    my $self = shift;
+    $self->{is_not} = shift if @_;
+    return $self->{is_not};
+}
+
+=head2 assocdate
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+#autoloaded
+
+=head2 assocdate
+
+  Usage   -
+  Returns -
+  Args    -
+
+gets/sets integer representing the date of the association (YYYYMMDD format)
+
+=cut
+
+sub assocdate {
+    my $self = shift;
+    $self->{assocdate} = shift if @_;
+    return $self->{assocdate};
+}
+
+=head2 role_group
+
+  Usage   -
+  Returns -
+  Args    -
+
+gets/sets integer to indicate which associations go together
+
+=cut
+
+sub role_group {
+    my $self = shift;
+    $self->{role_group} = shift if @_;
+    return $self->{role_group};
+}
+
+sub from_idl {
+    my $class = shift;
+    my $h = shift;
+    map {
+	$_ = GO::Model::Evidence->from_idl($_);
+    } @{$h->{"evidence_list"}};
+    $h->{"gene_product"} = 
+      GO::Model::GeneProduct->from_idl($h->{"gene_product"});
+    return $class->new($h);
+}
+
+sub to_idl_struct {
+    my $self = shift;
+    my $struct;
+    eval {
+	$struct =
+	  {
+	   "evidence_list"=>[map {$_->to_idl_struct} @{$self->evidence_list()}],
+	   "gene_product"=>$self->gene_product->to_idl_struct,
+	   "reference"=>""
+	  };
+    };
+    if ($@) {
+	print $self->dump;
+	print $@;
+	throw POA_GO::ProcessError();
+    }
+    return $struct;
+}
+
+sub to_ptuples {
+    my $self = shift;
+    my ($term, $th) =
+      rearrange([qw(term tuples)], @_);
+    my @s = ();
+    foreach my $e (@{$self->evidence_list()}) {
+        my @xids = ();
+        foreach my $x (@{$e->xref_list || []}) {
+            push(@s,
+                 $x->to_ptuples(-tuples=>$th)
+                );
+            push(@xids, $x->as_str);
+        }
+        push(@s,
+             ["assoc",
+              $term->acc,
+              $self->gene_product->xref->as_str,
+              $e->code,
+              "[".join(", ", @xids)."]",
+             ],
+             $self->gene_product->to_ptuples(-tuples=>$th),
+            );
+    }
+    @s;
+}
+
+# **** EXPERIMENTAL CODE ****
+# the idea is to be homogeneous and use graphs for
+# everything; eg gene products are nodes in a graph,
+# associations are arcs
+# cf rdf, daml+oil etc
+
+# args - optional graph to add to
+sub graphify {
+    my $self = shift;
+    my ($term, $subg, $opts) =
+      rearrange([qw(term graph opts)], @_);
+
+    $opts = {} unless $opts;
+    $subg = $self->apph->create_graph_obj unless $subg;
+
+    my $acc = sprintf("%s", $self);
+    my $t =
+      $self->apph->create_term_obj({name=>$acc,
+                                    acc=>$acc});
+    $subg->add_node($t);
+    $subg->add_arc($t, $term, "hasAssociation") if $term;
+
+    foreach my $ev (@{$self->evidence_list || []}) {
+        $ev->apph($self->apph);
+        $ev->graphify($t, $subg);
+    }
+    my $gp = $self->gene_product;
+    $gp->graphify($t, $subg);
+
+    $subg;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/CrossProduct.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/CrossProduct.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/CrossProduct.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,149 @@
+# $Id: CrossProduct.pm,v 1.2 2004/11/24 02:28:01 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::CrossProduct;
+
+=head1 NAME
+
+  GO::Model::CrossProduct;
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+for cross products - an intersection between another class/term and a
+list of anonymous subclass over some restrictions
+
+=cut
+
+
+use Carp qw(cluck confess);
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+
+sub _valid_params {
+    return qw(xp_acc parent_acc restriction_list);
+}
+
+sub get_restriction_values_for_property {
+    my $self = shift;
+    my $prop = shift;
+    my @vals = 
+      map {$_->value} grep {$_->property_name eq $prop} @{$self->restriction_list||[]};
+    return \@vals;
+}
+
+sub add_restriction {
+    my $self = shift;
+    my $r = shift;
+    if (!ref($r)) {
+        $r = $self->apph->create_restriction_obj({property_name=>$r,
+                                                  value=>shift});
+    }
+    my $rl = $self->restriction_list || [];
+    $self->restriction_list([@$rl, $r]);
+    
+    $r;
+}
+
+sub all_parent_accs {
+    my $self = shift;
+    my $restrs = $self->restriction_list;
+    return [
+	    $self->parent_acc,
+	    map { $_->value } @$restrs
+	   ];
+}
+
+sub all_parent_relationships {
+    my $self = shift;
+    my $restrs = $self->restriction_list;
+    my $xp_acc = $self->xp_acc;
+    my @hashes =
+      (
+       {acc1=>$self->parent_acc,
+	acc2=>$xp_acc,
+	type=>'is_a'
+       },
+       map { 
+	   ({
+	     acc1=>$_->value,
+	     acc2=>$xp_acc,
+	     type=>$_->property_name
+	    })
+       } @$restrs
+      );
+      
+    return [
+	    map {
+		$self->apph->create_relationship_obj($_)
+	    } @hashes
+	   ];
+}
+
+sub to_obo {
+    my $self = shift;
+    my $restrs = $self->restriction_list;
+    return
+      sprintf("cross_product: %s %s\n", 
+              $self->parent_acc,
+              join(' ',
+                   map {sprintf("(%s %s)", 
+                                $_->property_name, $_->value)} @$restrs));
+              
+    
+}
+
+sub equals {
+    my $self = shift;
+    my $xp = shift;
+#    printf "TESTING FOR EQUALITY (%s):\n", $xp->xp_acc;
+#    print $self->to_obo;
+#    print $xp->to_obo;
+    return 0 unless $self->parent_acc eq $xp->parent_acc;
+    my @r1 = @{$self->restriction_list || []};
+    my @r2 = @{$xp->restriction_list || []};
+    return 0 unless scalar(@r1) == scalar(@r2);
+
+    my @propnames = 
+      map {$_->property_name} 
+        @{$self->restriction_list||[]},
+          @{$xp->restriction_list||[]};
+    my %uniqpropnames = map{$_=>1} @propnames;
+    
+    my $ok = 1;
+    foreach my $pn (keys %uniqpropnames) {
+        
+        my @vals1 =
+          sort
+            @{$self->get_restriction_values_for_property($pn)};
+        my @vals2 =
+          sort
+            @{$xp->get_restriction_values_for_property($pn)};
+        while (@vals1) {
+            if (shift @vals1 ne shift @vals2) {
+                $ok = 0;
+            }
+        }
+        if (@vals2) {
+            $ok = 0;
+        }
+        last unless $ok;
+    }
+    return $ok;
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/DB.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/DB.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/DB.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,40 @@
+# $Id: DB.pm,v 1.1 2007/01/24 01:16:20 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::DB;
+
+=head1 NAME
+
+  GO::Model::DB;
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+Fields: name fullname datatype generic_url url_syntax url_example
+
+
+=cut
+
+
+use Carp qw(cluck confess);
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+sub _valid_params {
+    return qw(name fullname datatype generic_url url_syntax url_example);
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Evidence.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Evidence.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Evidence.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,367 @@
+# $Id: Evidence.pm,v 1.3 2005/03/08 00:30:26 sshu Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+
+package GO::Model::Evidence;
+
+=head1 NAME
+
+  GO::Model::Evidence;
+
+=head1 SYNOPSIS
+
+  my $ev_l = $association->evidence_list;
+  foreach my $ev (@$ev_l) {
+    print "Evidence for association %s : %s\n",
+      $association->gene_product->symbol,
+      $ev->code;
+  }
+
+=head1 DESCRIPTION
+
+evidence for an association
+
+see http://www.geneontology.org/GO.evidence.html
+for a list of evidence codes
+
+=cut
+
+
+use Carp qw(confess cluck);
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+
+sub _valid_params {
+    return qw(id code seq_acc xref seq_xref_list pub_xref_list);
+}
+
+=head2 code
+
+  Usage   - $ev->code("IEA");
+  Returns -
+  Args    -
+
+gets/sets the evidence code
+
+see http://www.geneontology.org/GO.evidence.html
+
+=cut
+
+# dynamic method
+
+=head2 seq_acc
+
+  Usage   -
+  Returns -
+  Args    -
+
+gets/sets the sequence accesion GO::Model::Xref
+
+ALPHA CODE  - API may change
+
+used to set the GO::Model::Xref list from a text string. eg
+
+  $ev->seq_acc("SGD:RRP41; SGDID:L0003550");
+
+will actually add two GO::Model::Xref objects
+
+This method doesnt really belong in the GO::Model::* hierarchy as it
+contains parsing code. Its a minor hack mainly due to the fact that
+this data is still denormalized in the database.
+
+=cut
+
+sub seq_acc {
+    my $self = shift;
+    if (@_) {
+        my $acc = shift;
+        if (ref($acc)) {
+            if (ref($acc) eq "ARRAY") {
+                foreach (@$acc) {
+                    $self->add_seq_xref($_);
+                }
+            }
+            else {
+                if (UNIVERSAL::isa($acc, "GO::Model::Xref")) {
+                    $self->add_seq_xref($acc)
+                }
+                else {
+                    confess("$acc is not a valid argument for $self -> seq_acc()");
+                }
+            }
+        }
+        else {
+            # it's a string
+            my @accs =
+              split(/\;/, $acc);
+            foreach my $acc (@accs) {
+                $self->add_seq_xref($acc);
+            }
+        }
+    }
+    return
+      join("; ",
+           map {$_->as_str} @{$self->seq_xref_list || []});
+}
+
+
+=head2 add_seq_xref
+
+  Usage   -
+  Returns -
+  Args    -
+
+equivalent to WITH column in gene_association files, and evidence_dbxref tables in db
+
+=cut
+
+sub add_seq_xref {
+    my $self = shift;
+    my $xref = shift;
+    if (ref($xref)) {
+        if (UNIVERSAL::isa($xref, "GO::Model::Xref")) {
+            $self->{seq_xref_list} = [] unless $self->{seq_xref_list};
+            push(@{$self->{seq_xref_list}}, $xref);
+        }
+        else {
+            confess("$xref is not a valid argument for $self -> add_seq_xref()");
+        }
+    }
+    else {
+        # string maybe in db:acc format
+        if ($xref =~ /\s*(\S+?):(\S+)/) {
+            my ($db, $acc) = ($1, $2);
+            $acc =~ s/ *$//;
+            $xref = 
+              GO::Model::Xref->new({xref_dbname=>$db,
+                                    xref_key=>$acc});
+        }
+        else {
+            $xref = 
+              GO::Model::Xref->new({xref_dbname=>"UNKNOWN",
+                                    xref_key=>"$xref"});
+        }
+        confess("Assertion error") unless $xref->isa("GO::Model::Xref");
+        $self->add_seq_xref($xref);
+    }
+}
+
+
+=head2 add_pub_xref
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub add_pub_xref {
+    my $self = shift;
+    my $xref = shift;
+    if (ref($xref)) {
+        if (UNIVERSAL::isa($xref, "GO::Model::Xref")) {
+            $self->{pub_xref_list} = [] unless $self->{pub_xref_list};
+            push(@{$self->{pub_xref_list}}, $xref);
+        }
+        else {
+            confess("$xref is not a valid argument for $self -> add_pub_xref()");
+        }
+    }
+    else {
+        # string maybe in db:acc format
+        if ($xref =~ /\s*(\S+?):(\S+)/) {
+            my ($db, $acc) = ($1, $2);
+            $acc =~ s/ *$//;
+            $xref = 
+              GO::Model::Xref->new({xref_dbname=>$db,
+                                    xref_key=>$acc});
+        }
+        else {
+            $xref = 
+              GO::Model::Xref->new({xref_dbname=>"UNKNOWN",
+                                    xref_key=>"$xref"});
+        }
+        confess("Assertion error") unless $xref->isa("GO::Model::Xref");
+        $self->add_pub_xref($xref);
+    }
+}
+
+=head2 xref
+
+  Usage   -
+  Returns -
+  Args    -
+
+gets/sets the literature or sequence reference GO::Model::Xref
+
+NOTE: at some point we may want to deprecate this method and persuade
+API client code to call
+
+  $ev->literature_xref
+
+instead, to make explicit the fact that this is a literature reference
+as opposed to a sequence reference
+
+=cut
+
+# dynamic method
+
+
+=head2 xref_list
+
+  Usage   -
+  Returns - GO::Model::Xref listref
+  Args    -
+
+returns all (sequence and literature) references
+
+=cut
+
+sub xref_list {
+    my $self = shift;
+    if (@_) {
+        confess("get only");
+    }
+    my @x = @{$self->pub_xref_list || []};
+    push(@x, @{$self->seq_xref_list || []});
+    return \@x;
+}
+
+
+=head2 xref
+
+  Usage   -
+  Returns -
+  Args    -
+
+deprected - sets first pub_xref_list
+
+=cut
+
+sub xref {
+    my $self = shift;
+    if (@_) {
+        $self->pub_xref_list([@_]);
+    }
+    $self->pub_xref_list && $self->pub_xref_list->[0];
+}
+
+
+=head2 valid_codes
+
+  Usage   - print join("; ", GO::Model::Evidence->valid_codes);
+  Returns - string array
+  Args    -
+
+list of valid evidence codes
+
+=cut
+
+sub valid_codes {
+    qw(IMP IGI IPI ISS IDA IEP IEA TAS NAS ND NR);
+}
+
+sub _initialize 
+{
+
+    my $self = shift;
+    my $paramh = shift;
+    if (!ref($paramh)) {
+	confess("init param must be hash");
+    }
+    if ($paramh->{reference}) {
+	my ($db, @keyparts) = split (/:/, $paramh->{reference});
+        # usually there is only one : in the dbxref, but
+        # MGI includes the dbname in the id, so their
+        # dbxrefs look like this:
+        # MGI:MGI:00000001
+        my $key = join(":", @keyparts);
+	if (!$key) {
+	    $key = $db;
+	    $db = "U";
+	}
+	else {
+	    ($db) =~ tr/A-Z/a-z/;
+	}
+	my $xref = 
+	  GO::Model::Xref->new({xref_key=>$key,
+				xref_dbname=>$db});
+	
+	$self->xref($xref);
+	delete $paramh->{reference};
+    }
+    $self->SUPER::_initialize($paramh);
+}
+
+sub to_idl_struct {
+    my $self = shift;
+    if (!$self->xref) {
+	confess("$self has no xref");
+    }
+    return 
+      {
+       code=>$self->code,
+       seq_acc=>$self->seq_acc,
+       dbxref=>$self->xref->to_idl_struct,
+      };
+}
+
+
+sub from_idl {
+    my $class = shift;
+    my $h = shift;
+    $h->{dbxref} = GO::Model::Xref->from_idl($h->{dbxref});
+    return $class->new($h);
+}
+
+# **** EXPERIMENTAL CODE ****
+# the idea is to be homogeneous and use graphs for
+# everything; eg gene products are nodes in a graph,
+# associations are arcs
+# cf rdf, daml+oil etc
+
+# args - optional graph to add to
+sub graphify {
+    my $self = shift;
+    my ($ref, $subg, $opts) =
+      rearrange([qw(ref graph opts)], @_);
+
+    $opts = {} unless $opts;
+    $subg = $self->apph->create_graph_obj unless $subg;
+
+    my $acc = sprintf("%s", $self);
+    my $t =
+      $self->apph->create_term_obj({name=>$acc,
+                                    acc=>$acc});
+    $subg->add_node($t);
+    $subg->add_arc($t, $ref, "hasEvidence") if $ref;
+
+    foreach my $xr (@{$self->xref_list || []}) {
+        $xr->apph($self->apph);
+        $xr->graphify($t, $subg);
+    }
+    my $code = $self->code;
+    my $cn = $subg->get_node($code);
+    if (!$cn) {
+        $cn =
+          $self->apph->create_term_obj({name=>$code,
+                                        acc=>$code});
+        $subg->add_node($cn);
+    }
+    $subg->add_arc($cn, $t, "hasCode");
+    $subg;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GeneProduct.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GeneProduct.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GeneProduct.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,448 @@
+# $Id: GeneProduct.pm,v 1.10 2006/09/14 00:43:56 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::GeneProduct;
+
+=head1 NAME
+
+  GO::Model::GeneProduct;
+
+=head1 DESCRIPTION
+
+represents a gene product in a particular species (this will
+effectively always be refered to implicitly by the gene symbol even
+though a gene may have >1 product)
+
+=cut
+
+
+use Carp;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+use Data::Dumper;
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+sub _valid_params {
+    return qw(id acc symbol properties full_name type_id type xref speciesdb synonym_list seq_list species);
+}
+
+sub _initialize 
+{
+    my $self = shift;
+    my $paramh = shift;
+
+    my $db;
+    if ($paramh->{speciesdb}) {
+	$db = $paramh->{speciesdb};
+    }
+    else {
+	$db = $paramh->{xref_dbname};
+    }
+
+    my $xref = 
+      GO::Model::Xref->new({xref_key=>$paramh->{acc},
+			    xref_keytype=>"acc",
+                            xref_dbname=>$db});
+
+    $self->xref($xref);
+    delete $paramh->{acc};
+    delete $paramh->{speciesdb};
+
+    $self->SUPER::_initialize($paramh);
+}
+
+=head2 acc
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub acc {
+    my $self = shift;
+    my $acc = shift;
+    if ($acc) {
+	$self->xref->xref_key($acc);
+    }
+    return $self->xref->xref_key;
+}
+
+
+=head2 symbol
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+# AUTOGENERATED
+
+=head2 type
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+# AUTOGENERATED
+
+=head2 full_name
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+# AUTOGENERATED
+
+=head2 as_str
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub as_str {
+    my $self = shift;
+    return "GP-".$self->xref->as_str;
+}
+
+=head2 add_synonym
+
+=cut
+
+sub add_synonym {
+    my $self = shift;
+    if (!$self->{synonym_list}) {
+	$self->{synonym_list} = [];
+    }
+    push(@{$self->{synonym_list}}, (shift));
+    return $self->{synonym_list};
+}
+
+
+=head2 synonym_list
+
+accessor: gets/set list of synonyms [array reference]
+
+=cut
+
+# AUTOGENERATED
+
+=head2 speciesdb
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub speciesdb {
+    my $self = shift;
+    my $db = shift;
+    if ($db) {
+	$self->xref->xref_dbname ($db);
+    }
+    return $self->xref->xref_dbname;
+}
+
+
+=head2 add_seq
+
+  Usage   -
+  Returns -
+  Args    - GO::Model::Seq
+
+=cut
+
+sub add_seq {
+    my $self = shift;
+    my $seq = shift;
+    
+    if ($seq->isa("Bio::SeqI")) {
+        my $bpseq = $seq;
+        $seq = GO::Model::Seq->new;
+        $seq->pseq($bpseq);
+    }
+    $seq->isa("GO::Model::Seq") or confess ("Not a seq object");
+    $self->{seq_list} = [] unless $self->{seq_list};
+
+    push(@{$self->{seq_list}}, $seq);
+    $self->{seq_list};
+}
+
+#indicate fetching seqs has been done: no need to try even if no seq (see seq_list)
+sub _seqs_obtained {
+    my $self = shift;
+    $self->{_seqs_obtained} = shift if @_;
+    return $self->{_seqs_obtained};
+}
+
+=head2 seq_list
+
+  Usage   -
+  Returns - GO::Model::Seq listref
+  Args    -
+
+=cut
+
+sub seq_list {
+    my $self = shift;
+    if (@_) {
+        $self->{seq_list} = shift;
+    }
+    else {
+        if (!defined($self->{seq_list})) {
+            $self->{seq_list} =
+              $self->apph->get_seqs({product=>$self}) unless ($self->_seqs_obtained);
+        }
+    }
+    return $self->{seq_list};
+}
+
+
+=head2 seq
+
+  Usage   -
+  Returns - GO::Model::Seq
+  Args    -
+
+returns representative sequence object for this product
+
+=cut
+
+sub seq {
+    my $self = shift;
+    my $seqs = $self->seq_list;
+    my $str = "";
+    # longest by default
+    my $longest;
+    
+    foreach my $seq (@$seqs) {
+        if (!defined($longest) || $seq->length > $longest->length) {
+            $longest = $seq;
+        }
+    }
+    return $longest;
+}
+
+=head2 properties
+
+  Usage   -
+  Returns - hashref
+  Args    - hashref
+
+=cut
+
+
+=head2 set_property
+
+  Usage   - $sf->set_property("wibble", "on");
+  Returns -
+  Args    - property key, property scalar
+
+note: the property is assumed to be multivalued, therefore
+  $sf->set_property($k, $scalar) will add to the array, and
+  $sf->set_property($k, $arrayref) will set the array
+
+=cut
+
+sub set_property {
+    my $self = shift;
+    my $p = shift;
+    my $v = shift;
+    if (!$self->properties) {
+        $self->properties({});
+    }
+    if (ref($v) eq 'ARRAY') {
+        confess("@$v is not all scalar") if grep {ref($_)} @$v;
+        $self->properties->{$p} = $v;
+    }
+    else {
+        push(@{$self->properties->{$p}}, $v);
+    }
+    # uniqify
+    my @vals = @{$self->properties->{$p}};
+    my %h = ();
+    my @nu_vals = ();
+    foreach (@vals) {
+        next if $h{$_};
+        $h{$_} = 1;
+        push(@nu_vals, $_);
+    }
+    $self->properties->{$p} = \@nu_vals;
+    $v;
+}
+
+=head2 get_property
+
+  Usage   -
+  Returns - first element of the property
+  Args    - property key
+
+=cut
+
+sub get_property {
+    my $self = shift;
+    my $p = shift;
+    if (!$self->properties) {
+        $self->properties({});
+    }
+    my $val = $self->properties->{$p};
+    if ($val) {
+        $val = $val->[0];
+    }
+    return $val;
+}
+
+=head2 get_property_list
+
+  Usage   -
+  Returns - the property arrayref
+  Args    - property key
+
+=cut
+
+sub get_property_list {
+    my $self = shift;
+    my $p = shift;
+    if (!$self->properties) {
+        $self->properties({});
+    }
+    $self->properties->{$p};
+}
+
+
+=head2 to_fasta
+
+  Usage   -
+  Returns -
+  Args    -
+
+returns the longest seq by default
+
+=cut
+
+sub to_fasta {
+    my $self = shift;
+    my ($fullhdr, $hdrinfo, $gethdr) = 
+      rearrange([qw(fullheader headerinfo getheader)], @_);
+    $hdrinfo = " " . ($hdrinfo || "");
+    my $seqs = $self->seq_list;
+    my $str = "";
+    # longest by default
+    my $longest;
+    
+    return "" unless @{$seqs || []};
+
+    foreach my $seq (@$seqs) {
+        if (!defined($longest) || $seq->length > $longest->length) {
+            $longest = $seq;
+        } 
+    }
+    $seqs = [$longest];
+    if ($gethdr) {
+      my $apph = $self->get_apph;
+      my $terms = $apph->get_terms({product=>$self});
+      my @h_elts = ();
+      foreach my $term (@$terms) {
+	my $al = $term->selected_association_list;
+	my %codes = ();
+	map { $codes{$_->code} = 1 } map { @{$_->evidence_list} } @$al;
+	push(@h_elts,
+	     sprintf("%s evidence=%s",
+		     $term->public_acc,
+		     join(";", keys %codes),
+		    )
+	    );
+      }
+      $hdrinfo = join(", ", @h_elts);
+    }
+    foreach my $seq (@$seqs) {
+        my $desc;
+        if ($fullhdr) {
+            $desc = $fullhdr;
+        }
+        else {
+            $desc =
+              sprintf("%s|%s symbol:%s %s %s %s",
+                      uc($self->xref->xref_dbname),
+                      $self->xref->xref_key,
+                      $self->symbol,
+                      $self->species ? sprintf("species:%s \"%s\"", $self->species->ncbi_taxa_id, $self->species->binomial) : '-',                      
+                      $hdrinfo,
+                      join(" ",
+                           map {$_->as_str} @{$seq->xref_list})
+                     );
+        }
+        $seq->description($desc);
+        $str.= $seq->to_fasta;
+    }
+    return $str;
+}
+
+sub to_idl_struct {
+    my $self = shift;
+    return 
+      {
+	  "symbol"=>$self->symbol,
+	  "full_name"=>$self->full_name,
+	  "acc"=>$self->xref->xref_key,
+	  "speciesdb"=>$self->xref->xref_dbname,
+      };
+}
+
+sub to_ptuples {
+    my $self = shift;
+    my ($th) =
+      rearrange([qw(tuples)], @_);
+    my @s = ();
+    push(@s,
+         ["product",
+          $self->xref->as_str,
+          $self->symbol,
+          $self->full_name,
+          ]);
+    push(@s, $self->xref->to_ptuples(-tuples=>$th));
+    @s;
+}
+
+# **** EXPERIMENTAL CODE ****
+# the idea is to be homogeneous and use graphs for
+# everything; eg gene products are nodes in a graph,
+# associations are arcs
+# cf rdf, daml+oil etc
+
+# args - optional graph to add to
+sub graphify {
+    my $self = shift;
+    my ($ref, $subg, $opts) =
+      rearrange([qw(ref graph opts)], @_);
+
+    $opts = {} unless $opts;
+    $subg = $self->apph->create_graph_obj unless $subg;
+
+    my $t =
+      $self->apph->create_term_obj({name=>$self->as_str,
+                                    acc=>$self->as_str});
+    $subg->add_node($t);
+    $subg->add_arc($t, $ref, "hasProduct");
+    return $subg;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Graph.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Graph.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Graph.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2774 @@
+# $Id: Graph.pm,v 1.24 2007/09/12 03:07:30 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+
+package GO::Model::Graph;
+
+=head1 NAME
+
+GO::Model::Graph    - a collection of relationships over terms
+
+=head1 SYNOPSIS
+
+  # FETCHING GRAPH FROM FILES
+  use GO::Parser;
+  my $parser = new GO::Parser({handler=>'obj'});
+  $parser->parse("gene_ontology.obo");     # ontology
+  $parser->parse("gene-associations.sgd"); # gene assocs
+  # get L<GO::Model::Graph> object
+  my $graph = $parser->handler->graph;
+  my $terms = $graph->term_query("/transmembrane/");  # matching terms
+  foreach my $term (@$terms) {
+    # find gene products associated to this term
+    my $assocs = $graph->deep_association_list($term->acc);
+    printf "Term: %s %s\n", $term->acc, $term->name;
+    print "  Associations (direct and via transitive closure_\n";
+    foreach my $assoc (@$assocs) {
+      next if $assoc->is_not;
+      printf "  Assoc evidence: %s to: %s %s\n",
+        join(';', map {$_->code} @{$assoc->evidence_list}),
+        $assoc->gene_product->xref->as_str,
+        $assoc->gene_product->symbol;
+    }
+  }
+
+  # -- alternatively, use this code... --
+
+  # FETCHING FROM DATABASE (requires go-db-perl library)
+  # pretty-printing a subgraph from "nuclear pore"
+  $apph = GO::AppHandle->connect(-dbname=>"$dbname");
+  $term = $apph->get_term({name=>"nuclear pore"});
+  $graph =
+	  $apph->get_graph_by_terms([$term], $depth);
+
+  $it = $graph->create_iterator;
+  # returns a GO::Model::GraphIterator object
+
+  while (my $ni = $it->next_node_instance) {
+    $depth = $ni->depth;
+    $term = $ni->term;
+    $reltype = $ni->parent_rel->type;
+    printf 
+      "%s %8s Term = %s (%s)  // number_of_association=%s // depth=%d\n",
+          "----" x $depth,
+          $reltype,
+	  $term->name,
+	  $term->public_acc,
+	  $term->n_associations || 0,
+          $depth;
+  }
+
+
+=head1 DESCRIPTION
+
+Object containing Nodes (L<GO::Model::Term> objects) and relationships
+(:<GO::Model::Relationship> objects)
+
+this may be either the whole ontology tree, or a subgraph, depending
+on how the object is instantiated.
+
+=head2 ONTOLOGY GRAPH MODEL
+
+relationships can be thought of as B<statements> or sentences of the form
+
+  SUBJECT-TERM PREDICATE OBJECT-TERM
+
+for example,
+
+  "dog" IS_A "animal"
+
+  "G-Protein coupled receptor" IS_A "transmembrane receptor"
+
+Statements have a B<subject> (i.e. the subject of the
+sentence/statement), a predicate/relationship-type and an B<object>
+(i.e. the object of the sentence/statement)
+
+Relationships can also be seen as arcs in a directed graph, with the
+subject being equivalent to the child, and the object equivalent to
+the parent. The arc is labeled with the predicate/relationship-type.
+
+perl doesnt handle bidirectional links between objects too well, so
+rather than having the relationship object know about the terms or the
+term know about the realtionships, all the graph info is in the
+Graph object
+
+the Relationship object gives you the accessions of the related terms,
+use the Graph methods to fetch these actual terms.
+
+The idea is to keep the Term & Relationship objects lightweight, and
+keep the Graph logic in the Graph object. The Graph object is
+responsible for stuff like making sure that a Term object is not
+instantiated twice if it can be reached by two different paths.
+
+Currently all graphs are acyclic, cyclic graphs may be allowed in the
+future when such relationships are added to GO/OBOA
+
+=head2 TRANSITIVE CLOSURES
+
+ graph object will calculate transitive closures for you - that is it
+will follow the path in the graph to the root or to all leafs
+
+=head2 ITERATORS
+
+Using the create_iterator and iterate methods, you can create
+"visitors" that will traverse the graph, performing actions along the
+way. Functional-style programming is encouraged, as the iterature()
+method allows for the passing of lexical closures:
+
+  $graph->iterate(sub {$term=shift->term;
+                       printf "%s %s\n", $term->acc,$term->name},
+                  {direction=>'up',
+                   acc=>"GO:0008045"})
+
+
+=head2 SEE ALSO
+
+L<go-perl>
+L<GO::Model::Term>
+L<GO::Parser>
+L<GO::AppHandle>
+
+=cut
+
+
+use Carp;
+use strict;
+use Exporter;
+use GO::Utils qw(rearrange max);
+use GO::ObjFactory;
+use GO::Model::Root;
+use GO::Model::Term;
+use GO::Model::Path;
+use GO::Model::Relationship;
+use GO::Model::GraphIterator;
+use FileHandle;
+use Exporter;
+use Data::Dumper;
+use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
+
+use base qw(GO::Model::Root Exporter);
+
+
+sub _valid_params {
+    return qw();
+}
+
+
+=head2 new
+
+  Usage   - $g = GO::Model::Graph->new;
+  Returns - GO::Model::Graph;
+  Args    - 
+
+Normally you would not create a graph object yourself - this is
+typically done for you by either a L<GO::Parser> object or a
+L<GO::AppHandle> object
+
+=cut
+
+sub _initialize {
+    my $self = shift;
+    $self->SUPER::_initialize(@_);
+    $self->{nodes_h} = {};
+    $self->{nodes_a} = {};
+    $self->{n_children_h} = {};
+    $self->{n_parents_h} = {};
+    $self->{child_relationships_h} = {};
+    $self->{parent_relationships_h} = {};
+    $self->apph(GO::ObjFactory->new) unless $self->apph;
+    return;
+}
+
+sub clone
+  {
+      my ($self) = @_;
+
+      my $new_g = GO::Model::Graph->new();
+      foreach my $key (keys(%$self))
+        {
+            my $val = $self->{$key};
+            my $val_ref = ref($val);
+            my $new_val;
+            if ($val_ref =~ /HASH/i)
+              {
+                  my %new_obj = %$val;
+                  $new_val = \%new_obj;
+              }
+            elsif ($val_ref =~ /ARRAY/i)
+              {
+                  my @new_obj = @$val;
+                  $new_val = \@new_obj;
+              }
+            else
+              {
+                  $new_val = $val;
+              }
+
+            $new_g->{$key} = $new_val;
+        }
+
+      return $new_g;
+  }
+
+
+=head2 create_iterator
+
+  Usage   - $it = $graph->create_iterator("GO:0003677")
+  Usage   - $it = $graph->create_iterator({acc=>"GO:0008045",
+                                           direction=>"up"});
+  Returns - GO::Model::GraphIterator;
+  Args    - accession no [optional] or GO::Model::Term [optional]
+
+makes a L<GO::Model::GraphIterator>, an object which traverses the
+graph
+
+=cut
+
+sub create_iterator {
+    my $self = shift;
+    my $arg = shift;
+   
+    my $h = ref($arg) ? ($arg || {}) : {acc=>$arg};
+    my $it = GO::Model::GraphIterator->new({graph=>$self, %$h});
+    if ($h->{acc}) {
+        $it->reset_cursor($h->{acc});
+    }
+    return $it;
+}
+
+
+=head2 iterate
+
+  Usage   - $graph->iterate(sub {$ni=shift;printf "%s\n", $ni->term->name});
+  Usage   - sub mysub {...}; $graph->iterate(\&mysub);
+  Returns -
+  Args    -  CODE
+
+iterates through the graph executing CODE on every
+L<GO::Model::GraphNodeInstance> object
+
+=cut
+
+sub iterate {
+    my $self = shift;
+    my $sub = shift;
+    my @args = @_;
+
+    if (!ref($sub)) {
+        $sub = eval("sub{$sub}");
+    }
+    if (!ref($sub) eq "CODE") {
+        confess("argument must be CODE not $sub");
+    }
+
+    my $it = $self->create_iterator(@args);
+    $it->no_duplicates(1);
+
+    while (my $ni = $it->next_node_instance) {
+        &$sub($ni);
+    }
+}
+
+
+=head2 term_filter
+
+  Alias   - node_filter
+  Usage   - $terms =
+               $graph->term_filter(sub {shift->term->name =~ /transmembrane/});
+  Usage   - sub mysub {...}; $graph->iterate(\&mysub);
+  Returns -   ref to an array of GO::Model::Term objects
+  Args    -  CODE
+
+iterates through the graph executing CODE on every
+L<GO::Model::GraphNodeInstance> object. If CODE returns true, that
+node will be returned
+
+=cut
+
+sub node_filter {
+    my $self = shift;
+    my $sub = shift;
+    my @args = @_;
+
+    if (!ref($sub)) {
+        $sub = eval("sub{$sub}");
+    }
+    if (!ref($sub) eq "CODE") {
+        confess("argument must be CODE not $sub");
+    }
+
+    my $it = $self->create_iterator(@args);
+    $it->compact(1);
+    
+    my @nodes = ();
+    while (my $ni = $it->next_node_instance) {
+        if (&$sub($ni)) {
+            push(@nodes, $ni->term);
+        }
+    }
+    return \@nodes;
+}
+*term_filter = \&node_filter;
+
+=head2 term_query
+
+  Usage   - $terms = $graph->term_query({name=>'/transmembrane/'});
+  Usage   - $terms = $graph->term_query({acc=>'GO:0008045'});
+  Usage   - $terms = $graph->term_query('/transmembrane/');
+  Returns - ref to an array of GO::Model::Term objects
+  Args    - hashref of constraints
+            OR name constraint as string
+
+returns a set of terms matching query constraints. If the constraint
+value is enclosed in // a regexp match will be performed
+
+constraints are ANDed. For more complex queries, use node_filter()
+
+=cut
+
+sub term_query {
+    my $self = shift;
+    my $constr = shift;
+    if (!ref($constr)) {
+        $constr = {name=>$constr};
+    }
+    # compile code for speed
+    my $code =
+      join(' && ',
+           map {
+               my $v = $constr->{$_};
+               my $op = 'eq';
+               if ($v =~ /^\/.*\/$/) {
+                   $op = '=~';
+               }
+               else {
+                   $v =~ s/\'/\\\'/g;
+                   $v = "'$v'";
+               }
+               if (GO::Model::Term->new->can($_."_list")) {
+                   sprintf('grep {$_ %s %s} @{$term->%s_list || []}',
+                           $op,
+                           $v,
+                           $_);
+               }
+               else {
+                   sprintf('$term->%s %s %s',
+                           $_,
+                           $op,
+                           $v);
+               }
+           } keys %$constr);
+    my $sub = 
+      eval "sub { my \$term=shift->term; $code}";
+    return $self->node_filter($sub);
+}
+
+
+=head2 subgraph
+
+  Usage   - my $subgraph = $graph->subgraph({acc=>"GO:0008045"});
+  Returns - GO::Model::Graph
+  Args    - as term_query()
+
+creates a subgraph of the current graph containing the terms
+returned by a term_query() call and all paths to the root
+
+=cut
+
+sub subgraph {
+    my $self = shift;
+    my $terms = $self->term_query(@_);
+    my $subgraph = 
+      $self->subgraph_by_terms($terms);
+    return $subgraph;
+}
+
+=head2 subgraph_by_terms
+
+  Usage   - my $subgraph = $graph->subgraph_by_terms($terms);
+  Usage   - my $subgraph = $graph->subgraph_by_terms($terms,{partial=>1});
+  Returns - GO::Model::Graph
+  Args    - GO::Model::Term listref
+
+creates a subgraph of the current graph containing the specified terms
+
+The path-to-top will be calculated for all terms and added to the
+subgraph, UNLESS the partial option is set; in this case a
+relationship between 
+
+=cut
+
+sub subgraph_by_terms {
+    my $self = shift;
+    my $terms = shift || [];
+    my $opt = shift || {};
+    my $g = $self->apph->create_graph_obj;
+    my %done = ();
+    my %in_set = map {$_->acc=>1} @$terms;
+    my $partial = $opt->{partial};
+    foreach my $term (@$terms) {
+        my $it = $self->create_iterator($term->acc);
+        if ($partial) {
+            $it->subset_h(\%in_set);
+        }
+        $it->direction('up');
+        while (my $ni = $it->next_node_instance) {
+            my $t = $ni->term;
+            my $rel = $ni->parent_rel;
+            $g->add_relationship($rel) if $rel;
+            # don't add term twice (but do add rel to term)
+            # don't continue past already-visited term
+            next if $done{$t->acc};
+            $done{$t->acc} = 1;
+
+            $g->add_term($t);
+        }
+    }
+    return $g;
+}
+
+=head2 get_all_nodes
+
+  Usage   - my $node_listref = $graph->get_all_nodes();
+  Synonyms- get_all_terms
+  Returns - ref to an array of GO::Model::Term objects
+  Args    - none
+
+The returned array is UNORDERED
+
+If you want the returned list ordered (eg breadth first or depth
+first) use the create_iterator() method to get a GO::Model::GraphIterator
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_all_nodes {
+    my $self = shift;
+    my ($order) = rearrange([qw(order)], @_);
+    
+    my @nodes;
+    if (!$order) {
+	@nodes = values %{$self->{nodes_h}};
+#	@nodes = @{$self->{nodes_a}};
+    }
+    else {
+	confess("not implemented yet!");
+    }
+
+    return \@nodes;
+}
+*get_all_terms = \&get_all_nodes;
+
+
+=head2 get_term
+
+  Usage   - my $term = $graph->get_term($acc);
+  Synonyms- get_node
+  Returns - GO::Model::Term
+  Args    - id
+
+  returns a GO::Model::Term object for an accession no.
+  the term must be in the Graph object
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_term {
+    my $self = shift;
+    my $acc = shift || confess "you need to provide an accession ID";
+    
+    # be liberal in what we accept - id, hashref or object
+    if (ref($acc)) {
+        if (ref($acc) eq "HASH") {
+            $acc = $acc->{acc};
+        }
+        else {
+            $acc = $acc->acc;
+        }
+    }
+    return $self->{nodes_a}->{$acc};
+}
+*get_node = \&get_term;
+
+=head2 get_term_by_name
+
+  Usage   - my $term = $graph->get_term_by_name("blah");
+  Returns - GO::Model::Term
+  Args    - string
+
+  returns a GO::Model::Term object for a name
+  the term must be in the Graph object
+
+CASE INSENSITIVE
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_term_by_name {
+    my $self = shift;
+    my $name = shift || confess;
+    
+    my @terms = grep { lc($_->name) eq lc($name) } @{$self->get_all_terms};
+    
+    if (!@terms > 1) {
+        confess(">1 term: @terms");
+    }
+    return $terms[0];
+}
+*get_node_by_name = \&get_term_by_name;
+
+=head2 get_terms_by_subset
+
+  Usage   - my $term = $graph->get_terms_by_subset("goslim_plant");
+  Returns - GO::Model::Term
+  Args    - string
+
+  returns a GO::Model::Term object for a subset
+  the term must be in the Graph object
+
+CASE INSENSITIVE
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_terms_by_subset {
+    my $self = shift;
+    my $subset = shift || confess;
+    
+    my @terms = grep { $_->in_subset($subset) } @{$self->get_all_terms};
+    
+    return \@terms;
+}
+*get_nodes_by_subset = \&get_terms_by_subset;
+
+=head2 get_top_nodes
+
+  Usage   - my $node_listref = $graph->get_top_nodes();
+  Synonyms- get_top_terms
+  Returns - ref to an array of GO::Model::Term objects
+  Args    - none
+
+usually returns 1 node - the root term
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_top_nodes {
+    my $self = shift;
+    if ($self->{_top_nodes}) {
+        return $self->{_top_nodes};
+    }
+    my @topnodes = ();
+    foreach my $node (@{$self->get_all_nodes}) {
+        my $parent_rels = $self->get_parent_relationships($node->acc);
+        my @parent_nodes = ();
+        foreach my $rel (@$parent_rels) {
+            my $node = $self->get_term($rel->acc1);
+            if ($node) {
+                push(@parent_nodes, $node);
+            }
+        }
+        if (!@parent_nodes) {
+            push(@topnodes, $node);
+        }
+    }
+    $self->{_top_nodes} = \@topnodes;
+    return \@topnodes;
+}
+*get_top_terms = \&get_top_nodes;
+
+
+=head2 get_leaf_nodes
+
+  Usage   - my $node_listref = $graph->get_top_nodes();
+  Synonyms- get_leaf_terms
+  Returns - ref to an array of GO::Model::Term objects
+  Args    - none
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_leaf_nodes {
+    my $self = shift;
+    if ($self->{_leaf_nodes}) {
+        return $self->{_leaf_nodes};
+    }
+    my @leafnodes = ();
+    foreach my $node (@{$self->get_all_nodes}) {
+	my $child_rels = $self->get_child_relationships($node->acc);
+	if (!@$child_rels) {
+	    push(@leafnodes, $node);
+	}
+    }
+    $self->{_leaf_nodes} = \@leafnodes;
+    return \@leafnodes;
+}
+*get_leaf_terms = \&get_leaf_nodes;
+
+
+
+=head2 is_leaf_node
+
+  Usage   - if ($graph->is_leaf_node($acc)) {...}
+  Returns - bool
+  Args    - accession str
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub is_leaf_node {
+    my $self = shift;
+    my $acc = shift;
+    my $child_rels = $self->get_child_relationships($acc);
+    return !@$child_rels;
+}
+*is_leaf_term = \&is_leaf_node;
+
+=head2 seed_nodes
+
+  Usage   - $nodes = $graph->seed_nodes;
+  Returns - GO::Model::Term listref
+  Args    - GO::Model::Term listref [optional]
+
+gets/sets the "seed" nodes/terms - these are the terms the Graph is
+started from, e.g. for building a node ancestory graph, the seed
+term would be the leaf of this graph, but not term that are expanded
+or collpased from the ancestory graph.
+
+This is mostly relevant if you are fetching your graphs from a
+database via go-db-perl
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub seed_nodes {
+    my $self = shift;
+    $self->{_seed_nodes} = shift if @_;
+    return $self->{_seed_nodes};
+}
+
+
+=head2 focus_nodes
+
+  Usage   - $nodes = $graph->focus_nodes;
+  Synonyms- focus_terms
+  Returns - GO::Model::Term listref
+  Args    - GO::Model::Term listref [optional]
+
+gets/sets the "focus" nodes/terms - these are the terms the Graph is
+centred around; for instance, if the graph was built around a query to
+"endoplasmic*" all the terms matching this string would be focused
+
+This is mostly relevant if you are fetching your graphs from a
+database via go-db-perl
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub focus_nodes {
+    my $self = shift;
+    $self->{_focus_nodes} = shift if @_;
+    return $self->{_focus_nodes};
+}
+*focus_terms = \&focus_nodes;
+
+=head2 is_focus_node
+
+  Usage   - if ($g->is_focus_node($term)) {..}
+  Returns - bool
+  Args    - GO::Model::Term
+
+=cut
+
+sub is_focus_node {
+    my $self = shift;
+    my $term = shift;
+    if (grep {$_->acc eq $term->acc} @{$self->focus_nodes || []}) {
+        return 1;
+    }
+    return 0;
+}
+*is_focus_term = \&is_focus_node;
+
+
+=head2 add_focus_node
+
+  Usage   - $g->add_focus_node($term)
+  Returns -
+  Args    - GO::Model::Term
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub add_focus_node {
+    my $self = shift;
+    my $term = shift;
+    if (!$self->is_focus_node($term)) {
+        push(@{$self->{_focus_nodes}}, $term);
+    }
+}
+*add_focus_term = \&add_focus_node;
+
+
+=head2 paths_to_top
+
+  Usage   - my $paths = $graph->paths_to_top("GO:0005045");
+  Returns - arrayref of GO::Model::Path objects
+  Args    -
+
+See also L<GO::Model::Path>
+
+=cut
+
+#sub FAST_paths_to_top {
+#    my $self= shift;
+#    my $acc = shift;
+#    my %is_ancestor_h = ();
+#    $self->iterate(sub {
+#                       my $ni = shift;
+#                       $is_ancestor_h->{$ni->term->acc}=1;
+#                       return;
+#                   },
+#                   {acc=>$acc,
+#                    direction=>'up'}
+#                  );
+#    print "$_\n" foreach keys %is_ancestor_h;
+#    my @root_accs =
+#      grep {!$self->n_parents($_)} (keys %is_ancestor_h);
+#    if (!@root_accs) {
+#        confess("ASSERTION ERROR: No root accs for $acc");
+#    }
+#    if (@root_accs > 1) {
+#        confess("ONTOLOGY ERROR: >1 root for $acc");
+#    }
+#    my $root_acc = shift @root_accs;
+#    my @nodes = ( {acc=>$root_acc,paths=>[]} );
+    
+#    while (@nodes) {
+#        my $node = shift @nodes;
+#        my $curr_acc = $node->{acc};
+#        my $child_rels = $self->get_child_relationships($curr_acc);
+#        foreach my $child_rel (@$child_rels) {
+#            my $child_term = $self->get_term($child_rel->acc2);
+#            my $child_acc = $child_term->acc;
+#            next unless $is_ancestor_h{$child_acc};
+            
+#        }
+#    }
+#    die 'todo';
+#}
+
+sub paths_to_top {
+    my $self= shift;
+    require GO::Model::Path;
+    my $acc=shift;
+
+    my $path = GO::Model::Path->new;
+    my @nodes = ({path=>$path, acc=>$acc});
+
+    my @paths = ();
+    while (@nodes) {
+	my $node = shift @nodes;
+	my $parent_rels = $self->get_parent_relationships($node->{acc});
+#	printf
+#	  "$node->{acc} has parents: %s\n",
+#	  join("; ", map {$_->acc} @$parents);
+	if (!@$parent_rels) {
+#	    print "PUSING PATH $node->{path}\n";
+	    push(@paths, $node->{path});
+	}
+	else {
+	    foreach my $parent_rel (@$parent_rels) {
+		my $parent = $self->get_term($parent_rel->acc1);
+                if (!$parent) {
+                    # dangling parent - do nothing
+                }
+                else {
+                    my $new_path = $node->{path}->duplicate;
+                    $new_path->add_link($parent_rel->type, $parent);
+                    push(@nodes, {path=>$new_path, acc=>$parent->acc});
+                }
+            }
+	}
+    }
+    return \@paths;
+}
+
+=head2 node_count
+
+  Usage   - my $count = $g->node_count
+  Synonyms- term_count
+  Returns - int
+  Args    -
+
+returns the number of terms/nodes in the graph
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub node_count {
+    my $self = shift;
+    return scalar(@{$self->get_all_nodes});
+}
+*term_count = \&node_count;
+
+=head2 n_associations
+
+  Usage   - my $count = $g->n_associations($acc);
+  Returns - int
+  Args    -
+
+if you parsed an association file into this graph, this will return
+the number of instances attached directly to acc
+
+See also L<GO::Model::Association>
+See also L<GO::Model::GeneProduct>
+
+=cut
+
+sub n_associations {
+    my $self = shift;
+    my $acc = shift;
+    my $term = $self->get_term($acc);
+    if ($term) {
+	return $term->n_associations
+    }
+    else {
+        confess("Don't have $acc in $self");
+    }
+}
+
+
+=head2 n_deep_associations
+
+  Usage   - my $count = $g->n_deep_associations($acc);
+  Returns - int
+  Args    -
+
+if you parsed an association file into this graph, this will return
+the number of instances attached directly to acc OR to a node subsumed
+by acc
+
+See also L<GO::Model::Association>
+See also L<GO::Model::GeneProduct>
+
+
+=cut
+
+sub n_deep_associations {
+    my $self = shift;
+    my $acc = shift;
+    my $rcterms = $self->get_recursive_child_terms($acc);
+    my $cnt = 0;
+    foreach (@$rcterms){
+        $cnt+= $self->n_associations($_->acc)
+    }
+    return $cnt;
+}
+
+
+=head2 n_children
+
+  Usage   - $n = $graph->n_children('GO:0003677');
+  Synonyms- n_sterms, n_subj_terms, n_subject_terms
+  Returns - int
+  Args    - 
+
+returns the number of DIRECT children/subject/subordinate terms
+beneath this one
+
+=cut
+
+sub n_children {
+    my $self = shift;
+    my $acc = shift;
+    if (ref($acc)) {
+        if (ref($acc) eq "HASH") {
+            confess("illegal argument: $acc");
+        }
+        $acc = $acc->acc;
+    }
+    my @tl = @{$self->get_child_terms($acc) || []};
+    if (@tl) {
+        return scalar(@tl);
+    }
+#    if ($self->{trailing_edges}) {
+#        my $edgeh = $self->{trailing_edges}->{$acc};
+#        if ($edgeh) {
+#            return scalar(keys %$edgeh);
+#        }
+#        return 0;
+#    }
+#    else {
+        if (!defined($self->{n_children_h}->{$acc})) {
+            my $term = 
+              $self->get_term($acc);
+            $term || confess("$acc not in graph $self");
+            my $tl = $term->apph->get_child_terms($term, {acc=>1});
+            $self->{n_children_h}->{$acc} = scalar(@$tl); 
+        }
+        return $self->{n_children_h}->{$acc};
+#    }
+}
+*n_sterms = \&n_children;
+*n_subj_terms = \&n_children;
+*n_subject_terms = \&n_children;
+
+=head2 n_parents
+
+  Usage   - $n = $graph->n_parents(3677);
+  Synonyms- n_oterms, n_obj_terms, n_object_terms
+  Returns - int
+  Args    - 
+
+returns the number of DIRECT parent/object/superordinate terms
+above this one
+
+=cut
+
+sub n_parents {
+    my $self = shift;
+    my $acc = shift;
+    if (ref($acc)) {
+        if (ref($acc) eq "HASH") {
+            confess("illegal argument: $acc");
+        }
+        $acc = $acc->acc;
+    }
+    if (!defined($self->{n_parents_h}->{$acc})) {
+        my $term = 
+          $self->get_term($acc);
+        $term || confess("$acc not in graph $self");
+        my $tl = $term->apph->get_parent_terms($term, {acc=>1});
+        $self->{n_parents_h}->{$acc} = scalar(@$tl); 
+    }
+    return $self->{n_parents_h}->{$acc};
+}
+*n_oterms = \&n_parents;
+*n_obj_terms = \&n_parents;
+*n_object_terms = \&n_parents;
+
+=head2 association_list
+
+  Usage   - $assocs = $g->association_list('GO:0003677')
+  Returns - listref of GO::Model::Association
+  Args    - acc (string)
+
+returns a list of association objects B<directly> attached to the
+specified term
+
+See also L<GO::Model::Association>
+
+=cut
+
+sub association_list {
+    my $self = shift;
+    my $acc = shift;
+    my $term = $self->get_term($acc);
+    if (!$term) {
+#        use Data::Dumper;
+#        print Dumper [keys %{$self->{nodes_a}}];
+#        die "no term with acc $acc";
+        return undef;
+    }
+    return $term->association_list();
+}
+
+
+=head2 get_direct_associations
+
+  Usage   -
+  Returns -
+  Args    -
+
+See also L<GO::Model::Association>
+
+=cut
+
+sub get_direct_associations {
+    my $self = shift;
+    my $acc = shift;
+    $acc = $acc->acc if ref $acc;
+    $self->association_list($acc);
+}
+
+
+=head2 deep_association_list
+
+  Usage   - $assocs = $g->association_list('GO:0003677')
+  Returns - listref of GO::Model::Association
+  Args    - acc (string)
+
+returns a list of association objects B<directly and indirectly>
+attached to the specified term. (ie assocs attached to the term or to
+terms subsumed by the specified term).
+
+See also L<GO::Model::Association>
+
+=cut
+
+sub deep_association_list {
+    my $self = shift;
+    my $acc = shift;
+    my @accs = @{$self->association_list($acc) || []};
+    push(@accs,
+	 map {@{$self->deep_association_list($_->acc)||[]}} 
+	 @{$self->get_child_terms($acc) || []});
+    return \@accs;
+}
+
+
+=head2 product_list
+
+  Usage   - $prods = $g->product_list('GO:0003677')
+  Returns - listref of GO::Model::GeneProduct
+  Args    - acc (string)
+
+returns a list of distinct gene product objects B<directly>
+attached to the specified term.
+
+See also L<GO::Model::GeneProduct>
+
+=cut
+
+sub product_list {
+     my $self = shift;
+    my $acc = shift;
+    my $assocs = $self->association_list($acc) || [];
+    my @prods = ();
+    my %ph = ();
+    foreach my $assoc (@$assocs) {
+        my $gp = $assoc->gene_product;
+        if (!$ph{$gp->xref->as_str}) {
+            push(@prods, $gp);
+            $ph{$gp->xref->as_str} = 1;
+        }
+    }
+    return [@prods];
+    
+}
+
+=head2 deep_product_list
+
+  Usage   - $prods = $g->deep_product_list('GO:0003677')
+  Returns - listref of GO::Model::GeneProduct
+  Args    - acc (string)
+
+returns a list of distinct gene product objects B<directly and indirectly>
+attached to the specified term. (ie assocs attached to the term or to
+terms subsumed by the specified term).
+
+See also L<GO::Model::GeneProduct>
+
+=cut
+
+sub deep_product_list {
+    my $self = shift;
+    my $acc = shift;
+    my $assocs = $self->deep_association_list($acc) || [];
+    my @prods = ();
+    my %ph = ();
+    foreach my $assoc (@$assocs) {
+        my $gp = $assoc->gene_product;
+        if (!$ph{$gp->xref->as_str}) {
+            push(@prods, $gp);
+            $ph{$gp->xref->as_str} = 1;
+        }
+    }
+    return [@prods];
+    
+}
+
+=head2 deep_product_count
+
+  Usage   - $n_prods = $g->deep_product_count('GO:0003677')
+  Returns - int
+  Args    - acc (string)
+
+returns a count of distinct gene product objects B<directly and
+indirectly> attached to the specified term. performs transitive
+closure. will not count gene products twice
+
+See also L<GO::Model::GeneProduct>
+
+=cut
+
+sub deep_product_count {
+    my $self = shift;
+    my $acc = shift;
+    return scalar(@{$self->deep_product_list($acc)});
+}
+
+=head2 get_relationships
+
+  Usage   - my $rel_listref = $graph->get_relationships('GO:0003677');
+  Returns - ref to an array of GO::Model::Relationship objects
+  Args    - identifier/acc (string)
+
+returns relationships which concern the specified term; the specified
+term can be the subject or object term in the relationship (ie child
+or parent)
+
+See also L<GO::Model::Relationship>
+
+=cut
+  
+sub get_relationships {
+    my $self = shift;
+    my $acc = shift || confess("You must specify an acc");
+    my $child_rel_l = $self->get_child_relationships($acc);
+    my $parent_rel_l = $self->get_parent_relationships($acc);
+    
+    return [@{$child_rel_l}, @{$parent_rel_l}];
+}
+*get_rels = \&get_relationships;
+  
+
+=head2 get_parent_relationships
+
+  Usage   - my $rel_listref = $graph->get_parent_relationships('GO:0003677');
+  Synonym - get_relationships_by_child
+  Synonym - get_relationships_by_subj 
+  Synonym - get_relationships_by_subject 
+  Synonym - get_obj_relationships 
+  Synonym - get_object_relationships
+  Returns - ref to an array of GO::Model::Relationship objects
+  Args    - identifier/acc (string)
+
+See also L<GO::Model::Relationship>
+
+=cut
+ 
+sub get_parent_relationships {
+    my $self = shift;
+    my $acc = shift || confess("You must specify an acc");
+
+    # if a term object is specified instead of ascc no, use the acc no
+    if (ref($acc) && $acc->isa("GO::Model::Term")) {
+	$acc = $acc->acc;
+    }
+
+    my $rel_h = $self->{parent_relationships_h}->{$acc};
+    return $self->get_acc_relationships ($rel_h);
+}
+*get_relationships_by_child = \&get_parent_relationships;
+*get_relationships_by_subj = \&get_parent_relationships;
+*get_relationships_by_subject = \&get_parent_relationships;
+*get_obj_relationships = \&get_parent_relationships;
+*get_object_relationships = \&get_parent_relationships;
+  
+
+=head2 get_child_relationships
+
+  Usage   - my $rel_listref = $graph->get_child_relationships('GO:0003677');
+  Synonym - get_relationships_by_parent
+  Synonym - get_relationships_by_obj 
+  Synonym - get_relationships_by_object
+  Synonym - get_subj_relationships
+  Synonym - get_subject_relationships
+  Returns - ref to an array of GO::Model::Relationship objects
+  Args    - identifier/acc (string)
+
+See also L<GO::Model::Relationship>
+
+=cut
+  
+sub get_child_relationships {
+    my $self = shift;
+    my $acc = shift || confess("You must specify an acc");
+
+    # if a term object is specified instead of ascc no, use the acc no
+    if (ref($acc) && $acc->isa("GO::Model::Term")) {
+	$acc = $acc->acc;
+    }
+
+    my $rel_h = $self->{child_relationships_h}->{$acc};
+    return $self->get_acc_relationships ($rel_h);
+}
+*get_relationships_by_parent = \&get_child_relationships;
+*get_relationships_by_obj = \&get_child_relationships;
+*get_relationships_by_object = \&get_child_relationships;
+*get_subj_relationships = \&get_child_relationships;
+*get_subject_relationships = \&get_child_relationships;
+
+=head2 get_all_relationships
+
+  Usage   -
+  Returns - GO::Model::Relationship list
+  Args    -
+
+returns all the relationships/statements in this graph
+
+See also L<GO::Model::Relationship>
+
+=cut
+
+sub get_all_relationships {
+    my $self = shift;
+    my $nl = $self->get_all_nodes;
+    [
+     map {
+         values %{$self->{child_relationships_h}->{$_->acc}}
+     } @$nl
+     ];
+}
+
+sub get_acc_relationships {
+    my $self = shift;
+    my $rel_h = shift;
+
+    my $rels = [];
+    foreach my $acc (keys (%{$rel_h})) {
+	push (@{$rels}, $rel_h->{$acc});
+    }
+    return $rels;
+}
+
+=head2 get_parent_terms
+
+  Usage   - my $term_lref = $graph->get_parent_terms($parent_term->acc);
+  Synonym - get_obj_terms
+  Synonym - get_object_terms
+  Returns - ref to array of GO::Model::Term objs
+  Args    - the accession of the query term
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_parent_terms {
+    return shift->_get_related_terms_by_type("parent", at _);
+}
+*get_obj_terms = \&get_parent_terms;
+*get_object_terms = \&get_parent_terms;
+
+
+=head2 get_parent_terms_by_type
+
+  Usage   - 
+  Synonym - get_obj_terms_by_type
+  Synonym - get_object_terms_by_type
+  Returns - ref to array of GO::Model::Term objs
+  Args    - the accession of the query term
+          - the type by which to constrain relationships
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_parent_terms_by_type {
+    return shift->_get_related_terms_by_type("parent", at _);
+}
+*get_obj_terms_by_type = \&get_parent_terms_by_type;
+*get_object_terms_by_type = \&get_parent_terms_by_type;
+
+
+=head2 get_recursive_parent_terms
+
+ Title   : get_recursive_parent_terms
+ Usage   :
+ Synonyms: get_recursive_obj_terms
+ Synonyms: get_recursive_object_terms
+ Function:
+ Example :
+ Returns : 
+ Args    : accession of query term
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_recursive_parent_terms{
+    my $self = shift;
+    my $acc = shift;
+    $self->get_recursive_parent_terms_by_type($acc, undef, @_);
+}
+*get_recursive_obj_terms = \&get_recursive_parent_terms;
+*get_recursive_object_terms = \&get_recursive_parent_terms;
+
+=head2 get_recursive_parent_terms_by_type
+
+ Title   : get_recursive_parent_terms_by_type
+ Usage   :
+ Synonyms: get_recursive_obj_terms_by_type
+ Synonyms: get_recursive_object_terms_by_type
+ Function:
+ Example :
+ Returns : 
+ Args    :
+
+if type is blank, gets all
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_recursive_parent_terms_by_type {
+    return shift->_get_recursive_related_terms_by_type("parent", at _);
+}
+*get_recursive_obj_terms_by_type = \&get_recursive_parent_terms_by_type;
+*get_recursive_object_terms_by_type = \&get_recursive_parent_terms_by_type;
+
+
+=head2 get_reflexive_parent_terms
+
+ Title   : get_reflexive_parent_terms
+ Usage   :
+ Function:
+ Example :
+ Returns : 
+ Args    : acc
+
+returns parent terms plus the term (for acc) itself
+
+[reflexive transitive closure of relationships in upward direction]
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_reflexive_parent_terms {
+   my ($self, $acc) = @_;
+   my $terms = $self->get_recursive_parent_terms($acc);
+   unshift(@$terms, $self->get_term($acc));
+   return $terms;
+}
+
+=head2 get_reflexive_parent_terms_by_type
+
+ Title   : get_reflexive_parent_terms_by_type
+ Usage   :
+ Function:
+ Example :
+ Returns : listref of terms
+ Args    : acc, type
+
+closure of relationship including the term itself
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_reflexive_parent_terms_by_type{
+   my ($self,$acc, $type) = @_;
+   my $terms = $self->get_recursive_parent_terms_by_type($acc, $type);
+   return [$self->get_term($acc), @$terms];
+}
+
+=head2 get_child_terms
+
+  Usage   - my $term_lref = $graph->get_child_terms($parent_term->acc);
+  Synonym - get_subj_terms
+  Synonym - get_subject_terms
+  Returns - ref to array of GO::Model::Term objs
+  Args    -
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_child_terms {
+    return shift->_get_related_terms_by_type("child", at _);
+}
+*get_subj_terms = \&get_child_terms;
+*get_subject_terms = \&get_child_terms;
+
+=head2 get_child_terms_by_type
+
+  Synonym - get_subj_terms_by_type
+  Synonym - get_subject_terms_by_type
+  Returns - ref to array of GO::Model::Term objs
+  Args    - the accession of the query term
+          - the type by which to constrain relationships
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_child_terms_by_type {
+    return shift->_get_related_terms_by_type("child", at _);
+}
+*get_subj_terms_by_type = \&get_child_terms_by_type;
+*get_subject_terms_by_type = \&get_child_terms_by_type;
+
+=head2 get_recursive_child_terms
+
+ Title   : get_recursive_child_terms
+ Usage   :
+ Synonyms: get_recursive_subj_terms
+ Synonyms: get_recursive_subject_terms
+ Function:
+ Example :
+ Returns : a reference to an array of L<GO::Model::Term> objects
+ Args    : the accession of the query term
+
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_recursive_child_terms{
+   my ($self,$acc, $refl) = @_;
+   $self->get_recursive_child_terms_by_type($acc, undef, $refl);
+}
+*get_recursive_subj_terms = \&get_recursive_child_terms;
+*get_recursive_subject_terms = \&get_recursive_child_terms;
+
+=head2 get_recursive_child_terms_by_type
+
+ Title   : get_recursive_child_terms_by_type
+ Usage   :
+ Synonyms: get_recursive_subj_terms_by_type
+ Synonyms: get_recursive_subject_terms_by_type
+ Function:
+ Example :
+ Returns : a reference to an array of L<GO::Model::Term> objects
+ Args    : accession, type
+
+if type is blank, gets all
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_recursive_child_terms_by_type{
+    return shift->_get_recursive_related_terms_by_type("child", at _);
+}
+*get_recursive_subj_terms_by_type = \&get_recursive_child_terms_by_type;
+*get_recursive_subject_terms_by_type = \&get_recursive_child_terms_by_type;
+
+=head2 _get_recursive_related_terms_by_type
+
+ Title   : _get_recursive_related_terms_by_type
+ Usage   :
+ Function: Obtain all relationships of the given kind and type for the
+           term identified by its accession, and recursively repeat
+           this with all parents and children as query for parent and
+           child relationships, respectively.
+
+           This is an internal method.
+ Example :
+ Returns : A reference to an array of L<GO::Model::Term> objects.
+ Args    : - the kind of relationship, either "child" or "parent"
+           - the accession of the term with which to query
+           - the type to which to constrain relationships (optional,
+             all types if left undef)
+           - TRUE if reflexive and FALSE otherwise (default FALSE)
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub _get_recursive_related_terms_by_type{
+    my ($self, $relkind, $acc, $type, $refl) = @_;
+   
+    # if a term object is specified instead of ascc no, use the acc no
+    if (ref($acc) && $acc->isa("GO::Model::Term")) {
+	$acc = $acc->acc;
+    }
+
+    my $rels = ($relkind eq "child")
+        ? $self->get_child_relationships($acc)
+        : $self->get_parent_relationships($acc);
+
+    if ($type) {
+        @$rels = grep { $_->type eq $type; } @$rels;
+    }
+
+    my $relmethod = $relkind."_acc";
+
+    my @pterms =
+      map {
+          my $term = $self->get_term($_->$relmethod());
+          my $rps = 
+            $self->_get_recursive_related_terms_by_type($relkind,
+                                                        $_->$relmethod(), 
+                                                        $type);
+          ($term, @$rps);
+      } @$rels;
+    if ($refl) {
+        @pterms = ($self->get_term($acc), @pterms);
+    }
+    return \@pterms;
+}
+
+=head2 _get_related_terms_by_type
+
+  Usage   - my $term_lref = $graph->_get_related_terms_by_type("child",$acc);
+  Returns - ref to array of GO::Model::Term objs
+
+  Args    - the kind of relationship, either "child" or "parent" 
+          - the accession of the term for which to obtain rel.ships
+          - the type by which to constrain relationships (optional,
+            defaults to all terms if left undef)
+
+This is an internal method.
+
+=cut
+
+sub _get_related_terms_by_type {
+    my ($self,$relkind,$acc,$type) = @_;
+
+    # if a term object is specified instead of ascc no, use the acc no
+    if (ref($acc) && $acc->isa("GO::Model::Term")) {
+	$acc = $acc->acc;
+    }
+
+    my $rels = ($relkind eq "child")
+        ? $self->get_child_relationships($acc)
+        : $self->get_parent_relationships($acc);
+
+    if ($type) {
+        @$rels = grep { $_->type eq $type; } @$rels;
+    }
+
+    my $relmethod = $relkind."_acc";
+
+    my @term_l = ();
+    foreach my $r (@$rels) {
+	my $t = $self->get_term($r->$relmethod());
+	if ($t) {
+	    push(@term_l, $t);
+	}
+    }
+    return \@term_l;
+}
+
+=head2 get_parent_accs_by_type
+
+  Usage   -
+  Returns -
+  Args    - acc, type
+
+=cut
+
+sub get_parent_accs_by_type {
+    my $self = shift;
+    my $term = shift;
+    my $type = shift;
+    my $rels = $self->get_parent_relationships($term);
+    return [map {$_->acc1} grep {lc($_->type) eq lc($type) } @$rels];
+}
+
+
+=head2 get_reflexive_parent_accs_by_type
+
+ Title   : get_reflexive_parent_accs_by_type
+ Usage   :
+ Function:
+ Example :
+ Returns : listref of terms
+ Args    : acc, type
+
+closure of relationship including the term itself
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub get_reflexive_parent_accs_by_type{
+   my ($self,$acc, $type) = @_;
+   my $terms = $self->get_recursive_parent_accs_by_type($acc, $type);
+   return [$acc, @$terms];
+}
+
+=head2 get_relationships_between_terms
+
+ Title   : get_relationships_between_terms
+ Usage   :
+ Function:
+ Example :
+ Returns : [] of relationships
+ Args    : parent id, child id
+
+See also L<GO::Model::Relationship>
+
+=cut
+
+sub get_relationships_between_terms{
+   my ($self, $acc1, $acc2) = @_;
+
+   my $child_rels = $self->get_child_relationships($acc1);
+   
+   return [grep {$_->acc2 eq $acc2} @$child_rels];
+}
+
+=head2 get_parent_closure_hash_by_type
+
+ Title   : get_parent_closure_hash_by_type
+ Usage   :
+ Function: given a term-acc and relationship type, will give a hash that
+           can be used to check if a term X is a parent of term Y
+ Example :
+ Returns : 
+ Args    :
+
+keys will be lower-cased
+
+=cut
+
+sub get_parent_closure_hash_by_type{
+   my ($self, $acc, $type) = @_;
+
+   my $parents = 
+     $self->get_reflexive_parent_terms_by_type($acc,
+                                               $type);
+   return {map {lc($_->name)=>1} @$parents};
+}
+
+
+=head2 add_child_relationship
+
+See also L<GO::Model::Relationship>
+
+=cut
+
+sub add_child_relationship {
+    my $self = shift;
+    confess("deprecated");
+    my ($rel) =
+      rearrange([qw(term)], @_);
+
+}
+
+
+=head2 add_parent_relationship
+
+    parent relationships are as valued as child relationships
+
+See also L<GO::Model::Relationship>
+
+=cut
+
+sub add_parent_relationship {
+    my $self = shift;
+    confess("deprecated");
+    my ($rel) =
+      rearrange([qw(term)], @_);
+}
+
+
+=head2 close_below
+
+  Usage   - $graph->close_below(3677);
+  Returns -
+  Args    - term (as acc or GO::Model::Term object)
+
+gets rid of everything below a node
+
+used by AmiGO for when a user closes a term in the graph
+
+=cut
+
+sub close_below {
+    my $self = shift;
+    my $node = shift;
+    my $if_no_parent_to_delete = shift;
+    my $acc;
+    if (ref($node)) {
+        if (ref($node) eq "ARRAY") {
+            map { $self->close_below($_) } @$node;
+            return;
+        } elsif ($node->isa('GO::Model::Term')) {
+            $acc = $node->acc;
+        } else {
+            $acc = $node->{acc};
+        }
+    }
+    else {
+        $acc = $node;
+    }
+    my $iter = $self->create_iterator($acc);
+    my @togo = ();
+    while (my $n = $iter->next_node) {
+        unless ($n->acc eq $acc) {
+            push(@togo, $n);
+        }
+    }
+    my $p = $if_no_parent_to_delete ? $acc : undef;
+    foreach my $n (@togo) {
+        $self->delete_node($n->acc, $p);
+    }
+}
+
+# add 2nd optional arg: parent acc for checking if to delete the node -- Shu
+# if there are other parent(s), do not delete the node
+sub delete_node {
+    my $self = shift;
+    my $acc = shift;
+    my $p_acc = shift;
+
+    #    delete $self->{parent_relationships_h}->{$acc};
+    #    delete $self->{child_relationships_h}->{$acc};    
+
+    # Remove the parent relationship, first from our parents...
+    my $par_rel_hashes = $self->{parent_relationships_h}->{$acc} || {};
+    my $par_rels = [grep {$_} values(%$par_rel_hashes)];
+    my $par_rel;
+    my $other_p = 0;
+    foreach $par_rel (@$par_rels) {
+        my $par_acc = $par_rel->acc1;
+        if (!$p_acc || $par_acc && $par_acc eq $p_acc) {
+            $self->{child_relationships_h}->{$par_acc}->{$acc} = undef;
+            delete $self->{child_relationships_h}->{$par_acc}->{$acc};
+        } else {
+            $other_p++;
+        }
+    }
+    # ... then from ourself
+    $self->{parent_relationships_h}->{$acc} = undef unless ($other_p);
+
+
+    # Remove the child relationship, first from our children...
+    my $child_rel_hashes = $self->{child_relationships_h}->{$acc} || {};
+    my $child_rels = [grep {$_} values(%$child_rel_hashes)];
+    my $child_rel;
+    foreach $child_rel (@$child_rels) {
+        my $child_acc = $child_rel->acc2;
+        unless ($other_p) {
+            $self->{parent_relationships_h}->{$child_acc}->{$acc} = undef;
+            delete $self->{parent_relationships_h}->{$child_acc}->{$acc};
+        }
+    }
+    # ... then from ourself
+    $self->{child_relationships_h}->{$acc} = undef unless ($other_p);
+
+    # Now delete ourself
+    unless ($other_p) {
+        delete $self->{nodes_h}->{$acc};
+        $self->{nodes_a}->{$acc} = undef;
+    }
+    # This could change the top and leaf nodes, so
+    # remove the cached values
+    $self->{_top_nodes} = undef;
+    $self->{_leaf_nodes} = undef;
+}
+sub category_term {
+    my $self= shift;
+
+    my $acc=shift;
+    my $paths = $self->paths_to_top($acc);
+    my $path = $paths->[0];
+    if (!$path || !$path->term_list) {
+	return;
+    }
+    if ($path->length < 2) {
+	return $path->term_list->[-1];
+    }
+    return $path->term_list->[-2];
+}
+
+
+=head2 find_roots
+
+  Usage   - my $terms = $graph->find_roots;
+  Returns - arrayref of GO::Model::Term objects
+  Args    -
+
+All terms withOUT a parent
+
+See also L<GO::Model::Term>
+
+=cut
+
+sub find_roots {
+    my $self= shift;
+    require GO::Model::Path;
+    
+    my $nodes = $self->get_all_nodes;
+    my @roots = ();
+    foreach my $node (@$nodes) {
+	my $ps = $self->get_parent_terms($node->acc);
+	if (!@$ps) {
+	    push(@roots, $node);
+	}
+    }
+    return \@roots;
+}
+
+
+=head2 get_all_products
+
+  Usage   -
+  Returns -
+  Args    -
+
+See also L<GO::Model::GeneProduct>
+
+
+=cut
+
+sub get_all_products {
+    my $self = shift;
+    my $nodes = $self->get_all_nodes;
+    my @prod_index = ();
+    my @prods = ();
+    foreach my $n (@$nodes) {
+        foreach my $p (@{$n->product_list}) {
+            if (!$prod_index[$p->id]) {
+            }
+        }
+    }
+}
+
+sub find_path {
+    confess;
+}
+
+sub build_matrix {
+    my $self = shift;
+    
+    my %node_lookup = ();
+    my $terms = $self->get_all_nodes;
+    foreach my $t (@$terms) {
+        $node_lookup{$t->acc} = {$t->acc => 0};
+        my $parents = $self->get_parent_terms($t->acc);
+#        foreach my $p (@$parents) {
+#            $node_lookup[$t->acc]->{$p->acc} = 1;
+#        }
+        my %h = $self->parent_dist($t->acc);
+        foreach my $k (keys %h) {
+            $node_lookup{$t->acc}->{$k} = $h{$k};
+        }
+    }
+    return %node_lookup;
+}
+
+sub parent_dist {
+    my $self = shift;
+    my $acc = shift;
+    my $dist = shift || 0;
+    $dist ++;
+    my $parents = $self->get_parent_terms($acc);
+    my %h = ();
+    foreach my $p (@$parents) {
+        $h{$p->acc} = $dist;
+        my %rh = $self->parent_dist($p->acc, $dist);
+        foreach my $k (keys %rh) {
+            # multiple parentage; take the shortest path
+            if (!defined($h{$k}) ||
+                $h{$k} > $rh{$k}) {
+                $h{$k} = $rh{$k};
+            }
+        }
+    }
+    return %h;
+}
+
+
+=head2 merge
+
+ Usage   - $g->merge($g2);
+ Returns -
+ Args    - GO::Model::Graph
+
+merges two graphs
+
+=cut
+
+sub merge {
+    my $self = shift;
+    my $g2 = shift;
+
+    foreach my $t (@{$g2->get_all_nodes}) {
+        if ($self->get_term($t->acc)) {
+        }
+        else {
+            $self->add_term($t);
+        }
+    }
+    foreach my $t (@{$g2->focus_nodes || []}) {
+        $self->add_focus_node($t);
+    }
+    foreach my $r (@{$g2->get_all_relationships}) {
+        # don't need to worry about duplicates,
+        # add_relationship unqiuifies
+        $self->add_relationship($r);
+    }
+}
+
+
+sub to_lisp {
+    my $self = shift;
+    my $term = shift;
+
+    my @parent_rels = 
+      @{$self->get_parent_relationships($term->acc) || []};
+
+    my @parents = ();
+    my @lisp_isa = (); 
+    my @lisp_partof = (); 
+      map {
+	  if ($_->is_inheritance) {
+	      push(@lisp_isa, $self->get_term($_->acc1));
+	  }
+	  else {
+	      push(@lisp_partof, $self->get_term($_->acc1));
+	  }
+	  push(@parents, $self->get_term($_->acc1));
+      } @parent_rels;
+    my $lisp = 
+      ["|".$term->lisp_acc."| T ",
+       [
+	["OCELOT::PARENTS ".
+	 (@parents ? 
+	  join("", (map {"|".$_->lisp_acc."| "} @parents)) :
+	  "OCELOT::FRAMES")
+	],
+	["DESCRIPTION \"".$term->name."\""],
+#	["DEFINITION \"".$term->description."\""],
+	@lisp_isa ? ["IS-A ".join("",map{"|".$_->lisp_acc."| "} @lisp_isa)] : "",
+	@lisp_partof ? ["PART-OF ".join("",map{"|".$_->lisp_acc."| "} @lisp_partof)] : "",
+       ],
+       "NIL",
+       ];
+
+    
+    my $lisp_term = lisp2text($lisp);
+}
+
+sub lisp2text {
+    my $arr = shift;
+    my $text = "";
+    for (my $i=0; $i<@$arr; $i++) {
+	if (ref($arr->[$i])) {
+	    $text.= lisp2text($arr->[$i]);
+	}
+	else {
+	    $text.= $arr->[$i];
+	}
+    }
+    return "($text)\n";
+}
+
+sub to_ptuples {
+    my $self = shift;
+    my ($th, $include, $sort) =
+      rearrange([qw(tuples include sort)], @_);
+    my $it = $self->create_iterator;
+    my @stmts = ();
+    my %done = ();
+    while (my $ni = $it->next_node_instance) {
+        my $term = $ni->term;
+        next if $done{$term->acc};
+        push(@stmts, $term->to_ptuples(-tuples=>$th));
+        $done{$term->acc} = $term;
+    }
+    my $rels =
+      $self->get_all_relationships;
+    push(@stmts,
+         map { $_->to_ptuples(-tuples=>$th) } @$rels);
+    unless ($include && $include->{'-assocs'}) {
+        map { printf "$_:$include->{$_};;;\n"; } keys %$include;
+        foreach my $t (values %done) {
+            my $assocs = $t->association_list || [];
+            push(@stmts,
+                 map {$_->to_ptuples(-term=>$t, -tuples=>$th) } @$assocs);
+        }
+    }
+    return @stmts;
+}
+
+=head2 export
+
+  Usage   - $graph->export({format=>$format});
+  Returns -
+  Args    - opt hash
+
+writes out the graph in any export format, including obo, go_ont, owl,
+png (graphviz) etc
+
+=cut
+
+sub export {
+    my $self = shift;
+    my $opt = shift || {};
+    my $format = $opt->{format} || 'obo';
+    delete $opt->{format};
+
+    # todo: filehandles/files
+
+    if ($format eq 'png') {
+
+        require "GO/IO/Dotty.pm";
+        my $graphviz =
+          GO::IO::Dotty::go_graph_to_graphviz( $self,
+                                                  {node => {shape => 'box'},
+                                                   %$opt,
+                                                  });
+        print $graphviz->as_png;
+    }
+    elsif ($format eq 'go_ont') {
+        # todo: tidy this up
+        $self->to_text_output(-fmt=>'gotext');
+    }
+    else {
+        my $p = GO::Parser->new({format=>"GO::Parsers::obj_emitter",
+                                 handler=>$format});
+        $p->emit_graph($self);
+    }
+    return;
+}
+
+=head2 to_xml
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub to_xml {
+    my $self = shift;
+    my $fh = shift;
+    require "GO/IO/RDFXML.pm";
+    my $out = GO::IO::RDFXML->new(-output=>$fh);
+    $out->start_document();
+    $out->draw_node_graph($self, @_);
+    $out->end_document();
+}
+
+sub to_obo {
+    my $self = shift;
+    my $fh = shift;
+    require "GO/Handlers/OboOutHandler.pm";
+    my $out = GO::Handlers::OboOutHandler->new(-output=>$fh);
+    $out->g($self);
+    $out->out;
+}
+
+sub add_path {
+    my $self = shift;
+    my $path = shift;
+
+    die 'TODO';
+    my $links = $path->link_list;
+    for (my $i=0; $i<@$links; $i+=2) {
+	my $t = $links->[$i+1];
+        $self->add_term($t);
+        $self->add_relationship(); # TODO
+    }
+}
+
+
+=head2 add_term
+
+ Usage   - $g->add_term($term)
+ Returns - 
+ Args    - GO::Model::Term
+
+=cut
+
+sub add_term {
+    my $self = shift;
+    my $term = shift;
+    if (!ref($term)) {
+	confess("Term must be either hashref or Term object");
+    }
+    if (ref($term) eq 'HASH') {
+#        $term = $self->apph->create_term_obj($term);
+        $term = GO::Model::Term->new($term);
+    }
+    my $acc = $term->acc;
+    $acc or confess ("$term has no acc");
+    $self->{nodes_a}->{$acc} = $term;
+    $self->{nodes_h}->{$acc} = $self->{nodes_a}->{$acc};
+    $term;
+}
+
+=head2 add_node
+
+  Usage   -
+  Returns -
+  Args    -
+
+synonym for add_term
+
+=cut
+
+*add_node = \&add_term;
+
+=head2 add_relationship
+
+  Usage   - $graph->add_relationship({acc1=>from_id, acc2=>to_id});
+  Usage   - $graph->add_relationship($from_id, $to_id, $type});
+  Usage   - $graph->add_relationship($obj, $subj, $type});
+  Returns -
+  Args    -
+
+only one relationship between id1 and id2 is allowed
+
+See also L<GO::Model::Relationship>
+
+
+=cut
+
+sub add_relationship {
+    my $self = shift;
+    my ($rel) = @_;
+
+    if (ref($rel) eq "HASH") {
+	$rel = GO::Model::Relationship->new($rel);
+    }
+    if (UNIVERSAL::isa($rel, "GO::Model::Relationship")) {
+    }
+    else {
+	my ($from_id, $to_id, $type) = @_;
+        if (ref($from_id)) {
+            if (UNIVERSAL::isa($from_id, "GO::Model::Term")) {
+                my $term1 = $from_id;
+                if ($term1->acc) {
+                    $from_id = $term1->acc;
+                }
+                else {
+                    $from_id = sprintf("%s", $term1);
+                }
+            }
+        }
+        if (ref($to_id)) {
+            if (UNIVERSAL::isa($to_id, "GO::Model::Term")) {
+                my $term2 = $to_id;
+                if ($term2->acc) {
+                    $to_id = $term2->acc;
+                }
+                else {
+                    $to_id = sprintf("%s", $term2);
+                }
+            }
+        }
+        $from_id || confess("did not specify a from id, only @_");
+        $to_id || confess("did not specify a to id, only @_");
+	$rel = GO::Model::Relationship->new({acc1=>$from_id, acc2=>$to_id});
+        $rel->type($type || 'is_a');
+    }
+#    if (!ref($rel)) {
+#	my ($from_id, $to_id, $type) = @_;
+#	$rel = GO::Model::Relationship->new({acc1=>$from_id, acc2=>$to_id});
+#        $rel->type($type);
+#    }
+#    if (ref($rel) eq "HASH") {
+#	$rel = GO::Model::Relationship->new($rel);
+#    }
+
+    $rel->acc1 || confess($rel);
+    $rel->acc2 || confess($rel);
+
+    if ($rel->complete) {
+        # EXPERIMENTAL:
+        #  an OWL/DL style logical definition (N+S conditions) is stored in the DAG as
+        #  normal Relationships but with the 'completes' tag set to true
+        #
+        #  e.g. for a logical def of "larval locomotory behaviour"
+        #     genus: locomotory behavior
+        #     differentia: during larval_stage
+        #
+        #  we would have 2 Relationships, one an is_a link to locomotory behavior
+        #    the other a during link to larval_stage (eg from fly_anatomy)
+        #  both these would be tagged complete=1
+        #  - note this is in *addition* to existing links (N conditions)
+        #
+        #  calling this method removes the logical def links and creates
+        #  a logical definition object
+        my $term = $self->get_term($rel->acc2);
+        my $ldef = $term->logical_definition;
+        if (!$ldef) {
+            $ldef = $self->apph->create_logical_definition_obj;
+            $term->logical_definition($ldef);
+        }
+        my $oacc = $rel->acc1;
+        my $type = $rel->type;
+        if ($type ne 'is_a') {
+            $ldef->add_intersection([$type,$oacc]);
+        }
+        else {
+            $ldef->add_intersection([$oacc]);
+        }
+        return;
+    }
+
+    # add an index going from parent to child
+    if (!$self->{child_relationships_h}->{$rel->acc1}) {
+        $self->{child_relationships_h}->{$rel->acc1} = {};
+    }
+    $self->{child_relationships_h}->{$rel->acc1}->{$rel->acc2} = $rel;
+
+    # add an index going from child to parent
+    if (!$self->{parent_relationships_h}->{$rel->acc2}) {
+        $self->{parent_relationships_h}->{$rel->acc2} = {};
+    }
+    $self->{parent_relationships_h}->{$rel->acc2}->{$rel->acc1} = $rel;
+
+}
+
+*add_arc = \&add_relationship;
+
+sub get_term_properties {
+    my $self = shift;
+    my $acc = shift;
+    if (ref($acc)) {
+        # term obj?
+        $acc = $acc->acc;
+    }
+    my $parents = $self->get_recursive_parent_terms_by_type($acc, 'is_a', 1);
+    return [map {@{$_->property_list || []}} @$parents];
+}
+
+sub get_all_properties {
+    my $self = shift;
+    my $terms = $self->get_all_terms;
+    my @props = map {@{$_->property_list || []}} @$terms;
+    my %ph = map {$_->name => $_} @props;
+    return [values %ph];
+}
+
+sub cross_product_index {
+    my $self = shift;
+    $self->{_cross_product_index} = shift if @_;
+    $self->{_cross_product_index} = {} unless $self->{_cross_product_index};
+    return $self->{_cross_product_index};
+}
+
+sub add_cross_product {
+    my $self = shift;
+    my $xp_acc = shift;
+    my $xp;
+    if (ref($xp_acc)) {
+        $xp = $xp_acc;
+        $xp_acc = $xp->xp_acc;
+    }
+    else {
+        my $parent_acc = shift;
+        my $restrs = shift;
+        $xp = $self->apph->create_cross_product_obj({xp_acc=>$xp_acc,
+                                                        parent_acc=>$parent_acc,
+                                                        restriction_list=>$restrs});
+    }
+    $self->cross_product_index->{$xp_acc} = $xp;
+    return $xp;
+}
+
+sub get_cross_product {
+    my $self = shift;
+    my $xp_acc = shift;
+    return $self->cross_product_index->{$xp_acc};
+}
+
+sub get_term_by_cross_product {
+    my $self = shift;
+    my $xp = shift;
+    my $cpi = $self->cross_product_index;
+    my @xp_accs = keys %$cpi;
+    my $term;
+    foreach my $xp_acc (@xp_accs) {
+        my $curr_xp = $cpi->{$xp_acc};
+        if ($xp->equals($curr_xp)) {
+            $term = $self->get_term($xp_acc);
+            last;
+        }
+    }
+    return $term;
+}
+
+sub create_subgraph_by_term_type {
+    my $self = shift;
+    my $tt = shift;
+    
+    my $g = $self->apph->create_graph_obj;
+    my $terms = $self->get_all_terms;
+    foreach my $t (@$terms) {
+        next unless $t->type eq $tt;
+        $g->add_term($t);
+        $g->add_relationship($_)
+          foreach @{$self->get_relationships($t->acc)};
+        my $xp = $self->get_cross_product($t->acc);
+        $g->add_cross_product($xp) if $xp;
+    }
+    return $g;
+}
+
+sub add_trailing_edge {
+    my $self = shift;
+    my $acc = shift;
+    my $id = shift;
+    if (!$self->{trailing_edges}) {
+       $self->{trailing_edges} = {}; 
+    }
+    if (!$self->{trailing_edges}->{$acc}) {
+        $self->{trailing_edges}->{$acc} = {};
+    }
+    $self->{trailing_edges}->{$acc}->{$id} = 1;
+}
+
+sub infer_logical_definitions {
+    my $self = shift;
+    my $terms = $self->get_all_terms;
+    $self->infer_logical_definition_for_term($_->acc)
+      foreach @$terms;
+}
+
+# EXPERIMENTAL:
+#  an OWL/DL style logical definition (N+S conditions) is stored in the DAG as
+#  normal Relationships but with the 'completes' tag set to true
+#
+#  e.g. for a logical def of "larval locomotory behaviour"
+#     genus: locomotory behavior
+#     differentia: during larval_stage
+#
+#  we would have 2 Relationships, one an is_a link to locomotory behavior
+#    the other a during link to larval_stage (eg from fly_anatomy)
+#  both these would be tagged complete=1
+#  - note this is in *addition* to existing links (N conditions)
+#
+#  calling this method removes the logical def links and creates
+#  a logical definition object
+sub infer_logical_definition_for_term {
+    my $self = shift;
+    my $acc = shift;
+    my $term = $self->get_term($acc);
+    my $parent_rels = $self->get_parent_relationships($acc);
+    my @isects = grep {$_->complete} @$parent_rels;
+    warn("assertion warning: $acc has 1 logical def link") if @isects == 1;
+    return unless @isects > 1;
+    my $ldef;
+    if (@isects) {
+        $ldef = $self->apph->create_logical_definition_obj;
+        $term->logical_definition($ldef);
+        foreach my $isect (@isects) {
+            # hack: todo; test if genuinely anonymous
+            my $oacc = $isect->object_acc;
+            my $rel = $isect->type;
+            if ($rel ne 'is_a') {
+                $ldef->add_intersection([$_->type,$oacc]);
+            }
+            else {
+                $ldef->add_intersection([$oacc]);
+            }
+        }
+    }
+    return $ldef;
+    
+}
+
+sub set_category {
+    my ($self, $id, $category) = @_;
+}
+
+sub add_obsolete_pointer {
+    my ($self, $id, $obsolete_id) = @_;
+}
+
+sub add_synonym {
+    my ($self, $id, $synonym) = @_;
+}
+
+sub add_dbxref {
+    my ($self, $id, $dbxref) = @_;
+}
+
+
+sub tab {
+    my $tab = shift;
+    my $tc = shift || "  ";
+    print $tc x $tab;
+}
+
+sub _rel_prefix {
+    my $self = shift;
+    my $rel = shift;
+    my %th = qw(is_a % part_of < develops_from ~ isa % partof < developsfrom ~);
+    return $th{lc($rel->type)} || '@'.$rel->type.":";
+}
+
+
+=head2 add_buckets
+
+ Usage   -
+ Returns -
+ Args    -
+
+adds bucket terms to non-leaf nodes
+
+this is useful for making GO slims
+
+=cut
+
+sub add_buckets {
+    my $self = shift;
+    my ($idspace) =
+      rearrange([qw(idpsace)], @_);
+    my $terms = $self->get_all_nodes;
+    my $id = 1;
+    $idspace = $idspace || "slim_temp_id";
+    foreach my $term (@$terms) {
+        if (!$self->is_leaf_node($term->acc)) {
+	    #printf STDERR "adding bucket for %s\n", $term->acc;
+            my $t = $self->apph->create_term_obj;
+	    # start name with Z to force last alphabetic placement
+            $t->name("Z-OTHER-".$term->name);
+            $t->acc("$idspace:$id");
+            $id++;
+            $self->add_term($t);
+            $self->add_relationship($term,
+				    $t,
+				    "bucket");
+        }
+    }
+    return;
+}
+
+
+=head2 to_text_output
+
+  Usage   -
+  Returns -
+  Args    - fmt, assocs [bool]
+
+hacky text output
+
+this method should probably move out of the model code
+into output adapters
+
+=cut
+
+sub to_text_output {
+    my $self = shift;
+    my ($fmt, $show_assocs, $fh, $disp_filter, $it, $opts, $suppress) = 
+      rearrange([qw(fmt assocs fh disp_filter it opts suppress)], @_);
+
+    $fmt = $fmt || "gotext";
+    $fh = $fh || \*STDOUT;
+
+    $opts = {} unless $opts;
+    $it = $self->create_iterator unless $it;
+    $it->no_duplicates(1);
+    if ($opts->{isa_only}) {
+        $it->reltype_filter("is_a");
+    }
+    if ($fmt eq "gotext") {
+        while (my $ni = $it->next_node_instance) {
+            my $depth = $ni->depth;
+            my $term = $ni->term;
+            next if $term->is_relationship_type;
+            my $parent_rel = $ni->parent_rel;
+            my $line = " " x $depth;
+            my $prefix = 
+              $ni->parent_rel ? $self->_rel_prefix($ni->parent_rel) : "\$";
+            $line .= 
+              $term->to_text(-prefix=>$prefix,
+                             -escape=>1,
+			     -suppress=>$suppress,
+                         );
+
+            my $parents =
+              $self->get_parent_relationships($term->acc);
+            my @others = @$parents;
+            if ($parent_rel) {
+                @others = grep {$_->acc1 ne $parent_rel->acc1} @$parents;
+                if ($disp_filter) {
+                    my %filh = ();
+                    $disp_filter = [$disp_filter] unless ref($disp_filter);
+                    %filh = map {lc($_)=>1} @$disp_filter;
+                    @others = grep { $filh{lc($_->type)} } @others;
+                }
+            }
+            foreach my $rel (@others) {
+                my $prefix =
+                  $self->_rel_prefix($rel);
+                my $n =
+                  $self->get_term($rel->acc1);
+                next unless $n;   # not in graph horizon
+                $line .=
+                  sprintf(" %s %s ; %s",
+                          $prefix,
+                          $n->name,
+                          $n->public_acc);
+            }
+            if ($opts->{show_counts}) {
+                $line.= " [gps: ".$term->n_deep_products."]";
+                if ($opts->{grouped_by_taxid}) {
+                    my $sh = $opts->{species_hash} || {};
+                    my $n_by_tax = $term->n_deep_products_grouped_by_taxid;
+                    my @taxids = sort {$n_by_tax->{$b} <=> $n_by_tax->{$a}} keys %$n_by_tax;
+                    # arbitrarily select first 10...
+                    my @staxids = splice(@taxids,0,10);
+                    $line .= " by_tax=";
+                    foreach (@staxids) {
+                        my $sn = $_;
+                        my $sp = $sh->{$_};
+                        if ($sp && $sp->binomial) {
+                            $sn = $sp->binomial;
+                        }
+                        $line .= " $sn:$n_by_tax->{$_}"
+                    }
+                }
+            }
+            $line .= "\n";
+            if ($show_assocs && $self->is_focus_node($term)) {
+                my $al = $term->association_list;
+                foreach my $a (@$al) {
+                    $line .= " " x $depth;
+                    $line.= 
+                      sprintf("  * %s %s %s %s\n",
+                              $a->gene_product->symbol,
+                              $a->gene_product->full_name,
+                              $a->gene_product->acc,
+                              join("; ", map {$_->code} @{$a->evidence_list})
+                             ),
+                         }
+            }
+            print $fh "$line";
+        }
+    }
+    elsif ($fmt eq 'tree') {
+        while (my $ni = $it->next_node_instance) {
+            my $depth = $ni->depth;
+            my $term = $ni->term;
+            my $rtype = $ni->parent_rel ? $ni->parent_rel->type : " ";
+            my $line = " " x $depth;
+            $line .= 
+              sprintf("[%s] ", uc(substr($rtype,0,1)));
+            $line .= $term->name;
+            print $fh "$line\n";
+        }
+    }
+    elsif ($fmt eq "triples") {
+        my @nodes = @{$self->get_all_nodes};
+        my $line = "";
+        while (my $term = shift @nodes) {
+            my $parents =
+              $self->get_parent_relationships($term->acc);
+            foreach my $rel (@$parents) {
+                my $p =
+                  $self->get_term($rel->acc1);
+                next unless $p;   # not in graph horizon
+                $line .=
+                  sprintf("(\"%s\" %s \"%s\")\n",
+                          $term->name,
+                          $rel->type,
+                          $p->name);
+            }
+            print $fh "$line";
+        }
+    }
+    else {
+        while (my $ni = $it->next_node_instance) {
+            my $term = $ni->term;
+            next if $term->is_relationship_type;
+            my $depth = $ni->depth;
+            my $parent_rel = $ni->parent_rel;
+            tab($depth, $self->is_focus_node($term) ? "->" : "  ");
+            my %th = qw(isa % partof < developsfrom ~);
+            printf $fh
+              "%2s Term = %s (%s)  // products=%s // $depth\n",
+                $ni->parent_rel ? $th{$ni->parent_rel->type} : "",
+                  $term->name,
+                    $term->public_acc,
+                      $term->n_deep_products || 0,
+                        $depth,
+                          ;
+            if ($show_assocs && $self->is_focus_node($term)) {
+                my $al = $term->association_list;
+                foreach my $a (@$al) {
+                    tab $depth;
+                    printf $fh "\t* %s %s %s\n",
+                      $a->gene_product->symbol,
+                        $a->gene_product->full_name,
+                          $a->gene_product->acc,
+                            join("; ", map {$_->code} @{$a->evidence_list}),
+                        }
+            }
+        }
+    }    
+}
+
+
+#Removes a node and connects the parents directly
+#to the children.  It is a tricky question which
+#rel_type to use for the new connection (the parent
+#and childs rel_types might be different).  For
+#now I just use the childs, but this may need to
+#be revisited.
+sub delete_node_with_reconnect {
+    my $self = shift;
+    my $acc = shift;
+
+    #print "<PRE>\t\t=-=-= Removing $acc</PRE>\n";
+
+    # First adjust the child and parent relationships
+    my $par_rel_hashes = $self->{parent_relationships_h}->{$acc} || {};
+    my $par_rels = [grep {$_} values(%$par_rel_hashes)];
+    my $child_rel_hashes = $self->{child_relationships_h}->{$acc} || {};
+    my $child_rels = [grep {$_} values(%$child_rel_hashes)];
+
+    my ($par_rel, $child_rel);
+    foreach $par_rel (@$par_rels) {
+        my $par_acc = $par_rel->acc1;
+        my $par_type = $par_rel->type;
+        foreach $child_rel (@$child_rels) {
+            my $child_acc = $child_rel->acc2;
+            my $child_type = $child_rel->type;
+
+            # There's a heirarchy of types
+            my $rel_type = $child_type;
+            #qw(isa partof developsfrom);
+
+            #print "<PRE>\t\t=-=-=\t\t  Adding $par_acc -> $child_acc ($rel_type)</PRE>\n";
+            $self->add_relationship({acc1=>$par_acc,
+                                     acc2=>$child_acc,
+                                     type=>$rel_type});
+        }
+    }
+
+    # And get rid of the node itself
+    $self->delete_node($acc);
+}
+
+
+sub DEPRECATED_sub_graph {
+  my ($self, $terms) = @_;
+
+  # Output a clone of the graph
+  my $subg = $self->clone;
+
+  my $it = $subg->create_iterator();
+  my $ni;
+  while ($ni = $it->next_node_instance)
+    {
+      my $term = $ni->term;
+      my $term_name = $term->name;
+      my $acc = $term->public_acc;
+      $subg->delete_node_with_reconnect($acc) unless (grep {$_->public_acc eq $term->public_acc} @$terms);
+      #print_debug_line("Keeping term \"$term_name\" in graph") if (grep {$_->public_acc eq $term->public_acc} @$terms);
+    }
+
+  return $subg;
+}
+
+sub max_depth
+  {
+    my ($self) = @_;
+
+    my $it = $self->create_iterator();
+
+    my $max_d = 0;
+    my $ni;
+    while ($ni = $it->next_node_instance)
+      {
+        my $depth = $ni->depth;
+        $max_d = max($max_d, $depth);
+      }
+
+    return $max_d;
+  }
+
+sub split_graph_by_re {
+    my ($acc, $re, $rtype, $orthogroot) =
+      rearrange([qw(acc re rtype re orthogroot)], @_);
+    my $func = sub {$_=shift->name;/$re/;print STDERR "$re on $_;xx=$1\n";($1)};
+    shift->split_graph_by_func($acc,$func,$rtype,$orthogroot);
+}
+
+sub split_graph_by_func {
+    my $self = shift;
+    my ($acc, $func, $rtype, $orthogroot) =
+      rearrange([qw(acc func rtype re orthogroot)], @_);
+#    my $ng = ref($self)->new;
+    my $ng = $self->apph->create_graph_obj;
+
+    my $new_acc = $self->apph->new_acc;
+    my $root = $self->get_term($acc);
+#    $ng->add_term($root);
+    my $it = $self->create_iterator($acc);
+    my %h = ();
+    while (my $ni = $it->next_node_instance) {
+        my $term = $ni->term;
+        my $rel = $ni->parent_rel;
+        next unless !$rel || lc($rel->type) eq "is_a";
+        my ($n) = &$func($term);
+#        my $t1 = GO::Model::Term->new({name=>$n1});
+#        my $t2 = GO::Model::Term->new({name=>$n});
+        my $t2;
+        $t2 = $self->apph->get_term({search=>$n});
+        if (!$t2) {
+            print STDERR "$n not found; checking graph\n";
+            my $all = $ng->get_all_nodes;
+            ($t2) = grep { $_->name eq $n } @$all;
+        }
+        if (!$t2) {
+            print STDERR "$n not found; creating new\n";
+            $t2 = $self->apph->create_term_obj({name=>$n});
+            $t2->type("new");
+            $t2->acc($new_acc++);
+        }
+        $h{$term->acc} = $t2;
+
+        # original term now gets flattened in main graph
+        $ng->add_term($term);
+#        $ng->add_relationship($root->acc, $term->acc, $rel->type) if $rel;
+        if ($rel) {
+            $ng->add_relationship($rel->acc1, $term->acc, $rel->type) if $rel->acc1;
+        }
+
+        # this part gets externalised and the relationship
+        # gets preserved here
+        $ng->add_term($t2);
+        if ($rel) {
+            my $np = $h{$rel->acc1};
+            if ($np) {
+                # new externalised ontology
+                $ng->add_relationship($np->acc, $t2->acc, $rel->type);
+                # x-product
+                $ng->add_relationship($t2->acc, $term->acc, $rtype);
+            }
+        }
+    }
+    return $ng;
+}
+
+sub store {
+    my $self = shift;
+    foreach my $t (@{$self->get_all_nodes}) {
+        $self->apph->add_term($t);
+    }
+    foreach my $r (@{$self->get_all_relationships}) {
+        $self->apph->add_relationship($r);
+    }
+}
+
+# **** EXPERIMENTAL CODE ****
+# the idea is to be homogeneous and use graphs for
+# everything; eg gene products are nodes in a graph,
+# associations are arcs
+# cf rdf, daml+oil etc
+sub graphify {
+    my $self = shift;
+    my ($subg, $opts) =
+      rearrange([qw(graph opts)], @_);
+
+    $opts = {} unless $opts;
+    $subg = $self unless $subg;
+
+    foreach my $term (@{$self->get_all_nodes}) {
+        $term->graphify($subg);
+    }
+    $subg;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GraphIterator.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GraphIterator.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GraphIterator.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,442 @@
+# $Id: GraphIterator.pm,v 1.8 2006/01/12 20:25:19 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+
+package GO::Model::GraphIterator;
+
+=head1 NAME
+
+  GO::Model::GraphIterator;
+
+=head1 SYNOPSIS
+
+  $it = $graph->create_iterator;
+  # returns a GO::Model::GraphIterator object
+
+  while (my $ni = $it->next_node_instance) {
+    $depth = $ni->depth;
+    $term = $ni->term;
+    $reltype = $ni->parent_rel->type;
+    printf 
+      "%s %8s Term = %s (%s)  // depth=%d\n",
+          "----" x $depth,
+          $reltype,
+	  $term->name,
+	  $term->public_acc,
+          $depth;
+  }
+
+=head1 DESCRIPTION
+
+=head1 SEE ALSO
+
+L<GO::Model::Graph>
+
+L<GO::Model::GraphNodeInstance>
+
+=cut
+
+
+use Carp;
+use strict;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Graph;
+use GO::Model::GraphNodeInstance;
+use FileHandle;
+use Exporter;
+use Data::Dumper;
+use vars qw(@EXPORT_OK %EXPORT_TAGS);
+
+use base qw(GO::Model::Root Exporter);
+
+sub _valid_params {
+    return qw(graph acc order sort_by sort_by_list noderefs direction no_duplicates reltype_filter visited arcs_visited compact subset_h);
+}
+
+=head2 order
+
+  Usage   - $graphiter->order("breadth");
+  Returns - string
+  Args    - string
+
+gets/sets traversal order; breadth or depth; default is depth
+
+=cut
+
+=head2 direction
+
+  Usage   - $graphiter->direction("up");
+  Returns - string
+  Args    - string
+
+gets/sets direction; default is "down"
+
+=cut
+
+=head2 compact
+
+  Usage   - $graphiter->compact(1);
+  Returns - bool
+  Args    - bool
+
+set this if you dont want relationships to be traversed twice;
+this gives a more compact tree representation of the graph
+
+=cut
+
+=head2 reltype_filter
+
+  Usage   - $graphiter->reltype_filter(qw(is_a part_of))
+  Returns - array
+  Args    - array
+
+by default, all relationship types are treated as transitive, and will
+be traversed by the iterator
+
+sometimes you dont want to traverse all relations, even if they are
+transitive. For example, when answering the query "find all genes
+expressed in the embryo" you way want subtypes of embryo and parts of
+the embryo but not things that develop_from the embryo.
+
+For more details, see
+L<http://sourceforge.net/mailarchive/forum.php?thread_id=9448679&forum_id=43082>
+
+=cut
+
+sub _initialize {
+    my $self = shift;
+    my $acc;
+    if (!ref($_[0])) {
+        $acc = shift;
+    }
+    $self->SUPER::_initialize(@_);
+    $acc = $self->acc unless $acc;
+    $self->reset_cursor($acc);
+}
+
+
+=head2 reset_cursor
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub reset_cursor {
+    my $self = shift;
+    my $acc = shift;
+    
+    $self->visited({});
+    $self->arcs_visited({});
+    my $terms;
+    if ($acc) {
+        $terms = [$self->graph->get_term($acc) || confess("$acc not in graph")];
+    }
+    else {
+        if (!$self->direction || $self->direction ne "up") {
+            $terms = $self->graph->get_top_nodes;
+        }
+        else {
+            $terms = $self->graph->get_leaf_nodes;
+        }
+    }
+
+    my $sort_by = $self->sort_by || "alphabetical";
+    my $sort_by_list = $self->sort_by_list || [];
+    #    print "<PRE>sort_by_list has ".scalar(@$sort_by_list)." elements , number of terms to sort = ".scalar(@$terms)."</PRE>\n"
+    #      if ($sort_by eq 'pos_in_list');
+    my %fh = 
+      (
+       "alphabetical" => sub {lc($a->name) cmp lc($b->name)},
+       "pos_in_list" => sub {_sortby_pos_in_list($sort_by_list, $a, $b)}
+      );
+    my $sortf = $fh{$sort_by};
+    confess("Dont know $sort_by") unless $sortf;
+    my @sorted_terms = sort $sortf @$terms;
+
+    my @noderefs =
+      map { 
+          GO::Model::GraphNodeInstance->new({term=>$_, depth=>0}) 
+        } @sorted_terms;
+    $self->noderefs(\@noderefs);
+}
+
+
+=head2 next_node
+
+  Usage   -
+  Returns - GO::Model::Term
+  Args    -
+
+=cut
+
+sub next_node {
+    my $self = shift;
+    my $ni = $self->next_node_instance;
+    return $ni ? $ni->term : undef;
+}
+
+
+=head2 next_node_instance
+
+  Usage   -
+  Returns - GO::Model::GraphNodeInstance
+  Args    -
+
+=cut
+
+sub next_node_instance {
+    my $self = shift;
+    if (!$self->noderefs) {
+        $self->reset_cursor;
+    }
+    my $noderefs = $self->noderefs;
+    if (!@$noderefs) {
+        return;
+    }
+    my $order = $self->order || "depth";
+    my $noderef = shift @$noderefs;
+    my $term = $noderef->term;
+    my $depth = $noderef->depth;
+    my @child_relns = ();
+    my $dir = 
+      (!$self->direction || $self->direction ne "up") ? "down" : "up";
+
+    # default is to traverse a distance of 1 in the DAG
+    # however, if subset_h is set, we want to traverse the
+    # transitive distance to the next node in the specified subset
+    my $subset_h = $self->subset_h;
+    my @accs = ($term->acc);   # current IDs
+
+    # iterate to next node - usually just 1 iteration, unless subset_h is set
+    while (@accs) {
+        my @this_child_relns = ();
+        my $acc = shift @accs;
+        if ($dir eq "down") {
+            @this_child_relns = 
+              @{$self->graph->get_child_relationships($acc)};
+            if ($subset_h) {
+                @this_child_relns =
+                  grep {
+                      if ($subset_h->{$_->acc2}) {
+                          $_->acc1($term->acc);
+                          1;
+                      }
+                      else {
+                          push(@accs, $_->acc2);
+                          0;
+                      }
+                  } @this_child_relns;
+            }
+        }
+        elsif ($dir eq "up") {
+            @this_child_relns = 
+              @{$self->graph->get_parent_relationships($acc)};
+            if ($subset_h) {
+                @this_child_relns =
+                  grep {
+                      my $keep;
+                      if ($subset_h->{$_->acc1}) {
+                          $_->acc2($term->acc);
+                          $keep=1;
+                      }
+                      else {
+                          push(@accs, $_->acc1);
+                          $keep=0;
+                      }
+                      $keep;
+                  } @this_child_relns;
+            }
+        }
+        else {
+            die $dir;
+        }
+        push(@child_relns, @this_child_relns);
+    }
+    
+    if ($self->reltype_filter) {
+        my %filh = ();
+        my $fs = $self->reltype_filter;
+        $fs = [$fs] unless ref($fs);
+        %filh = map {lc($_)=>1} @$fs;
+	@child_relns =
+          grep { $filh{lc($_->type)} } @child_relns;
+    }
+
+    if ($self->compact) {
+        @child_relns =
+          grep { !$self->arcs_visited->{$_->as_str} } @child_relns;
+    }
+
+    my @new = ();
+
+    foreach (@child_relns) {
+        $self->arcs_visited->{$_->as_str} = 1;
+        my $t = $self->graph->get_term($dir ne "up" ? $_->acc2 : $_->acc1);
+        if ($t) {
+            my $h =
+              {
+               term=>$t,
+               depth=>($depth+1), 
+               parent_rel=>$_,
+              };
+            push(@new,
+                 GO::Model::GraphNodeInstance->new($h));
+        }
+    } 
+    
+    my $sort_by = $self->sort_by || "alphabetical";
+    my $sort_by_list = $self->sort_by_list || [];
+
+    my %fh = 
+      (
+       "alphabetical" => sub {lc($a->term->name) cmp lc($b->term->name)},
+       "pos_in_list" => sub {_sortby_pos_in_list($sort_by_list, $a->term, $b->term)}
+      );
+    my $sortf = $fh{$sort_by};
+    confess("Dont know $sort_by") unless $sortf;
+
+    @new = sort $sortf @new;
+
+    my $visited = $self->visited;
+
+    if ($self->no_duplicates) {
+        # don't visit nodes twice
+        @new = grep {!$visited->{$_->term->acc}} @new;
+    }
+    foreach (@new) {
+        $visited->{$_->term->acc} = 1;
+    }
+
+    if ($order eq "breadth") {
+	push(@$noderefs, @new);
+    }
+    else {
+        # depth first:
+	splice(@$noderefs, 0, 0, @new);
+    }
+    return $noderef;
+}
+
+
+=head2 flatten
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub flatten {
+    my $self = shift;
+    my ($bracket, $fmt) =
+      rearrange([qw(bracket fmt)], @_);
+
+    my $str = "";
+    $fmt ||= "%s";
+    my $depth = 0;
+
+    my $ob = $bracket ? substr($bracket, 0, 1) : "(";
+    my $cb = $bracket ? substr($bracket, -1, 1) : ")";
+
+    sub diffchr {
+        my ($dd, $ob, $cb) = @_;
+        my $ch;
+        if ($dd < 0) {
+            $ch = "$cb" x -$dd;
+        }
+        elsif ($dd > 0) {
+            $ch = "$ob" x $dd;
+        }
+        else {
+            $ch = "";
+        }
+    }
+
+    while (my $ni = $self->next_node_instance) {
+        my $dd = $ni->depth - $depth;
+
+        my $ch = diffchr($dd, $ob, $cb);
+        $depth = $ni->depth;
+        $str .= 
+          sprintf(" $ch $fmt",
+                  $ni->term->public_acc,
+                  $ni->term->name,
+                  $ni->term->definition);
+    }
+
+    $str .= diffchr(-$depth, $ob, $cb);
+    return $str;
+}
+
+
+=head2 _sortby_pos_in_list
+
+Careful, this sort function work on Term objects, not GraphNodeInstance
+objects.  Comparison is done by the name of the term.
+
+=cut
+
+sub _sortby_pos_in_list
+  {
+      my ($t_list, $t_a, $t_b) = @_;
+      #    print "<PRE>_sortby called (".join(",",map {$_->name} @$t_list).") // ".$t_a->name." // ".$t_b->name."</PRE>\n";
+      my $inf = 100000000;
+
+      # First see which is first in list
+      my $a_pos = _term_pos_in_list($t_list, $t_a);
+      my $b_pos = _term_pos_in_list($t_list, $t_b);
+
+      # If one is bigger than the other, return the bigger one.
+      my $res = 0;
+      my $name_cmp = lc($t_a->name) cmp lc($t_b->name);
+      if (($a_pos >= 0) && ($b_pos >= 0))
+        {
+            # Both are in list
+            if ($a_pos != $b_pos) {
+                $res = ($a_pos <=> $b_pos);
+            } else {
+                $res = $name_cmp;
+            }
+        }
+      elsif (($a_pos < 0) && ($b_pos < 0))
+        {
+            # Neither are in the list
+            $res = $name_cmp;
+        }
+      else
+        {
+            # One is in the list and the other isn't
+            $res = ($a_pos >= 0) ? 1 : -1;
+        }
+
+      return $res;
+  }
+
+sub _term_pos_in_list
+  {
+      my ($t_list, $t) = @_;
+
+      # First see which is first in list
+      my $out = -1;
+      my $num_terms = scalar(@$t_list);
+      for (my $i = 0; $i < $num_terms; $i++) {
+          my $cur_t = @{$t_list}[$i];
+          return $i if (lc($cur_t->name) eq lc($t->name));
+      }
+
+      return $out;
+  }
+
+
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GraphNodeInstance.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GraphNodeInstance.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/GraphNodeInstance.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,110 @@
+# $Id: GraphNodeInstance.pm,v 1.4 2004/11/29 20:18:16 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+
+package GO::Model::GraphNodeInstance;
+
+=head1 NAME
+
+GO::Model::GraphNodeInstance  - a graph node located in a tree
+
+=head1 SYNOPSIS
+
+  $it = $graph->create_iterator;
+  # returns a GO::Model::GraphIterator object
+
+  while (my $ni = $it->next_node_instance) {
+    $depth = $ni->depth;
+    $term = $ni->term;
+    $reltype = $ni->parent_rel->type;
+    printf 
+      "%s %8s Term = %s (%s)  // depth=%d\n",
+          "----" x $depth,
+          $reltype,
+	  $term->name,
+	  $term->public_acc,
+          $depth;
+  }
+
+
+=head1 DESCRIPTION
+
+see GO::Model::Graph
+
+=cut
+
+
+
+use Carp;
+use strict;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Term;
+use FileHandle;
+use Exporter;
+use Data::Dumper;
+use vars qw(@EXPORT_OK %EXPORT_TAGS);
+
+use base qw(GO::Model::Root Exporter);
+
+sub _valid_params {
+    return qw(term path depth parent_rel blocked);
+}
+
+=head2 term
+
+  Usage   - 
+  Returns - GO::Model::Term 
+  Args    - 
+
+see L<GO::Model::Term>
+
+=cut
+
+=head2 depth
+
+  Usage   - 
+  Returns - int
+  Args    - 
+
+=cut
+
+=head2 parent_rel
+
+  Usage   - 
+  Returns - GO::Model::Relationship
+  Args    - 
+
+see L<GO::Model::Relationship>
+
+=cut
+
+
+#=head2 block
+
+#  Usage   -
+#  Returns -
+#  Args    -
+
+#blocking a node instance will stop the graph iterator going below this one
+
+#=cut
+
+#sub block {
+#    my $self = shift;
+#    $self->blocked(1);
+#}
+
+sub _initialize {
+    my $self = shift;
+    $self->SUPER::_initialize(@_);
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/LogicalDefinition.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/LogicalDefinition.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/LogicalDefinition.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,105 @@
+# $Id: LogicalDefinition.pm,v 1.1 2006/04/05 22:47:57 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::LogicalDefinition;
+
+=head1 NAME
+
+  GO::Model::LogicalDefinition;
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+=cut
+
+
+use Carp qw(cluck confess);
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+sub _valid_params {
+    return qw(intersection_list);
+}
+
+=head2 intersection_list
+
+ Usage   -
+ Returns -
+ Args    -
+
+Each element of the list is itself a list
+
+This list is of length 1 or 2.
+
+  [$generic_term_acc]
+  [$relation,$differentiating_term_acc]
+
+=cut
+
+
+=head2 generic_term_acc
+
+  Usage   -
+  Synonyms - genus_acc
+  Returns -
+  Args    -
+
+the ID of the generic term, also known as 'genus'
+
+=cut
+
+sub generic_term_acc {
+    my $self = shift;
+    if (@_) {
+        my $acc = shift;
+        my $diffs = $self->differentia;
+        push(@{$self->intersection_list},$acc);
+        return $acc;
+    }
+    my @direct_accs =
+      grep {scalar(@$_) == 1} @{$self->intersection_list};
+    if (@direct_accs > 1) {
+        $self->throw("multiple generic terms");
+    }
+    if (@direct_accs) {
+        return $direct_accs[0]->[0]; 
+    }
+    # no genus
+    return;
+}
+*genus_acc = \&generic_term_acc;
+
+=head2 differentia
+
+Usage   -
+ Returns -
+ Args    -
+
+=cut
+
+sub differentia {
+    my $self = shift;
+    if (@_) {
+        my $diffs = shift;
+        my $genus = $self->generic_term_acc;
+        $self->intersection_list([$genus, $diffs]);
+        return $diffs;
+    }
+    my @diffs =
+      grep {scalar(@$_) > 1} @{$self->intersection_list};
+    return \@diffs;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Modification.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Modification.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Modification.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,143 @@
+# $Id: Modification.pm,v 1.2 2004/11/24 02:28:01 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::Modification;
+
+=head1 NAME
+
+  GO::Model::Modification;
+
+=head1 DESCRIPTION
+
+represents a cross reference to an external database
+
+=cut
+
+
+use Carp;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+
+sub _valid_params {
+    return qw(id type person mod_time rank);
+}
+
+
+=head2 mod_time
+
+  Usage   -
+  Returns -
+  Args    -
+
+time in seconds > 1970
+
+=cut
+
+=head2 person
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+=head2 type
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+=head2 time_gmtstr
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub time_gmtstr {
+    my $self=shift;
+    my $t = gmtime($self->mod_time);
+    return $t;
+}
+
+
+=head2 pre_term_list
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub pre_term_list {
+    my $self = shift;
+    $self->{pre_term_list} = shift if @_;
+    return $self->{pre_term_list};
+}
+
+=head2 post_term_list
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub post_term_list {
+    my $self = shift;
+    $self->{post_term_list} = shift if @_;
+    return $self->{post_term_list};
+}
+
+
+=head2 add_pre_term
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub add_pre_term {
+    my $self = shift;
+    if (!$self->pre_term_list) {
+	$self->pre_term_list([]);
+    }
+    push(@{$self->pre_term_list}, shift);
+    $self->pre_term_list;
+}
+
+
+=head2 add_post_term
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub add_post_term {
+    my $self = shift;
+    if (!$self->post_term_list) {
+	$self->post_term_list([]);
+    }
+    push(@{$self->post_term_list}, shift);
+    $self->post_term_list;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Ontology.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Ontology.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Ontology.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,27 @@
+# $Id: Ontology.pm,v 1.2 2004/11/24 02:28:01 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+
+package GO::Model::Ontology;
+
+=head1 NAME
+
+  GO::Model::Ontology;
+
+=head1 SYNOPSIS
+
+  this is a synonym for GO::Model::Graph
+
+=head1 DESCRIPTION
+
+=cut
+
+use base qw(GO::Model::Graph);
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Path.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Path.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Path.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,138 @@
+# $Id: Path.pm,v 1.5 2004/11/29 20:18:17 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+
+package GO::Model::Path;
+
+=head1 NAME
+
+  GO::Model::Path;
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+represents a path between two nodes in a graph
+
+  TODO: have the path be built of relationships rather than terms, so
+  we can get the edgetypes in here
+
+=cut
+
+
+use Carp;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+
+sub _valid_params {
+    return qw(link_list);
+}
+
+
+=head2 link_list
+
+  Usage   -
+  Returns - arrayref of alternating type, GO::Model::Term
+  Args    -
+
+=cut
+
+
+=head2 term_list
+
+  Usage   -
+  Returns - arrayref of GO::Model::Term
+  Args    -
+
+gets/sets an ordered list of terms in the path
+
+L<GO::Model::Term>
+
+=cut
+
+sub term_list {
+    my $self = shift;
+    my $links = $self->link_list || [];
+    my @terms = ();
+    for (my $i=1; $i<@$links; $i+=2) {
+	push(@terms, $links->[$i]);
+    }
+    \@terms;
+}
+
+
+# add_link - private
+sub add_link {
+    my $self = shift;
+    if (!$self->{link_list}) {
+	$self->{link_list} = [];
+    }
+    push(@{$self->{link_list}}, shift, shift) if @_;
+    $self->{link_list};
+}
+
+
+=head2 length
+
+  Usage   - print $path->length
+  Returns - int
+  Args    -
+
+=cut
+
+sub length {
+    my $self = shift;
+    return scalar(@{$self->{link_list} || []})/2;
+}
+
+
+=head2 to_text
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub to_text {
+    my $self = shift;
+    my $use = shift;
+    my $links = $self->link_list || [];
+    my @parts = ();
+    for (my $i=0; $i<@$links; $i+=2) {
+	my $t = $links->[$i+1];
+	push(@parts, "[$links->[$i]]", $use && $use eq 'acc' ? $t->acc : $t->name);
+    }
+    return
+      join(' ', @parts);
+}
+
+=head2 duplicate
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub duplicate {
+    my $self = shift;
+    my $dup = $self->new;
+    $dup->link_list([@{$self->link_list || []}]);
+    $dup;
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Property.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Property.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Property.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,39 @@
+# $Id: Property.pm,v 1.2 2004/11/24 02:28:02 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::Property;
+
+=head1 NAME
+
+  GO::Model::Property;
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+
+=cut
+
+
+use Carp qw(cluck confess);
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+
+sub _valid_params {
+    return qw(acc name domain_acc range_acc textrule);
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Relationship.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Relationship.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Relationship.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,193 @@
+# $Id: Relationship.pm,v 1.6 2006/10/19 18:38:28 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::Relationship;
+
+=head1 NAME
+
+  GO::Model::Relationship
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+a relationship between two GO::Model::Terms
+
+relationships can be thought of as B<statements> or sentences of the form
+
+  SUBJECT-TERM PREDICATE OBJECT-TERM
+
+for example,
+
+  "dog" IS_A "animal"
+
+  "G-Protein coupled receptor" IS_A "transmembrane receptor"
+
+Statements have a B<subject> (i.e. the subject of the
+sentence/statement), a predicate/relationship-type and an B<object>
+(i.e. the object of the sentence/statement)
+
+Relationships can also be seen as arcs in a directed graph, with the
+subject being equivalent to the child, and the object equivalent to
+the parent. The arc is labeled with the predicate/relationship-type.
+
+A Relationship object currently does not contain an actual pointer to
+a GO::Model::Term object. Instead it stores the ID of that term. This
+is intended to be used in conjunction with the Graph object, or with
+the database.
+
+=cut
+
+
+use Carp;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+sub _valid_params {
+    return qw(acc1 acc2 is_inheritance complete type);
+}
+
+
+sub _initialize {
+    my $self = shift;
+    $self->SUPER::_initialize(@_);
+}
+
+sub acc1 {
+    my $self = shift;
+    $self->{"acc1"} = shift if @_;
+    return $self->{"acc1"};
+}
+*obj_acc = \&acc1;
+*object_acc = \&acc1;
+*parent_acc = \&acc1;
+
+sub acc2 {
+    my $self = shift;
+    $self->{"acc2"} = shift if @_;
+    return $self->{"acc2"};
+}
+*subj_acc = \&acc2;
+*subject_acc = \&acc2;
+*child_acc = \&acc2;
+
+=head2 subject_acc
+
+ Title   : subject_acc
+ Usage   : $obj->subject_acc($newid)
+ Usage   : $currid = $obj->subject_acc()
+ Synonyms: subj_acc, acc2, child_acc
+ Function: gets or sets the identifier for the child/subject term
+ Example : 
+ Returns : value of subject_acc (string)
+ Args    : on set, new value (string)
+
+All Relationships can be thought of "subject-predicate-object"
+statements. The statement is *about* the subject, and states something
+about the relationship *to* the object.
+
+For example, the if we have a Relationship:
+
+  cell
+    ^
+    |
+    | [part_of]
+    |
+ cell nucleus
+
+This is a statement about cell nuclei in general, so "cell nucleus" is
+the subject (sometimes called the child node). The Relationship tells
+us that all cell nuclei are part_of some cell, so the object of the
+relationship (sometimes called the parent node) is "cell"
+
+
+=cut
+
+=head2 object_acc
+
+ Title   : object_acc
+ Usage   : $obj->object_acc($newid)
+ Usage   : $currid = $obj->object_acc()
+ Synonyms: obj_acc, acc1, parent_acc
+ Function: gets or sets the identifier for the parent/object term
+ Example : 
+ Returns : value of object_acc (string)
+ Args    : on set, new value (string)
+ See Also: subj_acc
+
+
+=cut
+
+=head2 type
+
+ Title   : type
+ Usage   : $obj->type($newval)
+ Usage   : $currval = $obj->type()
+ Synonyms: 
+ Function: gets or sets the relationship type (a string)
+ Example : 
+ Returns : value of type (string)
+ Args    : on set, new value (string)
+
+Currently any string is allowed; in future the type string may be
+constrained to come from a controlled vocabulary of relationship types
+
+=cut
+
+
+sub type {
+    my $self = shift;
+    if (@_) {
+	my $type = shift;
+	if ($type) {
+            $self->{type} = $type;
+        }
+    }
+    return $self->{type} || "unknown";
+}
+
+sub is_obsolete {
+    my $self = shift;
+    $self->{is_obsolete} = shift if @_;
+    return $self->{is_obsolete} ? 1:0;
+}
+
+sub as_str {
+    my $self = shift;
+    sprintf("%s:%s:%s", $self->type, $self->acc1, $self->acc2);
+}
+
+sub to_ptuples {
+    my $self = shift;
+    warn("deprecated");
+    my ($th) =
+      rearrange([qw(tuples)], @_);
+    (["rel", $self->type, $self->acc1, $self->acc2]);
+}
+
+
+
+sub is_inheritance {
+    my $self = shift;
+    warn("deprecated");
+    if (@_) {
+	my $is = shift;
+	$is && $self->type("isa");
+	!$is && $self->type("partof");
+    }
+    return $self->type eq "isa";
+}
+
+1;
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Restriction.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Restriction.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Restriction.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,39 @@
+# $Id: Restriction.pm,v 1.2 2004/11/24 02:28:02 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::Restriction;
+
+=head1 NAME
+
+  GO::Model::Restriction;
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+
+=cut
+
+
+use Carp qw(cluck confess);
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+
+sub _valid_params {
+    return qw(property_name value);
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Root.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Root.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Root.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,350 @@
+# $Id: Root.pm,v 1.6 2007/08/07 21:43:37 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::Root;
+
+=head1 NAME
+
+  GO::Model::Root
+
+=head1 DESCRIPTION
+
+base class for all GO::Model objects
+
+=cut
+
+use strict;
+use Carp;
+use Exporter;
+use Data::Dumper;
+use vars qw(@ISA $AUTOLOAD);
+
+my @ISA = qw(Exporter);
+
+
+# - - - - - - - - - - Public functions - - - - - - - - - - - - 
+
+=head1 Constructors
+
+=head2 new
+
+Constructor: Basically just calls L<_initialize>().  Most subclasses
+should not need to override new, but instead should override
+L<_initialize>().
+
+If L<_initialize>() fails , the procedure will die
+
+WARNING: This procedure will die if initialization is unsuccessful.  
+Use an eval statement to catch such exceptions.
+
+=cut
+
+sub new 
+{
+    my $proto = shift; my $class = ref($proto) || $proto;;
+    my $self = {};
+    bless $self, $class;
+
+    $self->_initialize(@_);
+
+    if ($ENV{PERL_MEMORY_TRACE}) {
+	print STDERR "NEW: ".$self->sprint_self."\n";
+    }
+    return $self;
+}
+
+sub throw {
+    my $self = shift;
+    my @msg = @_;
+    confess("@msg");
+}
+sub warn {
+    my $self = shift;
+    my @msg = @_;
+    warn("@msg");
+}
+
+=head2 obj_factory
+
+  Usage   - $obj->obj_factory->create_new_term_object($h);
+  Alias   - apph
+  Returns - L<GO::ObjFactory>
+  Args    - none
+
+=cut
+
+sub apph {
+    my $self = shift;
+    $self->{apph} = shift if @_;
+    return $self->{apph};
+}
+*obj_factory = \&apph;
+
+
+=head2 sprint_self
+
+Prints out a description of the object to a string.
+
+=cut
+
+sub sprint_self
+  {
+    my $self = shift;
+    my $str = $self;
+    if ($self->can("name") && $self->name) {
+	$str.= " ".$self->name;
+    }
+    return $str;
+  }
+
+
+=head2 dump
+
+dumps the object (can be read back in with eval)
+
+=cut
+
+sub dump {
+    my $self = shift;
+    my $ob = shift || $self;
+    my $d = Data::Dumper->new(["obj", $ob]);
+    return $d->Dump;
+}
+
+sub _initialize 
+{
+
+    my $self = shift;
+    $self->init if $self->can("init");
+    my @valid_params = $self->_valid_params;
+    my ($paramh) = @_; # first arg
+
+    # arguments passed as hash?
+    if (ref($paramh)) {
+        map {
+            if (defined($paramh->{$_})) {
+                $self->$_($paramh->{$_});
+            }
+        } @valid_params;
+    }
+    else {
+        # arguments passed as array
+        for (my $i=0; $i<@_; $i++) {
+            my $m = $valid_params[$i];
+            $self->$m($_[$i]);
+        }
+    }
+}
+
+sub _valid_params {
+    ();
+}
+
+sub is_valid_param {
+    my $self = shift;
+    my $param = shift;
+    return scalar(grep {$_ eq $param} $self->_valid_params);
+}
+
+sub id {
+    my $self = shift;
+    $self->{id} = shift if @_;
+    return $self->{id};
+}
+
+
+=head2 namespace
+
+  Usage   - print $term->namespace();     # getting the type
+  Usage   - $term->namespace("molecular_function"); # setting the type
+  Alias   - type
+  Alias   - term_type
+  Alias   - category
+  Alias   - ontology
+  Returns - string representing type
+  Args    - string represnting type [optional]
+
+The OBO namespace for the L<GO::Model::Term> or
+L<GO::Model::Relationship>
+
+=cut
+
+sub namespace {
+    my $self = shift;
+    $self->{namespace} = shift if @_;
+    return $self->{namespace};
+}
+# synonyms
+sub term_type { shift->namespace(@_) }
+sub category { shift->namespace(@_) }
+sub ontology { shift->namespace(@_) }
+sub type { shift->namespace(@_) }
+
+
+
+=head2 _cleanup
+
+Called at object destruction time.  Should be overridden to perform
+cleanup tasks.
+
+=cut
+
+#sub _cleanup
+#{
+#  my $self = shift;
+
+#  # The best we can do here is clean up references left 
+#  # in our hash table.  We'll also drop debugging alerts.
+#  my $attribute;
+#  foreach $attribute (keys %$self)
+#    {
+#      if(ref($self->{$attribute})) 
+#	{
+#	  undef $self->{$attribute};
+#	}
+#    }
+#}
+
+
+sub _initialize_attributes {
+
+    my $self = shift;
+    my @att_name_arr = @{shift || []};
+    my $param_ref = shift;
+    my @param = @{$param_ref};
+
+
+    if (defined($param[0]) && $param[0]=~/^-/) {
+	
+	# attributes specified as '-key=>val' list
+
+	my $i;
+	for ($i=0;$i<@param;$i+=2) {
+	    $param[$i]=~tr/A-Z/a-z/;
+	}
+	
+	# Now we'll convert the @params variable into an associative array.
+	my(%param) = @param;
+
+	my(@return_array);
+	my $key;
+	foreach $key (@att_name_arr) {
+	    my $orig_key = $key;
+	    $key=~tr/A-Z/a-z/;
+	    if (defined($param{"-".$key})) {
+		my($value) = $param{"-".$key};
+		delete $param{"-".$key};
+		$self->{"_$orig_key"} = $value;
+	    }
+	}
+  
+	# catch user misspellings resulting in unrecognized names
+	my(@restkeys) = keys %param;
+
+	@{$param_ref} = %param;
+	if (scalar(@restkeys) > 0) {
+######	    carp("@restkeys not processed in _rearrange(), did you use a non-recognized parameter name ? ");
+	}
+	
+    }
+    else {
+	# attributes specified as basic array
+	my $i;
+	for ($i=0; $i<@param; $i++) {
+	    if ($i >= @att_name_arr) {
+		confess("Too many params");
+	    }
+	    my $att_name = $att_name_arr[$i];
+	    $self->{"_$att_name"} = $param[$i];
+	}
+    }
+	
+}
+
+sub from_idl {
+    my $class = shift;
+    my $h = shift;
+    foreach my $k (%$h) {
+	if (ref($h->{$k}) eq "HASH") {
+	    confess("must be dealth with in subclass of this");
+	}
+    }
+    return $class->new($h);
+}
+
+sub to_prolog {
+    my $self = shift;
+    my @t = $self->to_ptuples(@_);
+    my @s =
+    map {
+        sprintf("%s(%s).\n",
+                shift @$_,
+                join(", ",
+                     map {$self->prolog_quote($_)} @$_
+                    ));
+    } @t;
+    my %h=();
+    # uniquify
+    @s = grep {(!$h{$_}) and ($h{$_} = 1)} @s;
+    return join("", @s);
+}
+
+sub prolog_quote {
+    my $self = shift;
+    my $s = shift;
+    $s = '' unless defined $s;
+    $s =~ s/\'/\\\'/g;
+    "'$s'";
+}
+
+
+
+# auto-declare accessors
+
+sub AUTOLOAD {
+    
+    my $self = shift;
+ 
+    my $name = $AUTOLOAD;
+    $name =~ s/.*://;   # strip fully-qualified portion
+
+    if ($name eq "DESTROY") {
+	# we dont want to propagate this!!
+	return;
+    }
+
+    confess("$self") unless ref($self);
+    
+    my $add;
+    if ($name =~ /add_(.+)/) {
+        $add = $1."_list";
+    }
+
+    if ($self->can($name)) {
+	confess("assertion error!");
+    }
+    if ($self->is_valid_param($name)) {
+	
+	$self->{$name} = shift if @_;
+	return $self->{$name};
+    }
+    if ($add && $self->is_valid_param($add)) {
+	push(@{$self->{$add}}, @_);
+	return $self->{$add};
+    }
+    else {
+	confess("can't do $name on $self");
+    }
+    
+}
+
+
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Seq.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Seq.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Seq.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,208 @@
+# $Id: Seq.pm,v 1.4 2005/01/25 06:17:28 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::Seq;
+
+=head1 NAME
+
+  GO::Model::Seq;
+
+=head1 SYNOPSIS
+
+    print $gene_product->seq->seq;
+
+=head1 DESCRIPTION
+
+represents a biological sequence; uses the bioperl Bio::PrimarySeq class
+
+any call that you can do on a bioperl sequence object, you can do
+here, with the addition of the calls below
+
+to get bioperl, see http://www.bioperl.org
+
+=cut
+
+use Carp;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA $AUTOLOAD);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+sub _valid_params {
+    return qw(id xref_list pseq description);
+}
+
+sub _initialize 
+{
+    my $self = shift;
+    my ($paramh) = @_;
+
+    my @bpargs = @_;
+    my %h = ();
+    if (ref($paramh) eq "HASH") {
+        @bpargs = ();
+        foreach my $k (keys %$paramh) {
+            if (grep {$k eq $_} $self->_valid_params) {
+                $h{$k} = $paramh->{$k};
+            }
+            else {
+                push(@bpargs, "-".$k, $paramh->{$k});
+            }
+        }
+    }
+    require "Bio/PrimarySeq.pm";
+    my $pseq = Bio::PrimarySeq->new(@bpargs);
+    $self->pseq($pseq);
+    $self->SUPER::_initialize(\%h);
+}
+
+
+=head2 pseq
+
+  Usage   -
+  Returns - Bio::PrimarySeq
+  Args    -
+
+=cut
+
+sub pseq {
+    my $self = shift;
+    if (@_) {
+        $self->{pseq} = shift;
+        if ($self->{pseq}->isa("Bio::Seq::RichSeqI")) {
+            my $annot = $self->{pseq}->annotation;
+#            foreach my $link ( $annot->each_DBLink ) {
+            foreach my $link ( $annot->get_Annotations('dblink') ) {
+                my $xref =
+                  GO::Model::Xref->new;
+                $xref->xref_key($link->primary_id);
+                $xref->xref_dbname($link->database);
+                $self->add_xref($xref);
+            }
+        }
+    }
+    return $self->{pseq};
+}
+
+sub id {
+    my $self = shift;
+    $self->{id} = shift if @_;
+    return $self->{id};
+}
+
+sub residues {shift->pseq->seq(@_)}
+
+=head2 md5checksum
+
+  Usage   - my $md5 = $seq->md5checksum() OR $seq->md5checksum($md5)
+  Returns - 32 char hex string
+  Args    - 32 char hex string [optional]
+
+checksum for seq - easy way to check if it has been changed etc
+
+(requires Digest::MD5 module from CPAN)
+
+=cut
+
+sub md5checksum {
+    my $self = shift;
+
+    # we want to be able to manipulte the checksum
+    # even if the actual residues are not in memory at this time
+    if (@_) {
+	$self->{md5checksum} = shift;	
+    }
+    my $res = $self->pseq->seq();
+    if (!$res) {
+	return $self->{md5checksum};
+    }
+    require "Digest/MD5.pm";
+    my $md5 = Digest::MD5->new;
+    $md5->add($self->residues);
+    my $hex = $md5->hexdigest;
+
+    $self->{md5checksum} = $hex;
+      
+    return $self->{md5checksum};
+}
+
+=head2 to_fasta
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub to_fasta {
+    my $self = shift;
+
+    my $res = $self->seq;
+    $res =~ s/(.{50})/$1\n/g;
+    my $hdr = $self->description || $self->display_id;
+#    my $hdr = $self->display_id;
+
+    return 
+      sprintf(">%s\n%s\n",
+              $hdr,
+              $res);
+}
+
+=head2 add_xref
+
+  - Usage : $term->add_xref($xref);
+  - Args  : GO::Term::Xref
+  
+
+=cut
+
+sub add_xref {
+    my $self = shift;
+
+    if (@_) {
+	my $xref = shift;
+        $self->xref_list([]) unless $self->xref_list;
+        $xref->isa("GO::Model::Xref") || confess("Not an Xref");
+        push(@{$self->xref_list}, $xref);
+    }
+}
+
+# delegate calls to Bio::Seq object
+sub AUTOLOAD {
+    
+    my $self = shift || confess;
+ 
+    my $name = $AUTOLOAD;
+    $name =~ s/.*://;   # strip fully-qualified portion
+
+    if ($name eq "DESTROY") {
+	# we dont want to propagate this!!
+	return;
+    }
+
+    if (!$self->pseq) { confess("assertion error") }
+    
+    if ($self->pseq->can($name)) {
+	return $self->pseq->$name(@_);
+    }
+    if ($self->is_valid_param($name)) {
+	
+	$self->{$name} = shift if @_;
+	return $self->{$name};
+    }
+    else {
+	confess("can't do $name on $self");
+    }
+    
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Species.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Species.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Species.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,54 @@
+# $Id: Species.pm,v 1.3 2005/06/29 18:40:19 sshu Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::Species;
+
+=head1 NAME
+
+  GO::Model::Species;
+
+=head1 DESCRIPTION
+
+represents a gene product in a particular species (this will
+effectively always be refered to implicitly by the gene symbol even
+though a gene may have >1 product)
+
+=cut
+
+
+use Carp;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+sub _valid_params {
+    return qw(id ncbi_taxa_id genus species common_name lineage_string apph);
+}
+
+sub from_bpspecies {
+    my $class = shift;
+    my $species = shift;
+    my $division = shift;
+    my $taxon = $class->new;
+    $taxon->common_name($species->common_name);
+    $taxon->genus($species->genus);
+    $taxon->species($species->species);
+#    $taxon->taxon_code($division) if $division;
+    $taxon;
+}
+
+sub binomial {
+    my $self = shift;
+    return ($self->genus || "")." ".($self->species || "");
+}
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Term.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Term.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Term.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,1175 @@
+# $Id: Term.pm,v 1.23 2007/09/12 03:07:30 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+
+package GO::Model::Term;
+
+=head1 NAME
+
+GO::Model::Term       - a term or concept in an ontology
+
+=head1 SYNOPSIS
+
+  # From a 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 "Term %s %s\n", $term->name, $term->acc;  
+
+  # From a GO Database (requires go-db-perl)
+  my apph = GO::AppHandle->connect(-dbname=>$dbname);
+  my $term = $apph->get_term({acc=>00003677});
+  printf "Term:%s (%s)\nDefinition:%s\nSynonyms:%s\n",
+    $term->name,
+    $term->public_acc,
+    $term->definition,
+    join(", ", @{$term->synonym_list});
+
+=head1 DESCRIPTION
+
+Represents an Ontology term; the same class is used for process,
+compartment and function
+
+currently, a Term is not aware of its Relationships; to find out how a
+term is related to other terms, use the a L<GO::Model::Graph> object,
+which will give you the GO::Model::Relationship objects; for example
+
+  $rels = $graph->get_parent_relationships($term->acc);
+
+=head1 SEE ALSO
+
+L<GO::Model::Relationship>
+L<GO::Model::Graph>
+L<GO::Model::Xref>
+L<GO::Model::Association>
+
+=head1 NOTES
+
+Like all the GO::Model::* classes, this uses accessor methods to get
+or set the attributes. by using the accessor method without any
+arguments gets the value of the attribute. if you pass in an argument,
+then the attribuet will be set according to that argument.
+
+for single-valued attributes
+
+  # this sets the value of the attribute
+  $my_object->attribute_name("my value");
+
+  # this gets the value of the attribute
+  $my_value = $my_object->attribute_name();
+
+for lists:
+
+  # this sets the values of the attribute
+  $my_object->attribute_name(\@my_values);
+
+  # this gets the values of the attribute
+  $my_values = $my_object->attribute_name();
+
+
+=cut
+
+
+use Carp;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use GO::Model::Association;
+use GO::Model::Xref;
+use GO::Model::GeneProduct;
+use strict;
+use vars qw(@ISA);
+
+use base qw(GO::Model::Root Exporter);
+
+our %code_to_namespace =
+  ('F'=>'molecular_function',
+   'P'=>'biological_process',
+   'C'=>'cellular_component');
+
+sub _valid_params { return qw(id name description term_type
+is_obsolete is_relationship_type public_acc acc definition
+synonym_list association_list selected_association_list
+association_hash n_associations dbxref_list property_list subset_list
+equivalent_to_union_of_term_list
+disjoint_from_term_list
+consider_list
+replaced_by_list
+stag is_anonymous is_cyclic is_transitive is_symmetric is_anti_symmetric is_reflexive
+inverse_of transitive_over domain range logical_definition); }
+
+=head2 acc
+
+  Usage   - print $term->acc()
+  Alias   - public_acc
+  Returns -
+  Args    -
+
+accessor: gets/sets GO ID/accession [as an integer]
+
+throws: exception if you try to pass in a non-integer
+
+if you want to use IDs in the format GO:0000nnn, then use the method
+public_acc()
+
+=cut
+
+sub acc {
+    my $self = shift;
+    if (@_) {
+	my $acc = shift;
+	$self->{acc} = $acc;
+    }
+    return $self->{acc};
+}
+
+*public_acc = \&acc;
+
+=head2 name
+
+  Usage   - print $term->name;
+  Returns -
+  Args    -
+
+accessor: gets/sets "name" attribute
+
+=cut
+
+sub name {
+    my $self = shift;
+    $self->{name} = shift if @_;
+    my $name = $self->{name};
+    return $name;
+}
+
+sub description {
+    my $self = shift;
+    warn('deprecated');
+    $self->name(@_);
+}
+
+
+=head2 subset_list
+
+  Usage   - foreach (@{$term->subset_list || []}) { printf " $_\n" }
+  Returns - list of strings
+  Args    - list of strings [optional]
+
+List of subset Accs for a term
+
+Subsets are also known as GO Slims
+
+=cut
+
+=head2 in_subset
+
+  Usage   - if ($term->in_subset('goslim_prok');
+  Returns - bool
+  Args    - subset-name str
+
+Tests if the term belongs to a subset
+
+=cut
+
+sub in_subset {
+    my $self = shift;
+    my $subset = shift;
+    return 1 if grep {$_ eq $subset} @{$self->subset_list || []};
+    return 0;
+}
+
+=head2 definition
+
+  Usage   - print $term->definition;
+  Returns -
+  Args    -
+
+accessor: gets/sets "definition" attribute
+
+=cut
+
+sub definition {
+    my $self = shift;
+    $self->{definition} = shift if @_;
+    return $self->{definition};
+}
+
+=head2 primary_xref
+
+ Title   : primary_xref
+ Usage   :
+ Function:
+ Example :
+ Returns : GO::Model::Xref
+ Args    :
+
+The same as acc(), except the ID is returned as a L<GO::Model::Xref>
+rather than a string
+
+=cut
+
+sub primary_xref{
+   my ($self, at args) = @_;
+
+   my ($dbname, $acc) = split(/\:/, $self->acc);
+   return GO::Model::Xref->new({xref_key=>$acc,
+				xref_dbname=>$dbname});
+}
+
+
+=head2 comment
+
+ Title   : comment
+ Usage   : $obj->comment($newval)
+ Function: 
+ Example : 
+ Returns : value of comment (a scalar)
+ Args    : on set, new value (a scalar or undef, optional)
+
+
+=cut
+
+sub comment{
+    my $self = shift;
+
+    return $self->{'comment'} = shift if @_;
+    return $self->{'comment'};
+}
+
+=head2 definition_dbxref_list
+
+ Title   : definition_dbxref_list
+ Usage   : $obj->definition_dbxref(\@xrefs)
+ Function: 
+ Example : 
+ Returns : definition_dbxref_list hashlist (of GO::Model::Xref)
+ Args    : on set, new values (GO::Model::Xref hashlist)
+
+L<GO::Model::Xref>
+
+=cut
+
+sub definition_dbxref_list{
+    my $self = shift;
+
+    return $self->{'definition_dbxref_list'} = shift if @_;
+    return $self->{'definition_dbxref_list'};
+}
+
+
+=head2 add_definition_dbxref
+
+  - Usage : $term->add_definition_dbxref($xref);
+  - Args  : GO::Term::Xref
+  
+L<GO::Model::Xref>
+
+=cut
+
+sub add_definition_dbxref {
+    my $self = shift;
+
+    foreach my $dbxref (@_) {
+        if (!ref($dbxref)) {
+            my ($db, @rest) = split(/:/, $dbxref);
+            confess "$dbxref not a dbxref" unless @rest;
+            my $acc = join(":", @rest);
+            $dbxref = $self->apph->create_xref_obj({xref_key=>$acc,
+                                                    xref_dbname=>$db});
+        }
+        UNIVERSAL::isa($dbxref, "GO::Model::Xref") or confess($dbxref." not a xref");
+        $self->definition_dbxref_list([]) unless $self->definition_dbxref_list;
+        push(@{$self->definition_dbxref_list}, $dbxref);
+
+    }
+    $self->definition_dbxref_list;
+}
+
+
+sub lisp_acc {
+    my $self = shift;
+    return 
+      sprintf "Go%07d", $self->acc;
+}
+
+
+
+=head2 has_synonym
+
+  Usage   - if ($term->has_synonym("autotrophy") {...}
+  Returns - bool
+  Args    - string
+
+=cut
+
+sub has_synonym {
+    my $self = shift;
+    my $str = shift;
+    my @syns = @{$self->synonym_list || []};
+    if (grep {$_ eq $str} @syns) {
+        return 1;
+    }
+    return 0;
+}
+
+
+=head2 add_synonym
+
+  Usage   - $term->add_synonym("calcineurin");
+  Usage   - $term->add_synonym(@synonym_strings);
+  Returns -
+  Args    -
+
+Adds a synonym; loses type information (the synonym type in blank)
+
+=cut
+
+sub add_synonym {
+    my $self = shift;
+    $self->add_synonym_by_type('', $_) foreach @_;
+}
+
+=head2 synonym_list
+
+  Usage   - my $syn_l = $term->synonym_list;
+  Usage   - $term->synonym_list([$syn1, $syn2]);
+  Returns - arrayref
+  Args    - arrayref [optional]
+
+accessor: gets/set list of synonyms [array reference]
+
+each synonym is represented as a string - this method loses synonym
+typing information. If used as a setter, will set the type for each
+synonym to null
+
+=cut
+
+sub synonym_list {
+    my $self = shift;
+    if (@_) {
+        my $syns = shift;
+        $self->synonyms_by_type_idx({});
+        $self->add_synonym(@$syns);
+    }
+    my $sbt = $self->synonyms_by_type_idx;
+    my @syns = 
+      map { @{$sbt->{$_} || []} } keys %$sbt;
+    return \@syns;
+}
+
+sub synonym_type_list {
+
+    return [keys %{shift->{_synonyms_by_type_idx} || {}}];
+}
+
+# private: lookup table indexed by type, value is syn string arrayref
+sub synonyms_by_type_idx {
+    my $self = shift;
+    if (@_) {
+        $self->{_synonyms_by_type_idx} = shift;
+    }
+    else {
+        $self->{_synonyms_by_type_idx} = {} unless 
+          $self->{_synonyms_by_type_idx};
+    }
+    return $self->{_synonyms_by_type_idx};
+}
+
+
+=head2 add_synonym_by_type
+
+  Usage   - $term->add_synonym_by_type('exact', $syn);
+  Returns -
+  Args    -
+
+=cut
+
+sub add_synonym_by_type {
+    my $self = shift;
+    my $type = shift || '';
+    my $syn = shift;
+    push(@{$self->synonyms_by_type_idx->{$type}}, $syn);
+}
+
+
+=head2 synonyms_by_type
+
+  Usage   - $synstrs = $term->synonyms_by_type('exact');
+  Usage   - $term->synonyms_by_type('exact', \@exact_syns);
+  Returns - arrayref of strings
+  Args    - type string, arrayref of strings [optional]
+
+in getter mode, gets a list of synonyms of a particular type
+
+in setter mode, sets a list of synonyms for a particular type
+
+=cut
+
+sub synonyms_by_type {
+    my $self = shift;
+    my $type = shift;
+    if (@_) {
+        $self->synonyms_by_type_idx->{$type} = shift;
+    }
+    return $self->synonyms_by_type_idx->{$type} || [];
+}
+
+=head2 alt_id_list
+
+  Usage   - my $syn_l = $term->alt_id_list;
+  Usage   - $term->alt_id_list([$syn1, $syn2]);
+  Returns - arrayref
+  Args    - arrayref [optional]
+
+accessor: gets/set list of synonyms [array reference]
+
+=cut
+
+sub alt_id_list {
+    my $self = shift;
+    if (@_) {
+        $self->add_alt_id(@_);
+    }
+    $self->synonyms_by_type('alt_id');
+}
+
+
+=head2 add_alt_id
+
+  Usage   - $term->add_alt_id('GO:0000001');
+  Returns -
+  Args    - id string, or list of id strings
+
+=cut
+
+sub add_alt_id {
+    my $self = shift;
+    my @alt_ids = @_;
+    $self->add_synonym_by_type('alt_id',$_) foreach @_;
+}
+*add_secondaryid = \&add_alt_id;
+
+
+=head2 namespace (INHERITED)
+
+  Usage   - print $term->namespace();     # getting the type
+  Usage   - $term->namespace("molecular_function"); # setting the type
+  Alias   - type
+  Alias   - term_type
+  Alias   - category
+  Alias   - ontology
+  Returns - string representing type
+  Args    - string represnting type [optional]
+
+The OBO namespace for the L<GO::Model::Term> or
+L<GO::Model::Relationship>
+
+This method is inherited from the superclass
+
+=cut
+
+# DEFINED IN SUPERCLASS
+# documentation repeated here to make things easier to find
+
+=head2 set_namespace_by_code
+
+  Usage   - $term->set_namespace_by_code("P");
+  Returns - 
+  Args    - String: M, P or C
+
+Currently the mapping is hardcoded
+
+  ('F'=>'molecular_function',
+   'P'=>'biological_process',
+   'C'=>'cellular_component');
+
+=cut
+
+sub set_namespace_by_code {
+    my $self = shift;
+    my $code = shift;
+    my $ns = $code_to_namespace{$code};
+    if (!$ns) {
+        $self->throw("Unknown code: $code");
+    }
+    $self->namespace($ns);
+    return $code;
+}
+
+=head2 get_code_from_namespace
+
+  Usage   - $code = $term->get_code_from_namespace;
+  Returns - String: M, P or F
+  Args    - String (if omitted will use current namespace)
+
+Returns the code for the current namespace (or any given namespace if supplied)
+
+=cut
+
+sub get_code_from_namespace {
+    my $self = shift;
+    my $ns = shift || $self->namespace || ''; 
+    my %m = reverse %code_to_namespace; # assumes 1-1 bijective mapping
+    my $code = $m{$ns};
+#    if (!$code) {
+#        $self->throw("Unknown namespace: $ns");
+#    }
+    return $code;
+}
+
+
+
+
+# DEPCRECATED
+sub add_obsolete {
+    my $self = shift;
+    if (@_) {
+	my $obs = shift;
+	$self->{obsolete_h}->{$obs->acc} = $obs;
+    }
+    return $self->obsolete_list;
+}
+
+# deprecated
+sub obsolete_list {
+    my $self = shift;
+    while (shift @_) {
+	$self->add_obsolete ($_);
+    }
+    my @obs = values %{$self->{obsolete_h}};
+    return \@obs;
+}
+
+
+=head2 add_dbxref
+
+  - Usage : $term->add_dbxref($xref);
+  - Args  : GO::Term::Xref
+
+L<GO::Model::Xref>
+
+=cut
+
+sub add_dbxref {
+    my $self = shift;
+
+    foreach my $dbxref (@_) {
+        if (!ref($dbxref)) {
+            my ($db, @rest) = split(/:/, $dbxref);
+            confess "$dbxref not a dbxref" unless @rest;
+            my $acc = join(":", @rest);
+            $dbxref = $self->apph->create_xref_obj({xref_key=>$acc,
+                                                    xref_dbname=>$db});
+        }
+        UNIVERSAL::isa($dbxref, "GO::Model::Xref") or confess($dbxref." not a xref");
+        $self->dbxref_list([]) unless $self->dbxref_list;
+        push(@{$self->dbxref_list}, $dbxref);
+
+    }
+    $self->dbxref_list;
+}
+*add_xref = \&add_dbxref;
+
+
+=head2 dbxref_list
+
+  - Usage : $term->dbxref_list($xref);
+  - Args  : optional listref of GO::Term::Xref
+  - Returns  : listref of GO::Term::Xref
+  
+
+accessor: gets/sets list of dbxref [array reference]
+
+=cut
+
+# autodefined
+
+=head2 is_obsolete
+
+accessor: gets/set obsolete flag [boolean
+
+=cut
+
+sub is_obsolete {
+    my $self = shift;
+    $self->{is_obsolete} = shift if @_;
+    return $self->{is_obsolete} ? 1:0;
+}
+
+=head2 is_root
+
+accessor: gets/set is_root flag [boolean]
+
+=cut
+
+sub is_root {
+    my $self = shift;
+    $self->{is_root} = shift if @_;
+    return $self->{is_root} ? 1:0;
+}
+
+=head1 TERM ASSOCIATION METHODS
+
+=head2 association_list
+
+  Usage   - $assoc_l = $term->association_list
+  Returns - arrayref of GO::Model::Association
+  Args    - arrayref of GO::Model::Association [optional]
+
+accessor: gets/set list of associations [array reference]
+
+if this is undefined, the datasource will be queried
+for the associations
+
+=cut
+
+sub association_list {
+    my $self = shift;
+    my ($al, $sort_by) = 
+      rearrange([qw(associations sort_by)], @_);
+    if ($al) {
+	if (!ref($al) eq "ARRAY") {
+	    confess("$al is not an array ref");
+	}
+	$self->{"association_list"} = $al;
+	foreach my $assoc (@{$self->{"association_list"} || []}) {
+	    my $gene = $assoc->gene_product;
+	    $self->{association_hash}->{$gene->acc} = $assoc;
+	}
+    }
+    if (!defined($self->{"association_list"})) {
+	if (!defined($self->apph)) {
+#	    print $self->dump;
+	}
+	else {
+	    $self->{"association_list"} =
+	      $self->apph->get_direct_associations($self);
+	    foreach my $assoc (@{$self->{"association_list"} || []}) {
+		my $gene = $assoc->gene_product;
+		if (!$gene) {
+		    confess("no gene for assoc $assoc");
+		}
+                if (!$self->{association_hash}->{$gene->acc}) {
+                    $self->{association_hash}->{$gene->acc} = [];  
+                }
+		push(@{$self->{association_hash}->{$gene->acc}}, $assoc);
+	    }
+	}
+    }
+    if ($sort_by &&
+        (!$self->{"association_list_sort_by"} ||
+         $self->{"association_list_sort_by"} ne $sort_by)) {
+        my @sortlist = ref($sort_by) ? @$sort_by : ($sort_by);
+        my @al = 
+          sort {
+              my $as1 = $a;
+              my $as2 = $b;
+              my $i=0;
+              my $cmp;
+              while (!defined($cmp) && 
+                     $i < @sortlist) {
+                  my $sortk = $sortlist[$i];
+                  $i++;
+                  if ($sortk eq "gene_product") {
+                      $cmp = 
+                        $as1->gene_product->symbol cmp
+                        $as2->gene_product->symbol;
+                  }
+                  elsif ($sortk eq "ev_code") {
+                      confess("cant sort on evcode yet");
+                  }
+                  else {
+                      confess("dont know $sortk");
+                  }
+              }
+              $cmp;
+          } @{$self->{association_list} || []};
+        $self->{"association_list"} = \@al;
+        $self->{"association_list_sort_by"} = $sort_by;
+    }
+    return $self->{"association_list"};
+}
+
+=head2 selected_association_list
+
+  Usage   - $assoc_l = $term->selected_association_list
+  Returns - arrayref of GO::Model::Association
+  Args    - arrayref of GO::Model::Association [optional]
+
+accessor: gets list of SELECTED associations [array reference]
+
+[this method is only of use if you are using it in conjunction with
+L<GO::AppHandle> in the go-db-perl distro]
+
+this in not the total list of all associations associated with a term;
+if the term was created via a query on products, this will include
+those associations
+
+L<GO::Model::Association>
+
+=cut
+
+# done by AUTOLOAD
+
+
+
+=head2 add_association
+
+  Usage   - $term->add_association($assoc);
+  Returns - 
+  Args    - GO::Model::Association
+
+L<GO::Model::Association>
+
+=cut
+
+sub add_association {
+    my $self = shift;
+    if (!$self->{"association_list"}) {
+	$self->{"association_list"} = [];
+    }
+    my $assoc = shift;
+    if (ref($assoc) ne "GO::Model::Association") {
+	# it's a hashref - create obj from hashref
+	my $assoc2 = $self->apph->create_association_obj($assoc);
+	$assoc = $assoc2;
+    }
+    push(@{$self->{"association_list"}}, ($assoc));
+    my $gene = $assoc->gene_product;
+    if (!$self->{association_hash}->{$gene->acc}) {
+        $self->{association_hash}->{$gene->acc} = [];  
+    }
+    push(@{$self->{association_hash}->{$gene->acc}}, $assoc);
+    return $self->{"association_list"};
+}
+
+
+=head2 add_selected_association
+
+  Usage   -
+  Returns -
+  Args    -
+
+L<GO::Model::Association>
+
+=cut
+
+sub add_selected_association {
+    my $self = shift;
+    my $assoc = shift;
+    $assoc->isa("GO::Model::Association") || confess;
+    if (!$self->{"selected_association_list"}) {
+	$self->{"selected_association_list"} = [];
+    }
+    push(@{$self->{"selected_association_list"}}, $assoc);
+}
+
+=head2 association_hash
+
+returns associations as listref of unique GeneProduct objects
+
+L<GO::Model::Association>
+
+=cut
+
+sub association_hash {
+    my $self = shift;
+    if (!defined($self->{"association_list"})) {
+        $self->association_list;
+    }
+    $self->{"association_hash"} = shift if @_;
+    return $self->{"association_hash"};
+}
+
+=head2 get_all_associations
+
+  Usage   - my $al = $term->get_all_associations
+  Returns - GO::Model::Association list
+  Args    -
+
+returns all associations for the term and the terms beneath it in the GO DAG
+
+same as $apph->get_all_associations($term)
+
+L<GO::Model::Association>
+
+=cut
+
+sub get_all_associations {
+    my $self = shift;
+    $self->apph->get_all_associations($self);
+}
+
+=head2 n_associations
+
+  Usage   - my $n = $term->n_associations
+  Returns -
+  Args    -
+
+=cut
+
+sub n_associations {
+    my $self = shift;
+    if (!@{$self->{"association_list"} || []}) {
+
+	# association count can be get/set even if the actual
+	# list is not present
+	$self->{n_associations} = shift if @_;
+    }
+    if (!defined($self->{n_associations}) &&
+        $self->{association_list}) {
+
+        # we have already loaded the
+        # association list
+	$self->{n_associations} =
+	  scalar(@{$self->association_list || []});
+    }
+    if (!defined($self->{n_associations})) {
+	$self->{n_associations} =
+          $self->apph->get_association_count($self);
+    }
+    return $self->{n_associations};
+}
+
+
+=head2 product_list
+
+  Usage   - $prods = $term->product_list
+  Returns - L<GO::Model::GeneProduct> listref
+  Args    -
+
+Returns a reference to an array of gene products that are attached
+directly to this term.
+
+(if the products have not been fetched, this method will call
+$term->association_list, cache the results, and use the associations
+to build the product list. succeeding calls of product_list to this
+term will hence be faster)
+
+See L<GO::Model::GeneProduct>
+
+=cut
+
+sub product_list {
+    my $self = shift;
+    my $assocs = $self->association_list;
+    my @prods = ();
+    my %ph = ();
+    foreach my $assoc (@$assocs) {
+        my $gp = $assoc->gene_product;
+        if (!$ph{$gp->id}) {
+            push(@prods, $gp);
+            $ph{$gp->id} = 1;
+        }
+    }
+    return [@prods];
+}
+
+
+=head2 deep_product_list
+
+  Usage   -
+  Returns - GO::Model::GeneProduct listref
+  Args    -
+
+finds all products attached to this term and all terms below in the
+graph
+
+L<GO::Model::GeneProduct>
+
+=cut
+
+sub deep_product_list {
+    my $self = shift;
+    my $prods = 
+      $self->apph->get_products({deep=>1, term=>$self});
+    return $prods;
+}
+
+=head2 n_deep_products
+
+  Usage   - my $count = $term->n_deep_products;
+  Returns - int
+  Args    - filter (hashref) - or string "recount"
+
+gets the count for the *dsitinct* number of GO::Model::GeneProduct
+entries annotated at OR BELOW this level. if you have set the filters
+in GO::AppHandle then these filters will be used in determining the
+count.
+
+Remember, if you did not explicitly set the filters, then the
+default filter will be used, which is [!IEA] (i.e. curated
+associations only, see www.geneontology.org for a discussion of
+evidence codes).
+
+Note: currently only the speciesdb filter is respected. It turns out
+to be very expensive to do the set arithmetic for distinct recursive
+gene counts with different evidence combinations. Because each product
+belongs to one speciesdb only, the speciesdb counts are mutually
+exclusive, which makes this easier.
+
+  # get the number of gene products that have been annotated
+  # as transcription factors in worm and fly discounting
+  # uncurated automatic annotations
+  $apph->filters({evcodes=>["!IEA"], speciesdbs=>["SGD", "FB"]});
+  $term = $apph->get_term({name=>"transcription factor"});
+  print $term->n_deep_products;
+
+The count will be cached, so if you alter the filter parameters be sure
+to get a recount like this:
+
+  my $count = $term->n_deep_products("recount");
+
+TODO: make the recount automatic if the filter is changed
+
+PERFORMANCE NOTE 1: When you ask the AppHandle to give you a list of
+GO::Model::Term objects, it may decide to populate this attribute when
+building the terms in a fast and efficient way. Therefore you should
+avoid setting the filters *after* you have created the objects
+otherwise it will have to refetch all these values slowing things
+down.
+
+PERFORMANCE NOTE 2: If you are using the SQL GO::AppHandle
+implementation, then this call will probably involve a query to the
+*gene_produc_count* table. If you populated the database you are using
+yourself, make sure this table is filled otherwise this will be an
+expensive query.
+
+L<GO::Model::GeneProduct>
+
+=cut
+
+sub n_deep_products {
+    my $self = shift;
+    $self->{n_deep_products} = shift if @_;
+    if (!defined($self->{n_deep_products}) ||
+        $self->{n_deep_products} eq "recount") {
+        $self->{n_deep_products} = 
+          $self->apph->get_deep_product_count({term=>$self});
+    }
+    else {
+    }
+    return $self->{n_deep_products};
+}
+
+# EXPERIMENTAL
+sub n_deep_products_grouped_by_taxid {
+    my $self = shift;
+    $self->{n_deep_products_grouped_by_taxid} = shift if @_;
+    if (!defined($self->{n_deep_products_grouped_by_taxid}) ||
+        $self->{n_deep_products_grouped_by_taxid} eq "recount") {
+        $self->{n_deep_products_grouped_by_taxid} = 
+          $self->apph->get_deep_product_count({term=>$self,group_by=>'taxid'});
+    }
+    else {
+    }
+    return $self->{n_deep_products_grouped_by_taxid};
+}
+
+
+=head2 n_products
+
+  Usage   - as n_deep_products
+  Returns -
+  Args    -
+
+see docs for n_deep_products
+
+gets a count of products AT THIS LEVEL ONLY
+
+L<GO::Model::GeneProduct>
+
+=cut
+
+sub n_products {
+    my $self = shift;
+    $self->{n_products} = shift if @_;
+    if (!defined($self->{n_products}) ||
+        $self->{n_products} eq "recount") {
+        $self->{n_products} = 
+          $self->apph->get_product_count({term=>$self});
+    }
+    return $self->{n_products};
+}
+
+sub n_unique_associations {
+    my $self = shift;
+    return scalar(keys %{$self->association_hash || {}});
+}
+
+sub get_child_terms {
+    my $self = shift;
+    return $self->apph->get_child_terms($self, @_);
+}
+
+sub get_parent_terms {
+    my $self = shift;
+    return $self->apph->get_parent_terms($self, @_);
+}
+
+=head2 loadtime
+
+ Title   : loadtime
+ Usage   :
+ Function:
+ Example :
+ Returns : time term was loaded into datasource
+ Args    : none
+
+
+=cut
+
+sub loadtime{
+    my ($self) = @_;
+    return $self->apph->get_term_loadtime($self->acc);
+}
+
+
+sub show {
+    my $self = shift;
+    print $self->as_str;
+}
+
+sub as_str {
+    my $self = shift;
+    sprintf("%s (%s)", $self->name, $self->public_acc);
+}
+# --- EXPERIMENTAL METHOD ---
+# not yet public
+sub namerule {
+    my $self = shift;
+    $self->{_namerule} = shift if @_;
+    return $self->{_namerule};
+}
+
+sub defrule {
+    my $self = shift;
+    $self->{_defrule} = shift if @_;
+    return $self->{_defrule};
+}
+
+# --- EXPERIMENTAL METHOD ---
+# not yet public
+sub stag {
+    my $self = shift;
+    $self->{_stag} = shift if @_;
+    if (!$self->{_stag}) {
+        require "Data/Stag.pm";
+        $self->{_stag} = Data::Stag->new(stag=>[]);
+    }
+    return $self->{_stag};
+}
+
+
+
+# pseudo-private method
+# available to query classes;
+# a template is a specification from a client to a query server
+# showing how much data should be transferred across.
+# the template is an instance of the object that is being returned;
+# there are a few premade templates available; eg shallow
+sub get_template {
+    my $class = shift;
+    my $template = shift || {};
+    if ($template eq "shallow") {
+	# shallow template, just get term attributes, no other
+	# structs
+	$template = GO::Model::Term->new({"name"=>"",
+					  "acc"=>-1,
+					  "definition"=>"",
+					  "n_associations"=>0,
+					  "synonym_list"=>[],
+					  "dbxref_list"=>undef});
+    }
+    if ($template =~ /no.*assoc/) {
+        # everything bar associations
+	$template = GO::Model::Term->new({"name"=>"",
+					  "acc"=>-1,
+					  "definition"=>1,
+					  "n_associations"=>0,
+					  "synonym_list"=>[]});
+        $template->{dbxref_h} = 1;
+    }
+    if ($template eq "all") {
+        # everything
+	$template = GO::Model::Term->new({"name"=>"",
+					  "acc"=>-1,
+					  "definition"=>1,
+					  "association_list"=>[],
+					  "synonym_list"=>[]});
+        $template->{dbxref_h} = 1;
+    }
+    return $template;
+}
+
+sub to_text {
+    my $self = shift;
+    my ($prefix, $escape, $obs_l, $suppress) =
+      rearrange([qw(prefix escape obs suppress)], @_);
+    my @syns = @{$self->synonym_list || [] };
+    my @xrefs = @{$self->dbxref_list || [] };
+    if ($suppress) {
+	if (!ref($suppress)) {
+	    $suppress = {$suppress => 1};
+	}
+	@xrefs =
+	  grep {!$suppress->{$_->xref_dbname}} @xrefs;
+    }
+    else {
+	@xrefs =
+	  grep {$_->xref_dbname eq 'EC'} @xrefs;
+    }
+    my $sub = 
+      sub { @_ };
+    if ($escape) {
+        $sub =
+          sub {map{s/\,/\\\,/g;$_}@_};
+    }
+    my $text = 
+      sprintf("%s%s ; %s%s%s%s",
+              &$sub($prefix || ""),
+              &$sub($self->name),
+              $self->public_acc,
+              (($obs_l && @$obs_l) ?
+               join ("", map {", ".$_->public_acc } @$obs_l ) 
+               : ''
+              ),
+              ((@xrefs) ?
+               join("", map {&$sub(" ; ".($_->as_str || ''))} @xrefs )
+               : ''
+              ),
+              ((@syns) ?
+               join("", map {&$sub(" ; synonym:$_")} @syns ):""
+              ),
+             );
+    return $text;
+}
+
+sub to_ptuples {
+    my $self = shift;
+    my ($th, $include, $sort) =
+      rearrange([qw(tuples include sort)], @_);
+    my @s = ();
+    push(@s,
+         ["term",
+          $self->acc,
+          $self->name,
+          ]);
+    foreach my $x (@{$self->dbxref_list || []}) {
+        push(@s, $x->to_ptuples(-tuples=>$th));
+        push(@s, ["term_dbxref",
+                  $self->acc,
+                  $x->as_str]);
+    }
+    @s;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/TreeIterator.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/TreeIterator.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/TreeIterator.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,348 @@
+# $Id: TreeIterator.pm,v 1.6 2007/05/29 06:00:01 girlwithglasses Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+#
+
+package GO::Model::TreeIterator;
+
+=head1 NAME
+
+  GO::Model::GraphIterator;
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+This is a hack.  It wraps GO::Model::GraphIterator and provides
+a tree like iteration, rather than a graph-like iteration.
+
+This is done by giving TreeIterator a template array.
+
+The array looks like this :
+
+[
+[3674, 'isa', 3673],
+[9277, 'isa', 5618]
+]
+
+3674 is selected iff its the child of 3673.  
+9277 is selected iff it is the child of 5618.
+
+=cut
+
+
+use Carp;
+use strict;
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Graph;
+use GO::Model::GraphNodeInstance;
+use FileHandle;
+use Exporter;
+use Data::Dumper;
+use vars qw(@EXPORT_OK %EXPORT_TAGS);
+
+use base qw(GO::Model::Root Exporter);
+
+sub _valid_params {
+    return qw(graph order sort_by noderefs direction no_duplicates reltype_filter visited arcs_visited);
+}
+
+=head2 order
+
+  Usage   - $graphiter->order("breadth");
+  Returns - string
+  Args    - string
+
+gets/sets traversal order; breadth or depth; default is depth
+
+=cut
+
+=head2 direction
+
+  Usage   - $graphiter->direction("up");
+  Returns - string
+  Args    - string
+
+gets/sets direction; default is "down"
+
+=cut
+
+#sub _initialize {
+#    my $self = shift;
+#    my $acc;
+#    if (!ref($_[0])) {
+#        $acc = shift;
+#    }
+#    $self->SUPER::_initialize(@_);
+#    $self->reset_cursor($acc);
+#}
+
+
+sub new {
+  my $class = shift;
+  my $self = {};
+  bless $self, $class;
+  $self->{'graph'} = shift || $self->throw("no graph passed in to constructor");
+  $self->{'selected_array'} = shift;
+  $self->{'show_kids'} = shift;
+  $self->{'closed_below'} = shift;
+  $self->{'nit'} = $self->{'graph'}->create_iterator({compact=>1});
+  $self->{'bootstrap_mode'} = 0;
+#  $self->SUPER::_initialize(@_);
+#  $self->{'current_path'};
+  $self->{'nit'}->reset_cursor();
+  return $self;
+}
+
+
+=head2 reset_cursor
+
+  Usage   -
+  Returns - GO::Model::Term
+  Args    -
+
+=cut
+
+sub reset_cursor {
+    my $self = shift;
+
+    $self->{'nit'}->reset_cursor();
+} 
+
+=head2 next_node
+
+  Usage   -
+  Returns - GO::Model::Term
+  Args    -
+
+=cut
+
+sub next_node {
+    my $self = shift;
+    my $ni = $self->next_node_instance;
+    return $ni ? $ni->term : undef;
+} 
+
+=head2 set_bootstrap_mode
+
+  Usage   -
+  Returns - 
+  Args    -
+
+=cut
+
+sub set_bootstrap_mode {
+    my $self = shift;
+   
+  $self->{'bootstrap_mode'} = 1;
+}
+
+=head2 get_bootstrap_mode
+
+  Usage   -
+  Returns - 
+  Args    -
+
+=cut
+
+sub get_bootstrap_mode {
+    my $self = shift;
+   
+  return $self->{'bootstrap_mode'};
+}
+
+=head2 get_current_path
+
+  Usage   -
+  Returns - array ref
+  Args    - none
+
+=cut
+
+sub get_current_path {
+  my $self = shift;
+  return $self->{'current_path'};
+}
+
+=head2 next_node_instance
+
+  Usage   -
+  Returns - GO::Model::GraphNodeInstance
+  Args    -
+
+=cut
+
+sub next_node_instance {
+  my $self = shift;
+
+  my $current_coords = $self->{'current_coords'} || [];
+  my $nit = $self->{'nit'};
+  my $previous_depth = $self->{'previous_depth'} || 1;
+  my $parent_array = $self->{'current_path'};
+
+  my $ni = $nit->next_node_instance;
+  if ($ni) {
+    my $depth = $ni->depth;
+    if ($previous_depth == $depth) {
+      $parent_array->[$depth] = $ni->term->public_acc;
+    } elsif ($previous_depth > $depth) {
+      while ($previous_depth > $depth) {
+	$previous_depth -= 1;
+	pop @$parent_array;
+      }
+      $parent_array->[$depth] = $ni->term->public_acc;
+    } elsif ($previous_depth < $depth) {
+      push @$parent_array, $ni->term->public_acc;
+    }
+
+    $self->{'previous_depth'} = $ni->depth;
+    $self->{'current_path'} = $parent_array;
+
+    if ($self->get_bootstrap_mode) {
+      return $ni;
+    }
+    
+    if ($self->should_draw_below($parent_array)) {
+      return $ni;
+    } else {
+	$self->next_node_instance;
+    }
+  } else {
+    return 0;
+  }
+}
+
+sub should_draw_below {
+  my $self = shift;
+  my $current_coords = shift;
+  my $coord_list = $self->{'selected_array'};
+  
+  foreach my $coords (@$coord_list) {
+    if (scalar(@$current_coords) <= scalar(@$coords)) {
+      my $result = 1;
+      my $i = 0;
+      my $length;
+      while ($i < scalar(@$current_coords)) {
+          if ($coords->[$i] ne $current_coords->[$i]) {
+	  $result = 0;
+	}
+      } continue {
+	$i++;
+      }
+      if ($result == 1) {
+	return 1;
+      }
+    } elsif (scalar(@$current_coords) > scalar(@$coords)) {
+      my $i = 0;
+      my $test = 1;
+      while ($i < scalar(@$coords)) {
+          if ($current_coords->[$i] ne $coords->[$i]) {
+	  $test = 0;
+	}
+      } continue {
+	$i++;
+      }
+	if ($test) {
+	  my $parent_coords;
+	  foreach my $anc(@$current_coords) {
+	    push @$parent_coords, $anc;
+	  }
+	  pop @$parent_coords;
+	  if ($self->is_selected($parent_coords, 'show_kids')) {
+	    return 1;
+	  }
+	}
+    }
+  }
+  return 0;
+}
+
+
+sub close_below {
+    my $self = shift;
+    my $closed_array = $self->{"closed_below"};
+    
+    foreach my $closed (@$closed_array) {
+	$self->{'selected_array'} = $self->delete_array($closed);
+    }
+    foreach my $closed (@$closed_array) {
+	$self->{'show_kids'} = $self->delete_array($closed, 'show_kids');
+    }
+}
+
+sub delete_array {
+    my $self = shift;
+    my $parent_array = shift;
+    my $array_to_test_against = shift || 'selected_array';
+
+
+    my $selected_array = $self->{$array_to_test_against};
+    my @two_d_array;
+
+    foreach my $arr(@$selected_array) {
+	my $test = 1;
+	if (scalar(@$arr) >= scalar(@$parent_array)) {
+	my $i = 0;
+	while ($i < scalar(@$parent_array)) {
+	    if ($parent_array->[$i] ne $arr->[$i]) {
+		$test = 0;
+	    }
+	} continue {
+	    $i++;
+	}
+    } else {
+	$test = 0;
+    }
+	if ($test != 1) {
+	    push @two_d_array, $arr;
+	} else {
+	}
+    }
+    return \@two_d_array;
+}
+
+sub is_selected {
+  my $self = shift;
+  my $parent_array = shift;
+  my $array_to_test_against = shift || 'selected_array';
+
+  my $selected_array = $self->{$array_to_test_against};
+
+  foreach my $arr(@$selected_array) {
+    if (scalar(@$arr) eq scalar(@$parent_array)) {
+      my $i = 0;
+      my $test = 1;
+      while ($i < scalar(@$arr)) {
+          if ($parent_array->[$i] ne $arr->[$i]) {
+	  $test = 0;
+	}
+      } continue {
+	$i++;
+      }
+      if ($test == 1) {
+	return 1;
+      }
+    }
+  }
+  return 0;
+}
+
+sub reltype_filter {
+    my $self = shift;
+    $self->{'nit'}->reltype_filter(@_);
+}
+
+1;
+
+
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Xref.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Xref.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Model/Xref.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,262 @@
+# $Id: Xref.pm,v 1.3 2005/02/11 05:44:56 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Model::Xref;
+
+=head1 NAME
+
+  GO::Model::Xref;
+
+=head1 SYNOPSIS
+
+  my $xrefs = $term->dbxref_list();
+  foreach my $xref (@$xrefs) P
+    printf "Term %s has an xref %s:%s\n", 
+            $term->name, $xref->xref_key, $xref->dbname;
+  }
+
+=head1 DESCRIPTION
+
+represents a cross reference to an external database. an Xref is made
+up of a key (ie the accession number, or whatever the value of the
+unique field being keyed off of is) and a database name. this should
+theorerically be enough to uniquely identify any databased entity.
+
+=head1 NOTES
+
+Like all the GO::Model::* classes, this uses accessor methods to get
+or set the attributes. by using the accessor method without any
+arguments gets the value of the attribute. if you pass in an argument,
+then the attribuet will be set according to that argument.
+
+for instance
+
+  # this sets the value of the attribute
+  $my_object->attribute_name("my value");
+
+  # this gets the value of the attribute
+  $my_value = $my_object->attribute_name();
+
+=cut
+
+
+use Carp qw(cluck confess);
+use Exporter;
+use GO::Utils qw(rearrange);
+use GO::Model::Root;
+use strict;
+use vars qw(@ISA);
+
+ at ISA = qw(GO::Model::Root Exporter);
+
+
+sub _valid_params {
+    return qw(id xref_key xref_keytype xref_dbname xref_desc name);
+}
+
+sub _valid_dbnames {
+    return qw(go gxd sgd tair mgi fb sp sp_kw egad
+	      ec medline pmid isbn omim embl publication U);
+}
+
+
+=head2 xref_key
+
+  Alias   - acc
+  Alias   - accession
+  Usage   -
+  Returns -
+  Args    -
+
+ accessor: gets/sets the key/id of the cross reference
+
+=cut
+
+sub xref_key {
+    my $self = shift;
+    $self->{xref_key} = shift if @_;
+    if ($self->{xref_dbname} &&
+        $self->{xref_dbname} =~ /interpro/i) {
+        if ($self->{xref_key} && $self->{xref_key} =~ /(\S+) (.*)/) {
+            $self->{xref_key} = $1;
+            $self->{xref_desc} = $2;
+        }
+    }
+    return $self->{xref_key};
+}
+*accession = \&xref_key;
+*acc = \&xref_key;
+
+
+=head2 xref_keytype
+
+  Usage   -
+  Returns -
+  Args    -
+
+ accessor: gets/sets the key/id type of the cross reference
+
+
+=cut
+
+sub xref_keytype {
+    my $self = shift;
+    $self->{xref_keytype} = shift if @_;
+    return $self->{xref_keytype};
+}
+
+
+=head2 as_str
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub as_str {
+    my $self=shift;
+#    cluck unless defined $self->xref_dbname;
+#    cluck unless defined $self->xref_key;
+    return $self->xref_dbname().":".$self->xref_key();
+}
+
+
+=head2 xref_dbname
+
+  Alias   - dbname
+  Usage   -
+  Returns -
+  Args    -
+
+ accessor: gets/sets the database name of the cross reference
+
+must be a valid database name
+
+=cut
+
+sub xref_dbname {
+    my $self = shift;
+    $self->{xref_dbname} = shift if @_;
+    return $self->{xref_dbname};
+}
+*dbname = \&xref_dbname;
+
+=head2 xref_desc
+
+  Alias   - name
+  Usage   -
+  Returns -
+  Args    -
+
+ accessor: gets/sets the description of the accession no
+
+useful for interpro
+
+=cut
+
+sub xref_desc {
+    my $self = shift;
+    $self->{xref_desc} = shift if @_;
+    return $self->{xref_desc};
+}
+*name = \&xref_desc;
+
+sub to_idl_struct {
+    my $self = shift;
+    return
+      {
+       dbname=>$self->xref_dbname,
+       keyvalue=>$self->xref_key,
+      };
+}
+
+
+=head2 to_xml
+
+  Usage   - print $xref->to_xml()
+  Returns - string
+  Args    - indent [integer]
+
+XML representation; you probably shouldnt call this directly, this
+will be called by entities that own xrefs
+
+=cut
+
+sub to_xml {
+    my $self = shift;
+    my $indent = shift || "";
+
+    my $text = $indent."<game:db_xref>\n";
+    $text .= $indent."  <game:db_name>".
+	$self->xref_dbname."</game:db_name>\n";
+    if ( $self->xref_keytype ) {
+	if ( $self->xref_keytype =~ /personal communication/ ) {
+	    $text .= $indent."  <game:xref_type>".
+		$self->xref_keytype."</game:xref_type>\n";
+	    $text .= $indent."  <xref_person>".
+		$self->xref_key."</xref_person>\n";
+	}
+	else {
+	    if ($self->xref_keytype !~ /acc/) {
+		$text .= $indent."  <game:xref_type>".
+		    $self->xref_keytype."</game:xref_type>\n";
+	    }
+	    $text .= $indent."  <game:db_id>".
+		$self->xref_key."</game:db_id>\n";
+	}
+    }
+    else {
+	$text .= $indent."  <game:db_id>".$self->xref_key."</game:db_id>\n";
+    }
+    $text .= $indent."</game:db_xref>\n";
+    return $text;
+}
+
+sub to_ptuples {
+    my $self = shift;
+    my ($th) =
+      rearrange([qw(tuples)], @_);
+    my @s = ();
+    my @desc = ($self->xref_desc);
+    pop @desc unless $desc[0];
+    push(@s,
+         ["xref",
+          $self->as_str,
+          $self->xref_dbname,
+          $self->xref_key,
+          @desc,
+          ]);
+    @s;
+}
+
+# **** EXPERIMENTAL CODE ****
+# the idea is to be homogeneous and use graphs for
+# everything; eg gene products are nodes in a graph,
+# associations are arcs
+# cf rdf, daml+oil etc
+
+# args - optional graph to add to
+sub graphify {
+    my $self = shift;
+    my ($ref, $subg, $opts) =
+      rearrange([qw(ref graph opts)], @_);
+
+    $opts = {} unless $opts;
+    $subg = $self->apph->create_graph_obj unless $subg;
+
+    my $t =
+      $self->apph->create_term_obj({name=>$self->as_str,
+                                    acc=>$self->as_str});
+    $subg->add_node($t);
+    $subg->add_arc($t, $ref, "hasXref");
+    return $subg;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/ObjCache.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/ObjCache.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/ObjCache.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,130 @@
+# $Id: ObjCache.pm,v 1.3 2005/05/20 18:46:57 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::ObjCache;
+
+=head1 NAME
+
+  GO::ObjCache;
+
+=head1 DESCRIPTION
+
+This is a kind of L<GO::ObjFactory> - you should not need to use this
+method directly
+
+=cut
+
+use Carp;
+use strict;
+use Exporter;
+use GO::Utils qw(rearrange);
+#use strict;
+use FileHandle;
+use Exporter;
+use vars qw(@ISA);
+use strict;
+
+use base qw(GO::Model::Graph GO::ObjFactory);
+
+sub _valid_params {
+    return qw(dbh);
+}
+
+sub _initialize {
+    my $self = shift;
+    $self->SUPER::_initialize(@_);
+}
+
+sub apph {
+    my $self = shift;
+    $self->{apph} = shift if @_;
+    return $self->{apph} || $self;
+}
+
+sub n_deep_associations {
+    my $self = shift;
+    my $acc = shift;
+    $self->extend_down([$acc]);   # make sure all terms loaded
+    $self->SUPER::n_deep_associations($acc);
+}
+
+sub deep_association_list {
+    my $self = shift;
+    my $acc = shift;
+    $self->extend_down([$acc]);   # make sure all terms loaded
+    $self->SUPER::deep_association_list($acc);
+}
+
+#------
+
+sub extend_graph_by_acc {
+    my $self = shift;
+    my $graph = shift;
+    my $acc = shift;
+    my $depth = shift;
+
+    my $term = $self->get_term($acc);
+    $self->extend_up($graph, [$acc]);
+    $self->extend_down($graph, [$acc], $depth);
+
+}
+
+sub extend_up {
+    my $self = shift;
+    my $graph = shift;
+    my @accs = @{shift || []};
+    my $i=0;
+    while ($i < scalar(@accs)) {
+	my $acc = $accs[$i];
+	$i++;
+	my $term = $self->get_term($acc);
+	$graph->add_term($term);
+	my $parent_rels = $self->get_parent_relationships($acc);
+	foreach my $rel (@$parent_rels) {
+	    $graph->add_relationship($rel);
+	    if (!(grep {$_ == $rel->acc1} @accs)) {
+		# only put new accs in
+		push(@accs, $rel->acc1);
+	    }
+	}
+    } @accs;
+}
+
+sub extend_down {
+    my $self = shift;
+    my $graph = shift;
+    my @accs = @{shift || []};
+    my $max_depth = shift;
+
+    my $i=0;
+    while ($i < scalar(@accs)) {
+	printf STDERR
+	  "======== %d %d %s\n",
+	  $i,
+	  $#accs,
+	  join(", ", @accs);
+	my $acc = $accs[$i];
+	$i++;
+	my $term = $self->get_term($acc);
+	$graph->add_term($term);
+	my $child_rels = $self->get_child_relationships($acc);
+	foreach my $rel (@$child_rels) {
+	    $graph->add_relationship($rel);
+	    if (!(grep {$_ == $rel->acc2} @accs)) {
+		# only put new accs in
+		push(@accs, $rel->acc2);
+	    }
+	}
+    } @accs;
+    
+}
+
+sub get_deep_product_count { 0 }
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/ObjFactory.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/ObjFactory.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/ObjFactory.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,270 @@
+# $Id: ObjFactory.pm,v 1.6 2007/01/24 01:16:19 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::ObjFactory;
+
+=head1 NAME
+
+  GO::ObjFactory     - GO Object Factory
+
+=head1 SYNOPSIS
+
+You should not use this method directly
+
+=head1 DESCRIPTION
+
+You only need to be aware of this class if you are generating new
+objects. You should not directly create objects like this:
+
+  $term = GO::Model::Term->new($h);
+
+Instead you should create them like this:
+
+  $fac = GO::ObjFactory->new();
+  $term = $fac->create_term_obj($h);
+
+Usually you do not need to instantiate a factory, as all objects
+created with a factory carry around a reference to that factory, so
+you can do this:
+
+  # $graph object was previously created via a factory
+  $term = $graph->create_term_obj($h);
+
+If you are only using the go-perl module, then factories do not buy
+you much. However, if you are also using go-db-perl and GO::AppHandle,
+then factories can be useful - all objects generated from the database
+will be attached to an AppHandle which means that "lazy loading" can
+be used. See GO::AppHandle in go-db-perl for details
+
+=cut
+
+
+use strict;
+use Carp;
+use GO::Model::Seq;
+use GO::Model::Term;
+use GO::Model::Xref;
+use GO::Model::GeneProduct;
+use GO::Model::CrossProduct;
+use GO::Model::LogicalDefinition;
+use GO::Model::Graph;
+use GO::Model::DB;
+use GO::Model::Ontology;
+use GO::Model::Property;
+use GO::Model::Restriction;
+use GO::Model::Species;
+use base qw(GO::Model::Root);
+
+sub apph{
+  my $self = shift;
+  $self->{apph} = shift if @_;
+
+  my $apph = $self->{apph} || $self;
+  return $apph;
+}
+
+
+
+
+=head2 create_term_obj
+
+  Usage   - $term = $apph->create_term_obj;
+  Returns - L<GO::Model::Term>
+  Args    -
+
+=cut
+
+sub create_term_obj {
+    my $self = shift;
+    my $term = GO::Model::Term->new(@_);
+    $term->apph( $self->apph );
+    return $term;
+}
+
+=head2 create_relationship_obj
+
+  Usage   - $relationship = $apph->create_relationship_obj;
+  Returns - L<GO::Model::Relationship>
+  Args    -
+
+=cut
+
+sub create_relationship_obj {
+    my $self = shift;
+    my $term = GO::Model::Relationship->new(@_);
+    $term->apph( $self->apph );
+    return $term;
+}
+
+=head2 create_xref_obj
+
+  Usage   - $xref = $apph->create_xref_obj;
+  Returns - L<GO::Model::Xref>
+  Args    -
+
+=cut
+
+sub create_xref_obj {
+    my $self = shift;
+    my $xref = GO::Model::Xref->new(@_);
+#    $xref->apph($self);
+    return $xref;
+}
+
+=head2 create_evidence_obj
+
+  Usage   - $evidence = $apph->create_evidence_obj;
+  Returns - L<GO::Model::Evidence>
+  Args    -
+
+=cut
+
+sub create_evidence_obj {
+    my $self = shift;
+    my $ev = GO::Model::Evidence->new(@_);
+    return $ev;
+}
+
+=head2 create_seq_obj
+
+  Usage   - $seq = $apph->create_seq_obj;
+  Returns - L<GO::Model::Seq>
+  Args    -
+
+=cut
+
+sub create_seq_obj {
+    my $self = shift;
+    my $seq = GO::Model::Seq->new(@_);
+    $seq->apph( $self->apph );
+    return $seq;
+}
+
+=head2 create_db_obj
+
+  Usage   - $db = $apph->create_db_obj;
+  Returns - L<GO::Model::DB>
+  Args    -
+
+=cut
+
+sub create_db_obj {
+    my $self = shift;
+    my $db = GO::Model::DB->new(@_);
+    $db->apph( $self->apph );
+    return $db;
+}
+
+=head2 create_association_obj
+
+  Usage   - $association = $apph->create_association_obj;
+  Returns - L<GO::Model::Association>
+  Args    -
+
+=cut
+
+sub create_association_obj {
+    my $self = shift;
+    my $association = GO::Model::Association->new();
+    $association->apph( $self->apph );
+    $association->_initialize(@_);
+    return $association;
+}
+
+=head2 create_gene_product_obj
+
+  Usage   - $gene_product = $apph->create_gene_product_obj;
+  Synonym - create_product_obj
+  Returns - L<GO::Model::GeneProduct>
+  Args    -
+
+=cut
+
+sub create_gene_product_obj {
+    my $self = shift;
+    my $gene_product = GO::Model::GeneProduct->new(@_);
+    $gene_product->apph( $self->apph );
+    return $gene_product;
+}
+*create_product_obj = \&create_gene_product_obj;
+
+=head2 create_species_obj
+
+  Usage   - $species = $apph->create_species_obj;
+  Returns - L<GO::Model::Species>
+  Args    -
+
+=cut
+
+sub create_species_obj {
+    my $self = shift;
+    my $sp = GO::Model::Species->new(@_);
+    $sp->apph( $self->apph );
+    return $sp;
+}
+
+=head2 create_graph_obj
+
+  Usage   - $graph = $apph->create_graph_obj;
+  Returns - L<GO::Model::Graph>
+  Args    -
+
+=cut
+
+sub create_graph_obj {
+    my $self = shift;
+    my $graph = GO::Model::Graph->new(@_);
+    $graph->apph( $self->apph );
+    return $graph;
+}
+
+# deprecated synonym for Graph
+sub create_ontology_obj {
+    my $self = shift;
+    my $ontology = GO::Model::Ontology->new(@_);
+    $ontology->apph( $self->apph );
+    return $ontology;
+}
+
+# alpha code
+sub create_property_obj {
+    my $self = shift;
+    my $property = GO::Model::Property->new(@_);
+    $property->apph( $self->apph );
+    return $property;
+}
+
+
+# alpha code
+sub create_restriction_obj {
+    my $self = shift;
+    my $restriction = GO::Model::Restriction->new(@_);
+    $restriction->apph( $self->apph );
+    return $restriction;
+}
+
+sub create_logical_definition_obj {
+    my $self = shift;
+    my $ldef = GO::Model::LogicalDefinition->new(@_);
+    $ldef->apph( $self->apph );
+    return $ldef;
+}
+
+
+# experimental/deprecated code
+sub create_cross_product_obj {
+    my $self = shift;
+    my $cross_product = GO::Model::CrossProduct->new(@_);
+    $cross_product->apph( $self->apph );
+    return $cross_product;
+}
+
+1;
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,615 @@
+# $Id: Parser.pm,v 1.15 2006/04/20 22:48:23 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+  GO::Parser     - parses all GO files formats and types
+
+=head1 SYNOPSIS
+
+fetch L<GO::Model::Graph> objects using a parser:
+
+  # Scenario 1: Getting objects from a file
+  use GO::Parser;
+  my $parser = new GO::Parser({handler=>'obj',use_cache=>1});
+  $parser->parse("function.ontology");     # ontology
+  $parser->parse("GO.defs");               # definitions
+  $parser->parse("ec2go");                 # external refs
+  $parser->parse("gene-associations.sgd"); # gene assocs
+  # get GO::Model::Graph object
+  my $graph = $parser->handler->graph;
+
+  # Scenario 2: Getting OBO XML from a file
+  use GO::Parser;
+  my $parser = new GO::Parser({handler=>'xml'});
+  $parser->handler->file("output.xml");
+  $parser->parse("gene_ontology.obo");
+
+  # Scenario 3: Using an XSL stylesheet to convert the OBO XML
+  use GO::Parser;
+  my $parser = new GO::Parser({handler=>'xml'});
+  # xslt files are kept in in $ENV{GO_ROOT}/xml/xsl
+  # (if $GO_ROOT is not set, defaults to install directory)
+  $parser->xslt("oboxml_to_owl"); 
+  $parser->handler->file("output.owl-xml");
+  $parser->parse("gene_ontology.obo");
+
+  # Scenario 4: via scripts
+  my $cmd = "go2xml gene_ontology.obo | xsltproc my-transform.xsl -";
+  my $fh = FileHandle->new("$cmd |") || die("problem initiating $cmd");
+  while(<$fh>) { print $_ }
+  $fh->close || die("problem running $cmd");
+
+=cut
+
+=head1 DESCRIPTION
+
+Module for parsing GO flat files; for examples of GO/OBO flatfile
+formats see:
+
+L<ftp://ftp.geneontology.org/pub/go/ontology>
+
+L<ftp://ftp.geneontology.org/pub/go/gene-associations>
+
+For a description of the various file formats, see:
+
+L<http://www.geneontology.org/GO.format.html>
+
+L<http://www.geneontology.org/GO.annotation.html#file>
+
+This module will generate XML events from a correctly formatted GO/OBO
+file
+
+=head1 SEE ALSO
+
+This module is a part of go-dev, see:
+
+L<http://www.godatabase.org/dev>
+
+for more details
+
+=head1 PUBLIC METHODS
+
+=head2 new
+
+ Title   : new
+ Usage   : my $p = GO::Parser->new({format=>'obo_xml',handler=>'obj'});
+           $p->parse("go.obo-xml");
+           my $g = $p->handler->graph;
+ Synonyms: 
+ Function: creates a parser object
+ Example : 
+ Returns : GO::Parser
+ Args    : a hashref of arguments:
+            format: a format for which a parser exists
+            handler: a format for which a perl handler exists
+            use_cache: (boolean) see caching below
+
+=head2 parse
+
+ Title   : parse
+ Usage   : $p->parse($file);
+ Synonyms: 
+ Function: parses a file
+ Example : 
+ Returns : 
+ Args    : str filename
+
+=head2 handler
+
+ Title   : handler
+ Usage   : my $handler = $p->handler;
+ Synonyms: 
+ Function: gets/sets a GO::Handler object
+ Example : 
+ Returns : L<GO::Handlers::base>
+ Args    : L<GO::Handlers::base>
+
+=head1 FORMATS
+
+This module is a front end wrapper for a number of different GO/OBO
+formats - see the relevant module documentation below for details.
+
+The full list of parsers can be found in the go-perl/GO/Parsers/
+directory
+
+=over
+
+=item obo_text
+
+Files with suffix ".obo"
+
+This is a new file format replacement for the existing GO flat file
+formats. It handles ontologies, definitions and xrefs (but not
+associations)
+
+=item go_ont
+
+Files with suffix ".ontology"
+
+These store the ontology DAGs
+
+=item go_def
+
+Files with suffix ".defs"
+
+=item go_xref
+
+External database references for GO terms
+
+Files with suffix "2go" (eg ec2go, metacyc2go)
+
+=item go_assoc
+
+Annotations of genes or gene products using GO
+
+Files with prefix "gene-association."
+
+=item obo_xml
+
+Files with suffix ".obo.xml" or ".obo-xml"
+
+This is the XML version of the OBO flat file format above
+
+See L<http://www.godatabase.org/dev/xml/doc/xml-doc.html>
+
+=item obj_yaml
+
+A YAML dump of the perl L<GO::Model::Graph> object. You need L<YAML>
+from CPAN for this to work
+
+=item obj_storable
+
+A dump of the perl L<GO::Model::Graph> object. You need L<Storable>
+from CPAN for this to work. This is intended to cache objects on the
+filesystem, for fast access. The obj_storable representation may not
+be portable
+
+=head2 PARSING ARCHITECTURE
+
+Each parser fires XML B<events>. The XML events are known as
+B<Obo-XML>.  
+
+These XML events can be B<caught> by a handler written in perl, or
+they can be caught by an XML parser written in some other language, or
+by using XSL stylesheets.
+
+go-dev comes with a number of stylesheets in the 
+  go-dev/xml/xsl
+directory
+
+Anything that catches these XML events is known as a B<handler>
+
+go-perl comes with some standard perl XML handlers, in addition to
+some standard XSL stylesheets. These can be found in the
+B<go-dev/go-perl/GO/Handlers> directory
+
+If you are interested in getting perl B<objects> from files then you
+will want the B<obj> handler, which gives back L<GO::Model::Graph>
+objects
+
+The parsing architecture gives you the option of using the go-perl
+object model, or just parsing the XML events directly
+
+If you are using the go-db-perl library, the load-go-into-db.pl script
+will perform the following processes when loading files into the
+database
+
+=over
+
+=item Obo-XML events fired using GO::Parser::* classes
+
+=item Obo-XML transformed into godb xml using oboxml_to_godb_prestore.xsl
+
+=item godb_prestore.xml stored in database using generic loader
+
+=back
+
+=head2 Obo-XML
+
+The Obo-XML format DTD is stored in the go-dev/xml/dtd directory
+
+=head2 HOW IT WORKS
+
+Currently the various parsers and perl event handlers use the B<stag>
+module for this - see L<Data::Stag> for more details, or
+http://stag.sourceforge.net
+
+=head2 NESTED EVENTS
+
+nested events can be thought of as xml, without attributes; nested
+events can easily be turned into xml
+
+events have a start, a body and an end
+
+event handlers can *catch* these events and do something with them.
+
+an object handler can turn the events into objects, centred around the
+GO::Model::Graph object; see GO::Handlers::obj
+
+other handlers can catch the events and convert them into other
+formats, eg OWL or OBO
+
+Or you can bypass the handler and get output as an XML stream - to do
+this, just run the go2xml script
+
+a database loading event handler can catch the events and turn them
+into SQL statements, loading a MySQL or postgres database (see the
+go-db-perl library)
+
+the advantage of an event based parsing architecture is that it is
+easy to build lightweight parsers, and heavy weight object models can
+be bypassed if prefered.
+
+=head2 EXAMPLES
+
+To see examples of the events generated by the GO::Parser class, run
+the script go2xml; for example
+
+  go2xml function.ontology
+
+on any GO-formatted flatfile
+
+This also works on OBO-formatted files:
+
+  go2xml gene_ontology.obo
+
+You can also use the script "stag-parse.pl" which comes with the
+L<Data::Stag> distribution. for example
+
+  stag-parse.pl -p GO::Parsers::go_assoc_parser gene-association.fb
+
+=head2 XSLT HANDLERS
+
+The full list can be found in the go-dev/xml/xsl directory
+
+=head2 PERL HANDLERS
+
+see GO::Handlers::* for all the different handlers possible;
+more can be added dynamically.
+
+you can either create the handler object yourself, and pass it as an argument,
+e.g.
+
+  my $apph    = new GO::AppHandle(-db=>"go");
+  my $handler = new GO::Handlers::godb({apph=>$apph});
+  my $parser  = new GO::Parser({handler=>$handler});
+  $parser->parse(@files);
+
+or you can use one of the registered handlers:
+
+  my $parser = new GO::Parser({handler=>'db',
+                               handler_args=>{apph=>$apph}});
+
+or you can just do things from the command line
+
+  go2fmt.pl -w oboxml function.ontology
+
+
+the registered perl handlers are as follows:
+
+=over
+
+=item obo_xml
+
+writes out OBO-XML (which is basically a straightforward conversion of
+the event stream into XML)
+
+=item obo_text
+
+=item go_ont
+
+legacy GO-ontology file format
+
+=item go_xref
+
+GO xref file, for linking GO terms to terms and dbxrefs in other ontologies
+
+=item go_defs
+
+legacy GO-definitions file format
+
+=item go_assoc
+
+GO association file format
+
+=item rdf
+
+GO XML-RDF file format
+
+=item owl
+
+OWL format (default: OWL-DL)
+
+OWL is a W3C standard format for ontologies
+
+You will need the XSL files from the full go-dev distribution to run
+this; see the XML section in L<http://www.godatabase.org/dev>
+
+=item prolog
+
+prolog facts - you will need a prolog compiler/interpreter to use
+these. You can reason over these facts using Obol or the forthcoming
+Bio-LP project
+
+=item sxpr
+
+lisp style S-Expressions, conforming to the OBO-XML schema; you will
+need lisp to make full use of these. you can also do some nice stuff
+just within emacs (use lisp-mode and load an sxpr file into your
+buffer)
+
+=item godb
+
+this is actually part of the go-db-perl library, not the go-perl library
+
+catches events and loads them into a database conforming to the GO
+database schema; see the directory go-dev/sql, as part of the whole
+go-dev distribution; or www.godatabase.org/dev/database
+
+=item obj_yaml
+
+A YAML dump of the perl L<GO::Model::Graph> object. You need L<YAML>
+from CPAN for this to work
+
+=item obj_storable
+
+A dump of the perl L<GO::Model::Graph> object. You need L<Storable>
+from CPAN for this to work. This is intended to cache objects on the
+filesystem, for fast access. The obj_storable representation may not
+be portable
+
+=back
+
+=head1 EXAMPLES OF DATATYPE TEXT FORMATS
+
+=head2 go_ont format
+
+eg format: go_ont for storing graphs and metadata; for example:
+
+  !version: $Revision: 1.15 $
+  !date: $Date: 2006/04/20 22:48:23 $
+  !editors: Michael Ashburner (FlyBase), Midori Harris (SGD), Judy Blake (MGD)
+  $Gene_Ontology ; GO:0003673
+   $cellular_component ; GO:0005575
+    %extracellular ; GO:0005576
+     <fibrinogen ; GO:0005577
+      <fibrinogen alpha chain ; GO:0005972
+      <fibrinogen beta chain ; GO:0005973
+
+See GO::Parsers::go_ont_parser for more details
+
+this is the following file parsed with events turned directly into OBO-XML:
+  
+  <?xml version="1.0" encoding="UTF-8"?>
+  <obo>
+    <source>
+      <source_type>file</source_type>
+      <source_path>z.ontology</source_path>
+      <source_mtime>1075164285</source_mtime>
+    </source>
+    <term>
+      <id>GO:0003673</id>
+      <name>Gene_Ontology</name>
+      <ontology>root</ontology>
+    </term>
+    <term>
+      <id>GO:0005575</id>
+      <name>cellular_component</name>
+      <ontology>root</ontology>
+      <is_a>GO:0003673</is_a>
+    </term>
+    <term>
+      <id>GO:0005576</id>
+      <name>extracellular</name>
+      <ontology>root</ontology>
+      <is_a>GO:0005575</is_a>
+    </term>
+    <term>
+      <id>GO:0005577</id>
+      <name>fibrinogen</name>
+      <ontology>root</ontology>
+      <relationship>
+        <type>part_of</type>
+        <to>GO:0005576</to>
+      </relationship>
+    </term>
+    <term>
+      <id>GO:0005972</id>
+      <name>fibrinogen alpha chain</name>
+      <ontology>root</ontology>
+      <relationship>
+        <type>part_of</type>
+        <to>GO:0005577</to>
+      </relationship>
+    </term>
+    <term>
+      <id>GO:0005973</id>
+      <name>fibrinogen beta chain</name>
+      <ontology>root</ontology>
+      <relationship>
+        <type>part_of</type>
+        <to>GO:0005577</to>
+      </relationship>
+    </term>
+  </obo>
+
+=head2 go_def format
+
+eg format: go_defs for storing definitions:
+
+  !Gene Ontology definitions
+  !
+  term: 'de novo' protein folding
+  goid: GO:0006458
+  definition: Processes that assist the folding of a nascent peptide chain into its correct tertiary structure.
+  definition_reference: Sanger:mb
+
+See GO::Parsers::go_def_parser for more details
+
+=head2 go_xref format
+
+eg format: go_xrefs for storing links between GO IDs and IDs for terms
+in other DBs:
+
+  EC:1.-.-.- > GO:oxidoreductase ; GO:0016491
+  EC:1.1.-.- > GO:1-phenylethanol dehydrogenase ; GO:0018449
+
+See GO::Parsers::go_xref_parser for more details
+
+=head2 go_assoc format
+
+eg format: go-assocs for storing gene-associations:
+
+  SGD     S0004660        AAC1            GO:0005743      SGD:12031|PMID:2167309 TAS             C       ADP/ATP translocator    YMR056C gene    taxon:4932 20010118
+  SGD     S0004660        AAC1            GO:0006854      SGD:12031|PMID:2167309 IDA             P       ADP/ATP translocator    YMR056C gene    taxon:4932 20010118
+
+See GO::Parsers::go_assoc_parser for more details
+
+=head2 obo_text format
+
+L<http://www.geneontology.org/GO.format.html>
+
+=cut
+
+package GO::Parser;
+
+use Exporter;
+
+use Carp;
+use GO::Model::Term;
+use FileHandle;
+use strict qw(subs vars refs);
+use base qw(GO::Model::Root);
+
+# Exceptions
+
+
+# Constructor
+
+
+=head2 new
+
+  Usage   - my $parser = GO::Parser->new()
+  Returns - GO::Parser
+
+creates a new parser
+
+=cut
+
+sub new {
+    my $proto = shift; 
+    my $class = ref($proto) || $proto;;
+    my $self = {};
+    bless $self, $class;
+
+    my $init_h = $_[0] || {};
+    if (!ref($init_h)) {
+        $init_h = {@_};
+    }
+    my $fmt = $init_h->{format} || $init_h->{fmt} || '';
+    my $use_cache = $init_h->{use_cache};
+    $fmt = lc($fmt) unless $fmt =~ /::/;
+#    $fmt = 'gotext' unless $fmt;
+    if (!$fmt) {
+	# this parser guesses/defers on what type it is parsing
+	$fmt = "unknown_format";
+    }
+
+    my $p = $self->get_parser_impl($fmt);
+    if ($init_h) {
+	map {$p->{$_} = $init_h->{$_}} keys %$init_h;
+    }
+    
+    my $handler = $init_h->{handler} || "base";
+    if (UNIVERSAL::isa($handler, "GO::AppHandle")) {
+        require "GO/Handlers/DbStoreHandler.pm";
+        $handler = GO::Handlers::DbStoreHandler->new({apph=>$handler});
+    }
+    unless (ref($handler)) {
+	my $hclass = $handler;
+	if ($handler !~ /::/) {
+	    if ($handler =~ /^::/) {
+		$hclass = $handler;
+		$hclass =~ s/^:://;
+	    }
+	    else {
+		$hclass = "GO::Handlers::$handler";
+	    }
+	}
+        eval {
+            $class->load_module($hclass);
+        };
+        if ($@) {
+            print STDERR $@, "\n\n\n";
+            
+            $self->throw("No such handler: $handler");
+        }
+        $handler = $hclass->new($init_h->{handler_args});
+    }
+    $p->handler($handler);
+    $p->use_cache($use_cache);
+
+    delete $init_h->{parser};
+    delete $init_h->{handler};
+
+    return $p;
+}
+
+
+sub get_parser_impl {
+    my $self = shift;
+    my $fmt = shift;
+    my $mod;
+    if ($fmt =~ /::/) {
+	$mod = $fmt;
+    }
+    else {
+	$mod = "GO::Parsers::$fmt"."_parser";
+    }
+    $self->load_module($mod);
+    my $p = $mod->new();
+    return $p;
+}
+
+
+=head2 create_handler
+
+  Usage   - my $handler = GO::Parser->create_handler('obj');
+  Returns - L<GO::Handlers::base>
+  Args    - handler type [str]
+
+=cut
+
+sub create_handler {
+    my $self = shift;
+    my $type = shift || 'obj';
+    my $p = $self->new({handler=>$type});
+    return $p->handler;
+}
+
+sub load_module {
+
+    my $self = shift;
+    my $classname = shift;
+    my $mod = $classname;
+    $mod =~ s/::/\//g;
+
+    if ($main::{"_<$mod.pm"}) {
+    }
+    else {
+	eval {
+	    require "$mod.pm";
+	};
+	if ($@) {
+	    $self->throw("No such module: $classname;;\n$@");
+	}
+    }
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ParserEventNames.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ParserEventNames.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ParserEventNames.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,186 @@
+=head1 NAME
+
+  GO::Parsers::ParserEventNames - exports constants corresponding to XML
+
+=head1 SYNOPSIS
+
+  use GO::Parsers::ParserEventNames;
+
+
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 AUTHOR
+
+=cut
+
+package GO::Parsers::ParserEventNames;
+use strict;
+use base qw(Exporter);
+use vars qw(@EXPORT);
+
+use constant OBO => 'obo';
+use constant HEADER => 'header';
+use constant SUBSETDEF => 'subsetdef';
+
+use constant TYPEDEF => 'typedef';
+use constant IS_CYCLIC => 'is_cyclic';
+use constant IS_TRANSITIVE => 'is_transitive';
+use constant IS_SYMMETRIC  => 'is_symmetric';
+use constant IS_ANTI_SYMMETRIC  => 'is_anti_symmetric';
+use constant IS_REFLEXIVE  => 'is_reflexive';
+use constant IS_METADATA_TAG  => 'is_metadata_tag';
+use constant DISJOINT_FROM => 'disjoint_from';
+use constant INVERSE_OF => 'inverse_of';
+use constant TRANSITIVE_OVER => 'transitive_over';
+use constant DOMAIN => 'domain';
+use constant RANGE => 'range';
+use constant TERM => 'term';
+use constant ID => 'id';
+use constant IS_ANONYMOUS => 'is_anonymous';
+use constant ACC => 'acc';
+use constant NAMESPACE => 'namespace';
+use constant NAME => 'name';
+use constant SUBSET => 'subset';
+use constant DEF => 'def';
+use constant DEFSTR => 'defstr';
+use constant IS_ROOT => 'is_root';
+use constant IS_OBSOLETE => 'is_obsolete';
+use constant BUILTIN => 'builtin';
+use constant IS_A => 'is_a';
+use constant RELATIONSHIP => 'relationship';
+use constant INTERSECTION_OF => 'intersection_of';
+use constant UNION_OF => 'union_of';
+use constant ALT_ID => 'alt_id';
+use constant SYNONYM => 'synonym';
+use constant COMMENT => 'comment';
+use constant TO => 'to';
+use constant TYPE => 'type';
+use constant XREF => 'xref';
+use constant XREF_ANALOG => 'xref_analog';
+use constant XREF_UNKNOWN => 'xref_unknown';
+use constant DBXREF => 'dbxref';
+use constant TERM_DBXREF => 'term_dbxref';
+use constant SYNONYM_TEXT => 'synonym_text';
+use constant SYNONYM_TYPE => 'synonym_type';
+use constant CONSIDER => 'consider';
+use constant REPLACED_BY => 'replaced_by';
+
+use constant INSTANCE => 'instance';
+use constant PROPERTY_VALUE => 'property_value';
+use constant VALUE => 'value';
+use constant DATATYPE => 'datatype';
+
+use constant DBSET => 'dbset';
+use constant DBNAME => 'dbname';
+use constant PROD => 'prod';
+use constant PRODDB => 'proddb';
+use constant PRODNAME => 'prodname';
+use constant PRODSYMBOL => 'prodsymbol';
+use constant PRODACC => 'prodacc';
+use constant PRODTAXA => 'prodtaxa';
+use constant PRODTYPE => 'prodtype';
+use constant SECONDARY_PRODTAXA => 'secondary_prodtaxa'; # DEPRECATED
+use constant PRODSYN => 'prodsyn';
+
+use constant ASSOCS => 'assocs';
+use constant ASSOC => 'assoc';
+use constant QUALIFIER => 'qualifier';
+use constant SPECIES_QUALIFIER => 'species_qualifier';
+use constant PROPERTIES => 'properties';
+use constant ASPECT => 'aspect';
+use constant SOURCE_DB => 'source_db';
+use constant TERMACC => 'termacc';
+use constant IS_NOT => 'is_not';
+use constant ASSOCDATE => 'assocdate';
+use constant WITH => 'with';
+use constant REF => 'ref';
+use constant EVIDENCE => 'evidence';
+use constant EVCODE => 'evcode';
+
+use constant DBXREFS => 'dbxrefs';
+
+
+ at EXPORT = qw(
+  OBO 
+    HEADER
+             SUBSETDEF
+    TYPEDEF             
+             IS_CYCLIC
+             IS_TRANSITIVE
+             IS_SYMMETRIC
+             IS_ANTI_SYMMETRIC
+             IS_REFLEXIVE
+             IS_METADATA_TAG
+             DISJOINT_FROM
+             INVERSE_OF
+             TRANSITIVE_OVER
+             DOMAIN
+             RANGE
+    TERM             
+             ID 
+             IS_ANONYMOUS
+             ACC 
+             NAMESPACE 
+             NAME 
+             SUBSET
+             DEF 
+               DEFSTR 
+             IS_OBSOLETE 
+             IS_ROOT 
+             IS_A 
+             BUILTIN
+             RELATIONSHIP 
+               TO 
+               TYPE 
+             INTERSECTION_OF
+             UNION_OF
+             SYNONYM
+               SYNONYM_TYPE 
+               SYNONYM_TEXT 
+             ALT_ID 
+             CONSIDER
+             REPLACED_BY
+             COMMENT 
+             XREF
+             XREF_ANALOG 
+             XREF_UNKNOWN
+             DBXREF 
+               TERM_DBXREF 
+
+  INSTANCE
+             PROPERTY_VALUE
+               VALUE
+               DATATYPE
+  ASSOCS
+             DBSET
+               DBNAME
+               PROD 
+                 PRODDB 
+                 PRODNAME 
+                 PRODSYMBOL 
+                 PRODACC 
+                 PRODTAXA
+                 PRODTYPE 
+                 SECONDARY_PRODTAXA 
+                 PRODSYN 
+
+                 ASSOC 
+                   QUALIFIER
+                   SPECIES_QUALIFIER
+                   PROPERTIES
+                   ASPECT 
+                   SOURCE_DB 
+                   TERMACC 
+                   IS_NOT 
+                   ASSOCDATE 
+                   EVIDENCE 
+                     EVCODE 
+                     WITH 
+                     REF 
+  DBXREFS
+            );
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/base_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/base_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/base_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,506 @@
+# $Id: base_parser.pm,v 1.16 2007/07/06 23:36:43 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::base_parser;
+
+=head1 NAME
+
+  GO::Parsers::base_parser     - base class for parsers
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 AUTHOR
+
+=cut
+
+use Carp;
+use FileHandle;
+use Digest::MD5 qw(md5_hex);
+use GO::Parser;
+use Data::Stag qw(:all);
+use base qw(Data::Stag::BaseGenerator Exporter);
+use strict qw(subs vars refs);
+
+# Exceptions
+
+sub throw {
+    my $self = shift;
+    confess("@_");
+}
+
+sub warn {
+    my $self = shift;
+    warn("@_");
+}
+
+sub messages {
+    my $self = shift;
+    $self->{_messages} = shift if @_;
+    return $self->{_messages};
+}
+
+*error_list = \&messages;
+
+sub message {
+    my $self = shift;
+    my $msg = shift;
+    CORE::warn 'deprecated';
+    $self->parse_err($msg);
+}
+
+=head2 show_messages
+
+  Usage   -
+  Returns -
+  Args    -
+
+=cut
+
+sub show_messages {
+    my $self = shift;
+    my $fh = shift;
+    $fh = \*STDERR unless $fh;
+    foreach my $e (@{$self->error_list || []}) {
+        printf $fh "\n===\n  Line:%s [%s]\n%s\n  %s\n\n", $e->{line_no} || "", $e->{file} || "", $e->{line} || "", $e->{msg} || "";
+    }
+}
+
+sub init {
+    my $self = shift;
+
+    $self->messages([]);
+    $self->acc2name_h({});
+    $self;
+}
+
+sub parsed_ontology {
+    my $self = shift;
+    $self->{parsed_ontology} = shift if @_;
+    return $self->{parsed_ontology};
+}
+
+=head2 normalize_files
+
+  Usage   - @files = $parser->normalize_files(@files)
+  Returns -
+  Args    -
+
+takes a list of filenames/paths, "glob"s them, uncompresses any compressed files and returns the new file list
+
+=cut
+
+sub normalize_files {
+    my $self = shift;
+    my $dtype;
+    my @files = map {glob $_} @_;
+    my @errors = ();
+    my @nfiles = ();
+    
+    # uncompress any compressed files
+    foreach my $fn (@files) {
+        if ($fn =~ /\.gz$/) {
+            my $nfn = $fn;
+            $nfn =~ s/\.gz$//;
+            my $cmd = "gzip -dc $fn > $nfn";
+            #print STDERR "Running $cmd\n";
+            my $err = system("$cmd");
+            if ($err) {
+                push(@errors,
+                     "can't uncompress $fn");
+                next;
+            }
+            $fn = $nfn;
+        }
+        if ($fn =~ /\.Z$/) {
+            my $nfn = $fn;
+            $nfn =~ s/\.Z$//;
+            my $cmd = "zcat $fn > $nfn";
+            print STDERR "Running $cmd\n";
+            my $err = system("$cmd");
+            if ($err) {
+                push(@errors,
+                     "can't uncompress $fn");
+                next;
+            }
+            $fn = $nfn;
+        }
+        push(@nfiles, $fn);
+    }
+    my %done = ();
+    @files = grep { my $d = !$done{$_}; $done{$_} = 1; $d } @nfiles;
+    return @files;
+}
+
+sub fire_source_event {
+    my $self = shift;
+    my $file = shift || die "need to pass file argument";
+    my @fileparts = split(/\//, $file);
+    my @stat = stat($file);
+    my $mtime = $stat[9];
+    my $parsetime = time;
+    my $md5 = md5_hex($fileparts[-1]);
+    $self->event(source => [
+				     [source_id => $file ],
+				     [source_type => 'file'],
+				     [source_fullpath => $file ],
+				     [source_path => $fileparts[-1] ],
+				     [source_md5 => $md5],
+				     [source_mtime => $mtime ],
+				     [source_parsetime => $parsetime ],
+				    ]
+			 );
+    return;
+}
+
+sub parse_assocs {
+    my $self = shift;
+    my $fn = shift;
+    $self->dtype('go_assoc');
+    my $p = GO::Parser->get_parser_impl('go_assoc');
+    %$p = %$self;
+    $p->parse($fn);
+    return;
+}
+
+sub parse_to_graph {
+    my $self = shift;
+    my $h = GO::Parser->create_handler('obj');
+    $self->handler($h);
+    $self->parse(@_);
+    return $h->graph;
+}
+
+sub set_type {
+    my ($self, $fmt) = @_;
+    $self->dtype($fmt);
+    my $p = GO::Parser->get_parser_impl($fmt);
+    bless $self, ref($p);
+    return;
+}
+sub dtype {
+    my $self = shift;
+    $self->{_dtype} = shift if @_;
+    return $self->{_dtype};
+}
+
+sub parse_file {
+    my ($self, $file, $dtype) = @_;
+
+    $self->dtype($dtype);
+    $self->parse($file);
+}
+
+sub xslt {
+    my $self = shift;
+    $self->{_xslt} = shift if @_;
+    return $self->{_xslt};
+}
+
+sub force_namespace {
+    my $self = shift;
+    $self->{_force_namespace} = shift if @_;
+    return $self->{_force_namespace};
+}
+
+sub replace_underscore {
+    my $self = shift;
+    $self->{_replace_underscore} = shift if @_;
+    return $self->{_replace_underscore};
+}
+
+# EXPERIMENTAL: cache objects
+sub use_cache {
+    my $self = shift;
+    $self->{_use_cache} = shift if @_;
+    return $self->{_use_cache};
+}
+
+# EXPERIMENTAL: returns subroutine
+# sub maps name to cached name
+sub file_to_cache_sub {
+    my $self = shift;
+    my $lite = $self->litemode;
+    my $suffix = $lite ? ".lcache" : ".cache";
+    $self->{_file_to_cache_sub} = shift if @_;
+    return $self->{_file_to_cache_sub} ||
+      sub {
+          my $f = shift;
+          $f =~ s/\.\w+$//;
+          $f .= $suffix;
+          return $f;
+      };
+}
+
+
+sub cached_obj_file {
+    my $self = shift;
+    return $self->file_to_cache_sub->(@_);
+}
+
+sub parse {
+    my ($self, @files) = @_;
+
+    my $dtype = $self->dtype;
+    foreach my $file (@files) {
+        $self->file($file);
+        #printf STDERR "parsing: $file %d\n", $self->use_cache;
+
+        if ($self->use_cache) {
+            my $cached_obj_file = $self->cached_obj_file($file);
+            my $reparse;
+            if (-f $cached_obj_file) {
+                my @stat1 = lstat($file);
+                my @stat2 = lstat($cached_obj_file);
+                my $t1 = $stat1[9];
+                my $t2 = $stat2[9];
+                if ($t1 >= $t2) {
+                    $reparse = 1;
+                }
+                else {
+                    $reparse = 0;
+                }
+            }
+            else {
+                $reparse = 1;
+            }
+
+            if ($reparse) {
+                # make/remake cache
+                my $hclass = "GO::Handlers::obj_storable";
+                $self->load_module($hclass);
+                my $cache_handler =
+                  $hclass->new;
+                $self->use_cache(0);
+                my $orig_handler = $self->handler;
+                $self->handler($cache_handler);
+                $cache_handler->file($cached_obj_file);
+                $self->parse($file);
+                my $g = $cache_handler->graph;
+                $self->use_cache(1);
+                my $p2 = GO::Parser->new({
+                                          format=>'GO::Parsers::obj_emitter'});
+                $p2->handler($orig_handler);
+                # this is the only state we need to copy across
+                if ($self->can('xslt')) {
+                    $p2->xslt($self->xslt);
+                }
+                $p2->emit_graph($g);
+            }
+            else {
+                # use cache
+                my $p2 = GO::Parser->new({format=>'obj_storable'});
+                $p2->handler($self->handler);
+                # this is the only state we need to copy across
+                if ($self->can('xslt')) {
+                    $p2->xslt($self->xslt);
+                }
+                $p2->parse_file($cached_obj_file);
+            }
+            next;
+        }
+
+        # check for XSL transform
+        if ($self->can('xslt') && $self->xslt) {
+            my $xsl = $self->xslt;
+            my $xslt_file = $xsl;
+
+            if (!-f $xslt_file) {
+                # if GO_ROOT is set then this specifies the location of the xslt dir
+                #  if it is not set, assume we are using an installed version of go-perl,
+                #  in which case, the xslts will be located along with the perl modules
+                my $GO_ROOT = $ENV{GO_ROOT};
+                if ($GO_ROOT) {
+                    # env var takes precedence;
+                    # developers should use this
+                    $xslt_file = "$GO_ROOT/xml/xsl/$xsl.xsl";
+                }
+                
+                # default location is with perl modules
+                if (!$xslt_file || !-f $xslt_file) {
+                    # user-mode; xsl will be wherever the GO modules are installed
+                    require "GO/Parser.pm";
+                    my $dir = $INC{'GO/Parser.pm'};
+                    $dir =~ s/Parser\.pm/xsl/;
+                    $xslt_file = "$dir/$xsl.xsl";
+                }
+            }
+            if (!-f $xslt_file) {
+                $self->throw("No such file: $xslt_file OR $xsl");
+            }
+
+            # first parse input file to intermediate xml
+            my $file1 = _make_temp_filename($file, "-1.xml");
+            my $handler = $self->handler;
+            my $outhandler1 =
+              Data::Stag->getformathandler("xml");
+            $outhandler1->file($file1);
+            $self->handler($outhandler1);
+            $self->SUPER::parse($file);
+            $self->handler->finish;
+
+            # transform intermediate xml using XSLT
+            my $file2 = _make_temp_filename($file, "-2.xml");
+            # $results contains the post-xslt XML doc;
+            # we either want to write this directly, or
+            # pass it to a handler
+
+            if ($handler->isa("Data::Stag::XMLWriter")) {
+                # WRITE DIRECTLY:
+                # if the final goal is XML, then write this
+                # directly
+                if ($handler->file) {
+                    # $ss->output_file($results,$handler->file);
+                    xsltproc($xslt_file,$file1,$handler->file);
+                } else {
+                    my $fh = $handler->fh;
+                    if (!$fh) {
+                        $fh = \*STDOUT;
+                        xsltproc($xslt_file,$file1);
+                    }
+                    else {
+                        xsltproc($xslt_file,$file1,$file2);
+                        my $infh = FileHandle->new($file2) || die "cannot open $file2";
+                        while (<$infh>) {print $fh $_}
+                        unlink($file2);
+                    }
+                    #$ss->output_fh($results,$handler->fh);
+                }
+            } else {
+                # PASS TO HANDLER:
+                # we need to do another transform, in perl.
+                # 
+                # write $results of stylesheet transform
+                #$ss->output_file($results,$file2);
+                xsltproc($xslt_file,$file1,$file2);
+                
+                # clear memory
+                #$ss=undef;
+                #$xslt=undef;
+                #$results=undef;
+
+                # we pass the final XML to the handler
+                my $load_parser = new GO::Parser ({format=>'obo_xml'});
+                $load_parser->handler($handler);
+                $load_parser->errhandler($self->errhandler);
+                $load_parser->parse($file2);
+                unlink($file2);
+            }
+
+            # restore to previous state
+            $self->handler($handler);
+        } else {
+            # no XSL transform - perform parse as normal
+            # (use Data::Stag superclass)
+            $self->SUPER::parse($file);
+        }
+    }
+}
+
+# applies XSLT and removes input file
+sub xsltproc {
+    my ($xf,$inf,$outf) = @_;
+    my $cmd = "xsltproc $xf $inf";
+    if ($outf) {
+        $cmd .= " > $outf";
+    }
+    my $err = system($cmd);
+    unlink($inf);
+    if ($err) {
+        confess("problem running: $cmd");
+    }
+    return;
+}
+
+sub _make_temp_filename {
+    my ($base, $suffix) = @_;
+    $base =~ s/.*\///;
+    return "TMP.$$.$base$suffix";
+}
+
+=head2 litemode
+
+  Usage   - $p->litemode(1)
+  Returns -
+  Args    - bool
+
+when set, parser will only throw the following events:
+
+id|name|is_a|relationship|namespace
+
+(optimisation for fast parsing)
+
+=cut
+
+sub litemode {
+    my $self = shift;
+    $self->{_litemode} = shift if @_;
+    return $self->{_litemode};
+}
+
+=head2 acc2name_h
+
+  Usage   - $n = $p->acc2name_h->{'GO:0003673'}
+  Returns - hashref
+  Args    - hashref [optional]
+
+gets/sets a hash mapping IDs to names
+
+this will be automatically set by an ontology parser
+
+a non-ontology parser will use this index to verify the parsed data
+(see $p->acc_not_found($id), below)
+
+=cut
+
+sub acc2name_h {
+    my $self = shift;
+    $self->{_acc2name_h} = shift if @_;
+    $self->{_acc2name_h} = {} 
+      unless $self->{_acc2name_h};
+    return $self->{_acc2name_h};
+}
+
+
+=head2 acc_not_found
+
+  Usage   - if ($p->acc_not_found($go_id)) { warn("$go_id not known") }
+  Returns - bool
+  Args    - acc string
+
+uses acc2name_h - if this hash mapping has been created AND the acc is
+not in the hash, THEN it is considered not found
+
+This is useful for non-ontology parsers (xref_parser, go_assoc_parser)
+to check whether a referenced ID is actually present in the ontology
+
+note that if acc2name_h has not been created, then accs cannot be
+considered not-found, and this will always return 0/false
+
+=cut
+
+sub acc_not_found {
+    my $self = shift;
+    my $acc = shift;
+    my $h = $self->acc2name_h;
+    if (scalar(keys %$h) && !$h->{$acc}) {
+        return 1;
+    }
+    return 0;
+}
+
+sub dtd {
+    undef;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/generic_tagval_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/generic_tagval_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/generic_tagval_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,115 @@
+# $Id: generic_tagval_parser.pm,v 1.3 2007/02/02 05:54:11 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::generic_tagval_parser;
+
+=head1 NAME
+
+  GO::Parsers::generic_tagval_parser     - syntax parsing of GO .def flat files
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+This generates Stag event streams from one of the various GO flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+
+Examples of these files can be found at http://www.geneontology.org
+
+A description of the event streams generated follows; Stag or an XML
+handler can be used to catch these events
+
+
+=head1 GO DEFINITION FILES
+
+These have a suffix .defs or .definitions
+
+ 
+
+=head1 AUTHOR
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser);
+use GO::Parsers::ParserEventNames;  # declare XML constants
+
+use Carp;
+use FileHandle;
+use strict qw(subs vars refs);
+
+sub dtd {
+    'generic_tagval-parser-events.dtd';
+}
+
+sub _class { 'generic' }
+sub _id_column {}
+sub _map_property_type { shift;@_ }
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+    my $file = $self->file;
+
+    $self->start_event(OBO);
+    my $lnum = 0;
+    my $in_record=0;
+    my $class = $self->_class;
+    my $id_column = $self->_id_column;
+    while (my $line = <$fh>) {
+        chomp $line;
+	++$lnum;
+        next if $line =~ /^\!/;
+        $line =~ s/^\s+$//;
+        if (!$line) {
+	    $self->pop_stack_to_depth(1);
+            $in_record = 0;
+            next;
+        }
+
+	if ($line =~ /^(\S+):\s+(.*)/) {
+            my ($t,$v) = ($1,$2);
+            if (!$in_record) {
+                $self->start_event(INSTANCE);
+                $self->event(instance_of=>$class);
+                if (!$id_column) {
+                    $t = 'id';
+                }
+                $in_record = 1;
+            }
+            if ($id_column && $t eq $id_column) {
+                $t = 'id';
+            }
+            if ($t eq 'id') {
+                $self->event(ID, $v);
+            }
+            else {
+                my $dt = 'xsd:string';
+                if ($v =~ /^http:/) {
+                    $dt = 'xsd:anyURI';
+                }
+                $self->event(PROPERTY_VALUE,
+                             [[TYPE,$self->_map_property_type($t)],
+                              [VALUE,$v],
+                              [DATATYPE,$dt]]);
+            }
+	}
+	elsif ($line =~ /^(\S+):\s*$/) {
+        }
+	else {
+#	    $self->parse_err("cannot parse:\"$line\"");
+	}
+    }
+    $self->pop_stack_to_depth(0);  # end event obo
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_assoc_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_assoc_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_assoc_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,428 @@
+# $Id: go_assoc_parser.pm,v 1.16 2007/07/11 05:38:00 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::go_assoc_parser;
+
+=head1 NAME
+
+  GO::Parsers::go_assoc_parser     - syntax parsing of GO gene-association flat files
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+do not use this class directly; use L<GO::Parser>
+
+This generates Stag/XML event streams from GO association files.
+Examples of these files can be found at http://www.geneontology.org,
+an example of lines from an association file:
+
+  SGD     S0004660        AAC1            GO:0005743      SGD:12031|PMID:2167309 TAS             C       ADP/ATP translocator    YMR056C gene    taxon:4932 20010118
+  SGD     S0004660        AAC1            GO:0006854      SGD:12031|PMID:2167309 IDA             P       ADP/ATP translocator    YMR056C gene    taxon:4932 20010118
+
+See L<http://www.geneontology.org/GO.annotation.shtml#file>
+
+See
+L<http://www.godatabase.org/dev/xml/dtd/go_assoc-parser-events.dtd>
+For the DTD of the event stream that is generated
+
+The following stag-schema describes the events that are generated in
+parsing an assoc file:
+
+  (assocs
+   (dbset+
+     (proddb "s")
+     (prod+
+       (prodacc "s")
+       (prodsymbol "s")
+       (prodtype "s")
+       (prodtaxa "i")
+       (assoc+
+         (assocdate "i")
+         (source_db "s")
+         (termacc "s")
+         (is_not "i")
+         (aspect "s")
+         (evidence+
+           (evcode "s")
+           (ref "s")))))) 
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser Exporter);
+#use Text::Balanced qw(extract_bracketed);
+use GO::Parsers::ParserEventNames;
+use GO::Parser;
+
+use Carp;
+use FileHandle;
+use strict;
+
+sub dtd {
+    'go_assoc-parser-events.dtd';
+}
+
+sub ev_filter {
+    my $self = shift;
+    $self->{_ev_filter} = shift if @_;
+    return $self->{_ev_filter};
+}
+
+
+
+sub skip_uncurated {
+    my $self = shift;
+    $self->{_skip_uncurated} = shift if @_;
+    return $self->{_skip_uncurated};
+}
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+    my $file = $self->file;
+
+    my $product;
+    my $term;
+    my $assoc;
+    my $line_no = 0;
+
+    my $obo_parser; # an OBO parser may be required for parsing the PROPERTIES column
+
+    my @COLS = (0..15);
+    my ($PRODDB,
+        $PRODACC,
+        $PRODSYMBOL,
+        $QUALIFIER,
+        $TERMACC,
+        $REF,
+        $EVCODE,
+        $WITH,
+        $ASPECT,
+        $PRODNAME,
+        $PRODSYN,
+        $PRODTYPE,
+        $PRODTAXA,
+        $ASSOCDATE,
+	$SOURCE_DB,
+        $PROPERTIES,   # experimental! 
+       ) = @COLS;
+
+    my @mandatory_cols = ($PRODDB, $PRODACC, $TERMACC, $EVCODE);
+
+    #    <assocs>
+    #      <dbset>
+    #        <db>fb</db>
+    #        <prod>
+    #          <prodacc>FBgn0027087</>
+    #          <prodsym>Aats-his</>
+    #          <prodtype>gene</>
+    #          <prodtaxa>7227</>
+    #          <prodsynonym>...</>
+    #          <assoc>
+    #            <termacc>GO:0004821</termacc>
+    #            <evidence>
+    #              <code>NAS</code>
+    #              <ref>FB:FBrf0105495</ref>
+    #              <with>...</with>
+    #            </evidence>
+    #          </assoc>
+    #        </prod>
+    #      </dbset>
+    #    <assocs>
+ 
+    $self->start_event(ASSOCS);
+    $self->fire_source_event($file);
+
+    my @last = map {''} @COLS;
+
+    my $skip_uncurated = $self->skip_uncurated;
+    my $ev = $self->ev_filter;
+    my %evyes = ();
+    my %evno = ();
+    if ($ev) {
+	if ($ev =~ /\!(.*)/) {
+	    $evno{$1} = 1;
+	}
+	else {
+	    $evyes{$ev} = 1;
+	}
+    }
+
+    my $taxa_warning;
+
+    my $line;
+    my @vals;
+    my @stack = ();
+    while (<$fh>) {
+        # UNICODE causes problems for XML and DB
+        # delete 8th bit
+        tr [\200-\377]
+          [\000-\177];   # see 'man perlop', section on tr/
+        # weird ascii characters should be excluded
+        tr/\0-\10//d;   # remove weird characters; ascii 0-8
+                        # preserve \11 (9 - tab) and \12 (10-linefeed)
+        tr/\13\14//d;   # remove weird characters; 11,12
+                        # preserve \15 (13 - carriage return)
+        tr/\16-\37//d;  # remove 14-31 (all rest before space)
+        tr/\177//d;     # remove DEL character
+
+        $line_no++;
+	chomp;
+	if (/^\!/) {
+	    next;
+	}
+	if (!$_) {
+	    next;
+	}
+        # some files use string NULL - we just use empty string as null
+        s/\\NULL//g;
+        $line = $_;
+
+        $self->line($line);
+        $self->line_no($line_no);
+
+	@vals = split(/\t/, $line);
+
+	# normalise columns, and set $h
+	for (my $i=0; $i<@COLS;$i++) {
+	    if (defined($vals[$i])) {
+
+		# remove trailing and
+		# leading blanks
+		$vals[$i] =~ s/^\s*//;
+		$vals[$i] =~ s/\s*$//;
+
+		# sometimes - is used for null
+		$vals[$i] =~ s/^\-$//;
+
+		# TAIR seem to be
+		# doing a mysql dump...
+		$vals[$i] =~ s/\\NULL//;
+	    }
+	    if (!defined($vals[$i]) ||
+		length ($vals[$i]) == 0) {
+		if ( grep {$i == $_} @mandatory_cols) {
+		    $self->parse_err("no value defined for col ".($i+1)." in line_no $line_no line\n$line\n");
+		    next;
+		}
+                $vals[$i] = '';
+	    }
+	}
+
+    my ($proddb,
+        $prodacc,
+        $prodsymbol,
+        $qualifier,
+        $termacc,
+        $ref,
+        $evcode,
+        $with,
+        $aspect,
+        $prodname,
+        $prodsyn,
+        $prodtype,
+        $prodtaxa,
+        $assocdate,
+	$source_db,
+        $properties) = @vals;
+
+
+#	if (!grep {$aspect eq $_} qw(P C F)) {
+#	    $self->parse_err("Aspect column says: \"$aspect\" - aspect must be P/C/F");
+#	    next;
+#	}
+        if ($self->acc_not_found($termacc)) {
+	    $self->parse_err("No such ID: $termacc");
+	    next;
+        }
+	if (!($ref =~ /:/)) {
+            # ref does not have a prefix - we assume it is medline
+	    $ref = "medline:$ref";
+	}
+	if ($with eq "IEA") {
+	    $self->parse_err("SERIOUS COLUMN PROBLEM: IGNORING LINE");
+	    next;
+	}
+	if ($skip_uncurated && $evcode eq "IEA") {
+	    next;
+	}
+	if (%evyes && !$evyes{$evcode}) {
+	    next;
+	}
+	if (%evno && $evno{$evcode}) {
+	    next;
+	}
+        my @prodtaxa_ids = split(/\|/,$prodtaxa);
+        @prodtaxa_ids =
+          map {
+              s/taxonid://gi;
+              s/taxon://gi;
+              if ($_ !~ /\d+/) {
+                  if (!$taxa_warning) {
+                      $taxa_warning = 1;
+                      $self->parse_err("No NCBI TAXON wrong fmt: $_");
+                      $_ = "";
+                  }
+              }
+              $_;
+          } @prodtaxa_ids;
+        @prodtaxa_ids = grep {$_} @prodtaxa_ids;
+        my $main_taxon_id = shift @prodtaxa_ids;
+        if (!$main_taxon_id) {
+            if (!$taxa_warning) {
+                $taxa_warning = 1;
+                $self->parse_err("No NCBI TAXON specified; ignoring");
+            }
+        }
+        
+
+        # check for new element; shift a level
+	my $new_dbset = $proddb ne $last[$PRODDB];
+	my $new_prodacc =
+	  $prodacc ne $last[$PRODACC] || $new_dbset;
+	my $new_assoc =
+	  ($termacc ne $last[$TERMACC]) ||
+	    $new_prodacc ||
+	      ($qualifier ne $last[$QUALIFIER]) ||
+		($source_db ne $last[$SOURCE_DB]) ||
+		  ($assocdate ne $last[$ASSOCDATE]);
+
+        if (!$new_prodacc && ($prodtaxa ne $last[$PRODTAXA])) {
+            # two identical gene products with the same taxon
+            # IGNORE!
+	    $self->parse_err("different taxa ($prodtaxa, $last[$PRODTAXA]) for same product $prodacc");
+            next;
+        }
+
+	# close finished events
+	if ($new_assoc) {
+	    $self->pop_stack_to_depth(3) if $last[$TERMACC];
+	    #	    $self->end_event("assoc") if $last[$TERMACC];
+	}
+	if ($new_prodacc) {
+	    $self->pop_stack_to_depth(2) if $last[$PRODACC];
+	    #	    $self->end_event("prod") if $last[$PRODACC];
+	}
+	if ($new_dbset) {
+	    $self->pop_stack_to_depth(1) if $last[$PRODDB];
+	    #	    $self->end_event("dbset") if $last[$PRODDB];
+	}
+	# open new events
+	if ($new_dbset) {
+	    $self->start_event(DBSET);
+	    $self->event(PRODDB, $proddb);
+	}
+	if ($new_prodacc) {
+	    $self->start_event(PROD);
+	    $self->event(PRODACC, $prodacc);
+	    $self->event(PRODSYMBOL, $prodsymbol);
+	    $self->event(PRODNAME, $prodname) if $prodname;
+	    $self->event(PRODTYPE, $prodtype) if $prodtype;
+            if ($main_taxon_id) {
+                $self->event(PRODTAXA, $main_taxon_id);
+            }
+	    my $syn = $prodsyn;
+	    if ($syn) {
+		my @syns = split(/\|/, $syn);
+		my %ucheck = ();
+		@syns = grep {
+		    if ($ucheck{lc($_)}) {
+			0;
+		    }
+		    else {
+			$ucheck{lc($_)} = 1;
+			1;
+		    }
+		} @syns;
+		map {
+		    $self->event(PRODSYN, $_);
+		} @syns;
+	    }
+	}
+	if ($new_assoc) {
+	    my $assocdate = $assocdate;
+	    $self->start_event(ASSOC);
+	    if ($assocdate) {
+		if ($assocdate && length($assocdate) == 8) {
+		    $self->event(ASSOCDATE, $assocdate);
+		}
+		else {
+		    $self->parse_err("ASSOCDATE wrong format (must be YYYYMMDD): $assocdate");
+		}
+	    }
+	    $self->event(SOURCE_DB, $source_db)
+		    if $source_db;
+	    $self->event(TERMACC, $termacc);
+            my @quals = map lc,split(/[;\,]\s*/,$qualifier || '');
+	    my $is_not = grep {/^not$/i} @quals;
+	    $self->event(IS_NOT, $is_not || '0');
+	    $self->event(QUALIFIER, $_) foreach @quals;
+            $self->event(SPECIES_QUALIFIER, $_) foreach @prodtaxa_ids; # all REMAINING (after "|') tax ids are qualifiers
+	    $self->event(ASPECT, $aspect);
+            if ($properties) {
+                my @properties_list = split(/\|/,$properties);
+                if (!$obo_parser) {
+                    $obo_parser = GO::Parser->new({format=>'obo_text'});
+                }
+                foreach my $p (@properties_list) {
+                    my $diffs = $obo_parser->parse_differentia($p);
+                    $self->event(PROPERTIES, $diffs);
+                }
+            }
+	}
+	$self->start_event(EVIDENCE);
+	$self->event(EVCODE, $evcode);
+	if ($with) {
+            # TODO: discriminate between pipes and commas
+            # (semicolon is there for legacy reasons - check if this can be removed)
+	    my @with_accs = split(/\s*[\|\;\,]\s*/, $with);
+	    $self->event(WITH, $_)
+	      foreach (grep (/:/, @with_accs));  
+	    # we have found errors where the : was left out, this just skips
+
+	    # no longer checks for cardinality errors
+
+	}
+	map {
+	    $self->event(REF, $_)
+	} split(/\|/, $ref);
+	$self->end_event(EVIDENCE);
+	#@last = @vals;
+        @last =
+          (
+           $proddb,
+           $prodacc,
+           $prodsymbol,
+           $qualifier,
+           $termacc,
+           $ref,
+           $evcode,
+           $with,
+           $aspect,
+           $prodname,
+           $prodsyn,
+           $prodtype,
+           $prodtaxa,
+           $assocdate,
+           $source_db,
+           $properties,
+          );
+    }
+    $fh->close;
+
+    $self->pop_stack_to_depth(0);
+}
+
+
+1;
+
+# 2.864 orig/handler
+# 2.849 opt/handler
+# 1.986 orig/xml
+# 1.310 opt/xml

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_def_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_def_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_def_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,129 @@
+# $Id: go_def_parser.pm,v 1.6 2005/03/22 22:38:32 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::go_def_parser;
+
+=head1 NAME
+
+  GO::Parsers::go_def_parser     - syntax parsing of GO .def flat files
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+This generates Stag event streams from one of the various GO flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+
+Examples of these files can be found at http://www.geneontology.org
+
+A description of the event streams generated follows; Stag or an XML
+handler can be used to catch these events
+
+
+=head1 GO DEFINITION FILES
+
+These have a suffix .defs or .definitions
+
+ 
+
+=head1 AUTHOR
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser);
+use GO::Parsers::ParserEventNames;  # declare XML constants
+
+use Carp;
+use FileHandle;
+use strict qw(subs vars refs);
+
+sub dtd {
+    'go_def-parser-events.dtd';
+}
+
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+    my $file = $self->file;
+
+    $self->start_event(OBO);
+    my $lnum = 0;
+    my $in_def=0;
+    while (my $line = <$fh>) {
+        chomp $line;
+	++$lnum;
+        next if $line =~ /^\!/;
+	next if !$line;
+	if ($line =~ /^term:\s+(.*)/) {
+	    $self->pop_stack_to_depth(1);
+	    $self->start_event(TERM);
+            $self->event(NAME, $1);
+	    $in_def = 0;
+	}
+	elsif ($line =~ /^goid:\s+(\S+)/) {
+	    if ($in_def) {
+		$self->parse_err("goid in definition");
+	    }
+	    $self->event(ID,$1);
+	}
+	elsif ($line =~ /^(\w+):\s+(.*)/) {
+	    my ($k, $v) = ($1,$2);
+	    if (!$in_def) {
+		$in_def = 1;
+		$self->start_event(DEF);
+	    }
+            if ($k eq 'definition_reference') {
+                my ($db, $acc) = ('', $v);
+                if ($v =~ /(.*)?:(\S+)/) {
+                    ($db,$acc) = ($1,$2);
+                }
+                $self->event(DBXREF,[[acc=>$acc],[dbname=>$db]]);
+                next;
+            }
+	    $k =~ s/^definition$/defstr/;
+	    $self->event($k=>$v);
+	    if ($k eq 'comment') {
+		my $stag = $self->parse_comment($v);
+		$self->event(@$stag) if $stag;
+	    }
+	}
+	else {
+	    $self->parse_err("trailing text");
+	}
+    }
+    $self->pop_stack_to_depth(0);  # end event obo
+}
+
+sub parse_comment {
+    my $self = shift;
+    my $v = shift;
+    my $stag;
+    if ($v =~ /This term was made obsolete because (.*) To update annotations, (\w+) (.*)/) {
+	my $reason = $1;
+	my $update_type = $2;
+	my $nu = $3;
+	my @nu_ids = ();
+	while ($nu =~ / ; (\S+)\'/) {
+	    push(@nu_ids, $1);
+	    $nu =~ s/ ; (\S+)\'//;
+	}
+	$stag = [obsolete_data=>[
+				 [reason=>$reason],
+				 [update_type=>$update_type],
+				 (map {[id=>$_]} @nu_ids),
+				]];
+    }
+    return $stag;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_ids_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_ids_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_ids_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,132 @@
+# $Id: go_ids_parser.pm,v 1.2 2007/08/03 01:52:23 sjcarbon Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::go_ids_parser;
+
+=head1 NAME
+
+  GO::Parsers::go_ids_parser  - syntax parsing of flat files containing GO IDs.
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+do not use this class directly; use L<GO::Parser>
+
+This generates Stag/XML event streams from files containing GO IDs.
+Lines from such a file might be:
+
+GO:0000003 GO:0000166   GO:0000228
+GO:0000229
+GO:0003674
+GO:0003676 GO:0003677
+GO:0003682
+
+GO:0003700
+GO:0003723 GO:0003774 GO:0003779 GO:0005634
+GO:0005635
+GO:0005654
+
+See
+L<http://www.godatabase.org/dev/xml/dtd/go_ids-parser-events.dtd>
+For the DTD of the event stream that is generated
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser Exporter);
+#use Text::Balanced qw(extract_bracketed);
+use GO::Parsers::ParserEventNames;
+
+use Carp;
+use FileHandle;
+use strict;
+
+
+##
+sub dtd {
+  'go_ids-parser-events.dtd';
+}
+
+
+##
+sub parse_fh {
+
+  my ($self, $fh) = @_;
+
+  #my $file = $self->file;
+
+  my $term;
+  my $line_no = 0;
+  my %done = (); # Don't bother with things already done.
+
+  $self->start_event(OBO);
+  #$self->fire_source_event($file);
+
+  while (<$fh>) {
+
+    $line_no++;
+
+    # UNICODE causes problems for XML and DB
+    # delete 8th bit
+    tr [\200-\377]
+       [\000-\177];   # see 'man perlop', section on tr/
+    # weird ascii characters should be excluded
+    tr/\0-\10//d;   # remove weird characters; ascii 0-8
+    # preserve \11 (9 - tab) and \12 (10-linefeed)
+    tr/\13\14//d;   # remove weird characters; 11,12
+    # preserve \15 (13 - carriage return)
+    tr/\16-\37//d;  # remove 14-31 (all rest before space)
+    tr/\177//d;     # remove DEL character
+
+    ## Skip if not there or comment.
+    next if ! $_;
+    next if /^\!/;
+
+    # some files use string NULL - we just use empty string as null
+    s/\\NULL//g;
+
+    $self->line($_);
+    $self->line_no($line_no);
+
+
+    ## Remove leadng and trailing whitespace.
+    s/^[\s\n]+//;
+    s/[\s\n]+$//;
+    my @accs = split /\s+/;
+    for( my $i = 0; $i < @accs; $i++ ){
+
+      my $acc = $accs[$i];
+
+      ## Massage a bit more.
+      if( $acc ){
+
+	next if	$done{$acc}; # skip if done
+
+	##
+	if( $self->acc_not_found($acc) ){
+	  $self->parse_err("No such ACC: $acc");
+	  next;
+	}
+
+	$self->start_event(TERM);
+	$self->event(ID, $acc);
+	$self->end_event(TERM);
+	$done{$acc} = 1;
+      }
+    }
+  }
+
+  # This is causing problems during direct fh access.
+  $fh->close;
+  $self->pop_stack_to_depth(0);
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_ont_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_ont_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_ont_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,390 @@
+# $Id: go_ont_parser.pm,v 1.17 2005/08/19 01:48:09 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::go_ont_parser;
+
+=head1 NAME
+
+  GO::Parsers::go_ont_parser     - syntax parsing of GO .ontology flat files
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+This generates Stag event streams from one of the various GO flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+
+Examples of these files can be found at http://www.geneontology.org
+
+A description of the event streams generated follows; Stag or an XML
+handler can be used to catch these events
+
+=head1 GO ONTOLOGY FILES
+
+These files have the .ontology suffix. The stag-schema for the event
+streams generated look like this:
+ 
+  (ontology
+   (source
+     (source_type "s")
+     (source_path "s")
+     (source_mtime "i"))
+   (term+
+     (id "s")
+     (name "s")
+     (is_root? "i")
+     (relationship+
+       (type "s")
+       (to "s"))
+     (dbxref*
+       (dbname "s")
+       (acc "s"))
+     (synonym* "s")
+     (secondaryid* "s")
+     (is_obsolete? "i"))) 
+
+
+=head1 AUTHOR
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser);
+use GO::Parsers::ParserEventNames;
+
+use Carp;
+use FileHandle;
+use strict qw(vars refs);
+
+sub dtd {
+    'go_ont-parser-events.dtd';
+}
+
+sub regesc {
+    my $code = shift;
+    if ($code eq '|') {
+        $code = '\|';
+    }
+    if ($code eq '*') {
+        $code = '\*';
+    }
+    if ($code eq '?') {
+        $code = '\?';
+    }
+    $code;
+}
+
+sub reln_regexp {
+    join("|", map {" ".regesc($_)." "} keys %{shift || {}});
+}
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+
+    my $file = $self->file;
+
+    my $is_go;
+    my %typemap =
+      ('$'=>'is_a',
+       '%'=>'is_a',
+       '<'=>'part_of',
+       '~'=>'derives_from',
+       );
+    my $reln_regexp = reln_regexp(\%typemap);
+    my $lnum = 0;
+    my @stack = ();
+    my $obs_depth;
+
+    my $usc = $self->replace_underscore;
+    $self->start_event(OBO);
+    my %rtypenameh = ();
+    $self->fire_source_event($file);
+    $self->handler->{ontology_type} = 
+      $self->force_namespace;
+    my $root_id;
+
+  PARSELINE:
+    while (<$fh>) {
+        # UNICODE causes problems for XML and DB
+        # delete 8th bit
+        tr [\200-\377]
+          [\000-\177];   # see 'man perlop', section on tr/
+        # weird ascii characters should be excluded
+        tr/\0-\10//d;   # remove weird characters; ascii 0-8
+                        # preserve \11 (9 - tab) and \12 (10-linefeed)
+        tr/\13\14//d;   # remove weird characters; 11,12
+                        # preserve \15 (13 - carriage return)
+        tr/\16-\37//d;  # remove 14-31 (all rest before space)
+        tr/\177//d;     # remove DEL character
+        my $line = $_;
+	$line =~ s/\r//g;
+	chomp $line;
+	$line =~ s/\s+$//;
+	++$lnum;
+        $self->line($line);
+        $self->line_no($lnum);
+        if ($line =~ /^\!type:\s*(\S+)\s+(\S+)/) {
+            my ($code, $name) = ($1, $2);
+            $name =~ s/\s+/_/g;
+            $name = lc($name);
+            if ($name eq 'isa') {
+                $name = 'is_a';
+            }
+            if ($name eq 'partof') {
+                $name = 'part_of';
+            }
+            $typemap{$code} = $name
+              unless $code eq '%';
+            #$code = '\\'.$code;
+            $reln_regexp = reln_regexp(\%typemap);
+            next;
+        }
+	next if $line =~ /^\s*\!/;   # comment
+	next if $line eq '\$';        # 
+	next if $line eq '';        # 
+	last if $line =~ /^\s*\$\s*$/;  # end of file
+
+	# get rid of SGML directives, e.g. FADH<down>2</down>, as these confuse the relationship syntax
+	$line =~ s/<\/?[A-Za-z]+>//g;
+#	$line = &spellGreek ($line);
+	$line =~ s/&([a-z]+);/$1/g;
+
+        $line =~ /( *)(.*)/;
+        my $body = $2;
+        my $indent = length($1);
+
+        my $is_obs = 0;
+        while ((scalar @stack) &&
+               $stack[$#stack]->[0] >= $indent) {
+            pop @stack;
+            if (defined($obs_depth) &&
+                $obs_depth >= $indent) {
+                # no longer under obsolete node
+                $obs_depth = undef;
+            }
+        }
+
+        my $rchar;
+        if ($body =~ /^(\@\w+\@)(.*)/) {
+            $rchar = $self->typemap($1,\%typemap);
+            $body = $2;
+	    $reln_regexp = ' \@\w+\@ ';
+        }
+	else {
+            $rchar = $self->typemap(substr($body, 0, 1),\%typemap);
+            $body = substr($body, 1);
+        }
+        # +++++++++++++++++++++++++++++++++
+        # parse body / main content of line
+        # +++++++++++++++++++++++++++++++++
+        my $currxref;
+        my @parts = split(/($reln_regexp)/, $body);
+	for (my $i=0; $i < @parts; $i+=2) {
+            my $part = $parts[$i];
+            my ($name, @xrefs) =
+              split(/\s*;\s+/, $part);
+            $name = $self->unescapego($name);
+            if ($usc) {
+                $name =~ s/_/$usc/g;
+            }
+            if ($name =~ /^obsolete/i && $i==0) {
+                $obs_depth = $indent;
+            }
+            if ($name eq "Gene_Ontology") {
+                $is_go =1;
+            }
+            if (defined($obs_depth)) {
+                # set obsolete flag if we
+                # are anywhere under the obsolete node
+                $is_obs = 1;
+            }
+            if ($indent < 2 && $is_go) {
+                $self->handler->{ontology_type} = $name
+                  unless $self->force_namespace;
+            }
+            elsif ($indent < 1) {
+                $self->handler->{ontology_type} = $name
+                  unless $self->force_namespace;
+            }
+            elsif (!$self->handler->{ontology_type}) {
+                $self->handler->{ontology_type} = $name;
+            }
+	    else {
+	    }
+
+            my $pxrefstr = shift @xrefs;
+            if (!$pxrefstr) {
+		$pxrefstr = '';
+                $self->parse_err("no ID");
+                next PARSELINE;
+            }
+            # get the GO id for this line
+            my ($pxref, @secondaryids) =
+              split(/,\s+/, $pxrefstr);
+            if ($i==0) {
+                $currxref = $pxref;
+                if ($currxref =~ /\s/) {
+                    my $msg = "\"$pxref\" doesn't look valid";
+                    $self->parse_err($msg);
+                }
+                my $a2t = $self->acc2name_h;
+                my $prevname = $a2t->{$currxref};
+                if ($prevname &&
+                    $prevname ne $name) {
+                    my $msg = "clash on $pxref; was '$prevname' now '$name'";
+                    $self->parse_err($msg);
+		    next PARSELINE;
+                }
+		if ($prevname && $indent) {
+		    # seen before - no new data, skip to avoid repeats
+		    next PARSELINE;
+		}
+                $a2t->{$currxref} = $name;
+		$root_id = $currxref if !$indent;
+                $a2t->{$currxref} = $name;
+		$self->start_event(TERM);
+                $self->event(ID, $currxref);
+                $self->event(NAME, $name);
+                $self->event(IS_OBSOLETE, $is_obs) if $is_obs;
+                $self->event(IS_ROOT, 1) if !$indent;
+                $self->event(NAMESPACE, $self->handler->{ontology_type}) 
+		  if $self->handler->{ontology_type};
+                map {
+                    $self->event(ALT_ID, $_);
+                } @secondaryids;
+            }
+	    #            map {
+	    #                $self->start_event("secondaryid");
+	    #                $self->event("id", $_);
+	    #                $self->end_event("secondaryid");
+	    #            } @secondaryids;
+            if ($i == 0) {
+                # first part on line has main
+                # info for this term
+                foreach my $xref (@xrefs) {
+                    my ($db, at rest) =
+                      split(/:/,$xref);
+		    my $dbacc = $self->unescapego(join(":", @rest));
+		    if ($db eq "synonym") {
+                        $self->event(SYNONYM, [[synonym_text=>$dbacc],
+                                               [type=>'related']]);
+                    }
+                    
+		    #                    elsif ($dbacc =~ /\s/) {
+		    #                        # db accessions should not have
+		    #                        # spaces in them - this
+		    #                        # indicates that there is a problem;
+		    #                        # eg synonym spelled wrongly
+		    #                        # [MetaCyc accessions have spaces!]
+		    #                        my $msg =
+		    #                          "ignoring $db:$dbacc - doesn't look like accession";
+		    #                        $self->parse_err({msg=>$msg,
+		    #                                        line_no=>$lnum,
+		    #                                        line=>$line,
+		    #                                        file=>$file});
+		    #                    }
+                    else {
+                        $self->event(XREF_ANALOG, [[dbname => $db], [acc => $dbacc]]);
+                    }
+                }
+            } else {
+                # other parts on line
+                # have redundant info,
+                # but the relationship
+                # part is useful
+                my $rchar = $self->typemap($parts[$i-1],\%typemap);
+		if (!$pxref) {
+		    $self->parse_err("problem with $name $currxref: rel $rchar has no parent/object");
+		} else {
+		    $self->relationship_event($rchar, $pxref);
+		}
+            }
+        }
+	#$line =~ s/\\//g;
+        # end of parse body
+        if (@stack) {
+            my $up = $stack[$#stack];
+	    my $obj = $up->[1];
+	    if (!$obj) {
+		$self->parse_err("problem with $currxref: rel $rchar has no parent/object [top of stack is @$up]");
+	    } else {
+		$self->relationship_event($rchar, $up->[1]);
+		$rtypenameh{$rchar} = 1;
+	    }
+        } else {
+	    #            $self->event("rel", "isa", "TOP");
+        }
+        $self->end_event(TERM);
+        push(@stack, [$indent, $currxref]);
+    }
+    $self->pop_stack_to_depth(1);
+    foreach my $rtypename (keys %rtypenameh) {
+	next if $rtypename eq 'is_a';
+	$self->event(TYPEDEF, [
+			       [id=>$rtypename],
+			       [name=>$rtypename],
+			       [domain=>$root_id],
+			       [range=>$root_id],
+			      ]);
+    }
+    $self->pop_stack_to_depth(0);
+    $self->parsed_ontology(1);
+}
+
+sub relationship_event {
+    my $self = shift;
+    my $rchar = shift;
+    my $to = shift;
+
+    if ($rchar eq 'is_a' ||
+	$rchar eq 'isa') {
+	$self->event(IS_A, $to);
+    }
+    else {
+	$self->event(RELATIONSHIP,
+		     [[type => $rchar],
+		      [to=>$to]]);
+    }
+}
+
+
+sub typemap {
+    my $self = shift;
+    my $ch = shift;
+    my %typemap = %{shift || {}};
+    $ch =~ s/^ *//g;
+    $ch =~ s/ *$//g;
+    if ($typemap{$ch}) {
+        $ch = $typemap{$ch};
+    }
+    elsif ($typemap{'\\'.$ch}) {
+        $ch = $typemap{$ch};
+    }
+    elsif ($ch =~ /^\@(\w+)\@/) {
+	$ch = lc($1);
+    }
+    else {
+    }
+    $ch =~ s/isa/is_a/;
+    $ch =~ s/partof/part_of/;
+    $ch;
+}
+
+sub unescapego {
+    my $self = shift;
+    my $ch = shift;
+    $ch =~ s/\\//g;
+    $ch;
+
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_xref_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_xref_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/go_xref_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,106 @@
+# $Id: go_xref_parser.pm,v 1.7 2007/03/03 02:06:21 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::go_xref_parser;
+
+=head1 NAME
+
+  GO::Parsers::go_xref_parser     - syntax parsing of GO xref flat files (eg eg2go, metacyc2go)
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+This generates Stag event streams from one of the various GO flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+
+Examples of these files can be found at http://www.geneontology.org
+
+A description of the event streams generated follows; Stag or an XML
+handler can be used to catch these events
+
+=head1 GO XREF FILES
+
+These files have a filename *2go; eg metacyc2go
+
+  (dbxrefs
+   (termdbxref+
+     (termacc "s")
+     (dbxref
+       (xref_dbname "s")
+       (xref_key "s")))) 
+
+ 
+
+=head1 AUTHOR
+
+=cut
+
+use Carp;
+use FileHandle;
+use strict qw(vars refs);
+use base qw(GO::Parsers::base_parser);
+use GO::Parsers::ParserEventNames;    # XML constants
+
+sub dtd {
+    'go_xref-parser-events.dtd';
+}
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+    my $file = $self->file;
+
+    my $lnum = 0;
+    $self->start_event(OBO);
+    while (<$fh>) {
+        chomp;
+        $lnum++;
+        next if /^\!/;
+        next if /^$/;
+        $self->line($_);
+        $self->line_no($lnum);
+        my ($ext, @goids) = split(' > ',$_);
+        if ($ext =~ /^(\w+):?(\S+)(.*)/) {
+            my ($db,$dbacc,$name) = ($1,$2,$3);
+            $name =~ s/^\s+// if $name;
+            $dbacc =~ s/\s/\%20/g;
+            foreach my $goid (@goids) {
+                if ($goid =~ /(.*)\s+\;\s+(.*)/) {
+                    my $goacc = $2;
+                    if ($self->acc_not_found($goacc)) {
+                        $self->parse_err("No such ID: $goacc");
+                        next;
+                    }
+                    $self->start_event(TERM);
+                    $self->event(ID, $goacc);
+                    $self->start_event(XREF_ANALOG);
+                    $self->event(ACC, $dbacc);
+                    $self->event(DBNAME, $db);
+                    if ($name) {
+                        $self->event(NAME, $name)
+                    }
+                    $self->end_event(XREF_ANALOG);
+                    $self->end_event(TERM);
+                }
+                else {
+                    $self->parse_err("would not extract GO ID from: $goid");
+                }
+            }
+        }
+        else {
+            $self->parse_err("bad external ID: $ext in line: $_");
+        }
+    }
+    $self->end_event(OBO);
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/locuslink_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/locuslink_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/locuslink_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,175 @@
+# $Id: locuslink_parser.pm,v 1.1 2004/01/27 23:52:24 cmungall Exp $
+#
+# Adapterd from BioPerl module for Bio::SeqIO::locuslink
+#
+# POD documentation - main docs before the code
+
+=head1 NAME
+
+GO::Parsers::locuslink_parser - 
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+=cut
+
+package GO::Parsers::locuslink_parser;
+
+use strict;
+use vars qw(@ISA);
+
+use base qw(GO::Parsers::base_parser);
+
+sub _initialize {
+    my($self, at args) = @_;
+    $self->SUPER::_initialize(@args);  
+}
+
+
+sub transitions {
+    return
+      qw(
+         NM                transcript
+         NG                0
+         CONTIG            0
+         EVID              evidence
+         ACCNUM            accession
+         OFFICIAL_SYMBOL   0
+         BUTTON            url
+         DB_DESCR          dbxref
+         /DB_LINK          dbxref
+        );
+}
+
+sub compounds {
+    return
+      (
+       STS => [qw(sts_acc chr_num unk symbol type src)],
+       GO  => [qw(aspect term evcode go_acc src unk)],
+       EXTANNOT  => [qw(aspect term evcode src unk)],
+       CDD => [qw(domain domain_acc num unk score)],
+       NG => [qw(acc u1 u2 u3 u4)],
+       CONTIG => [qw(contig_acc u1 u2 u3 u4 strand chr_num src)],
+       XM  => [qw(acc gi)],
+       XP  => [qw(acc gi)],
+       XG  => [qw(acc gi)],
+       ACCNUM  => [qw(acc gi)],
+       PROT  => [qw(acc gi)],
+       MAP => [qw(map_loc link code)],
+       SUMFUNC => [qw(descr src)],
+       GRIF => [qw(grif_pmid descr)],
+       COMP => [qw(comp_acc symbol2 chr_num2 map_pos2 locusacc2 chr_num1 symbol1 src)],
+      );
+}
+
+sub record_tag {'locusset'}
+
+sub parse_fh {
+    my $self = shift;
+    my $fh = shift;
+    $self->start_event('locusset');
+    my (%record, at results,$search,$ref,$cddref);
+    my ($PRESENT, at keep);
+
+    # LOCUSLINK entries begin w/ >>
+    local $/=">>";
+
+    # slurp in a whole entry and return if no more entries
+    return unless my $entry = <$fh>;
+
+    # if its the first entry you have to slurp it in again
+    if ($entry eq '>>'){ #first entry
+        return unless $entry = <$fh>;
+    }
+
+    if (!($entry=~/LOCUSID/)){
+        $self->throw("No LOCUSID in first line of record. ".
+                     "Not LocusLink in my book.");
+    }
+
+    my %transitions = $self->transitions;
+    my %compounds = $self->compounds;
+#    my %grouped = ();
+#    foreach (keys %transitions) {
+#        if (/\;/) {
+#            my $t = $transitions{$_};
+#            my (@keylist) = split(/\;/, $_);
+#            foreach (@keylist) {
+#                $transitions{$_} = $t;
+#                $grouped{$_} = $t;
+#            }
+#        }
+#    }
+
+    $self->start_event('locus');
+    my $level = 0;
+    my @lines = split(/\n/, $entry);
+    foreach (@lines) {
+        if (/(\w+):\s*(.*)/) {
+            my ($k, $v) = (uc($1), $2);
+            my $transition = $transitions{$k};
+            if (defined $transition) {
+                if (!$transition) {
+                    if ($level) {
+                        #$self->throw("uh oh $_") unless $level;
+                        $self->end_event($level);
+                    }
+                    $level = 0;
+                }
+                elsif ($transition eq $level) {
+                    $self->end_event($level);
+                    $self->start_event($level);
+                }
+                else {
+                    if ($level) {
+                        $self->end_event($level);
+                        $level = 0;
+                    }
+                    $self->start_event($transition);
+                    $level = $transition;
+                }
+            }
+            # for grouped keys, every key must be part of
+            # group to remain part of the same super-element
+#            if ($level &&
+#                $grouped{$level}) {
+
+
+
+#                if (!$grouped{$k} ||
+#                    $grouped{$k} ne $grouped{$level}) {
+#                    $self->end_event($level);
+#                    $level = 0;
+#                }
+#            }
+
+            if ($compounds{$k}) {
+                my (@vals) = split(/\|/, $v);
+                my @pairs = ([defline=>$v]);
+                foreach (@{$compounds{$k}}) {
+                    my $v = shift @vals;
+                    push(@pairs, [$_ => $v]) unless $v eq 'na';
+                }
+                $self->event(lc($k) => [@pairs]);
+            }
+            else {
+                $self->event(lc($k), $v);
+            }
+
+            my $end = $transitions{'/'.$k};
+            if ($end) {
+                $self->end_event($end);
+                $level = 0;
+            }
+        }
+    }
+    if ($level) {
+        $self->end_event($level);
+    }
+    $self->end_event('locus');
+    $self->end_event('locusset');
+    return;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/mesh_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/mesh_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/mesh_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,125 @@
+# $Id: mesh_parser.pm,v 1.4 2005/03/30 21:15:48 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::mesh_parser;
+
+=head1 NAME
+
+  GO::Parsers::mesh_parser     - Parses Mesh ascii text files
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+EXPERIMENTAL
+
+=head1 AUTHOR
+
+=cut
+
+use Exporter;
+use GO::Parsers::base_parser;
+ at ISA = qw(GO::Parsers::base_parser Exporter);
+
+use Carp;
+use FileHandle;
+use strict qw(subs vars refs);
+
+sub parse_file {
+    my ($self, $file, $dtype) = @_;
+    $self->file($file);
+
+    my $fh = new FileHandle($file);
+    if (!$fh) {confess "Couldn't open '$file': $!"};
+
+    $/ = '*NEWRECORD';
+
+    my %treenode2acc = ();
+
+    $self->start_event("subgraph");
+
+    my @accs = ();
+
+    my $lnum = 0;
+
+  PARSELINE:
+    while (my $block = <$fh>) {
+	chomp $block;
+        next unless $block;
+	++$lnum;
+        $self->line($block);
+        $self->line_no($lnum);
+
+        my @lines = split(/\n/, $block);
+        my ($name, $acc, $def, @mn);
+        map {
+            if (/(\w+) = (.*)/) {
+                my ($key, $val) = ($1, $2);
+                if ($key eq "MH") {
+                    $name = $val;
+                }
+                if ($key eq "UI") {
+                    $acc = $val;
+                }
+                if ($key eq "MS") {
+                    $def = $val;
+                }
+                if ($key eq "MN") {
+                    push(@mn, $val);
+                }
+            }
+        } @lines;
+        
+        $self->event('term',
+                     [
+                      [name=>$name],
+                      [acc=>"Mesh:$acc"],
+                      [term_type=>"Mesh"],
+                     ]
+                    );
+        $self->event('def',
+                     [
+                      ['godef-goid'=>$acc],
+                      ['godef-definition'=>$def],
+                     ]
+                    ) if $def;
+        push(@accs, $acc);
+        foreach (@mn) {
+            $treenode2acc{$_} = $acc;
+        }
+    }
+    foreach my $tn (keys %treenode2acc) {
+        my $child = $treenode2acc{$tn};
+        my $pn = $tn;
+        $pn =~ s/\.(\d+)$//;
+        if ($pn ne $tn) {
+            my $parent = $treenode2acc{$pn};
+            $self->event("term" => [
+                                    [acc=>$child],
+                                    [rel=> [
+                                            [type => 'isa'],
+                                            [obj=>$parent]
+                                           ]
+                                    ]
+                                   ]
+                        );
+        }
+    }
+
+    $self->end_event("subgraph");
+    $self->parsed_ontology(1);
+#    use Data::Dumper;
+#    print Dumper $self;
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/mgi_assoc_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/mgi_assoc_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/mgi_assoc_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,143 @@
+# $Id: mgi_assoc_parser.pm,v 1.3 2006/08/05 20:26:12 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::mgi_assoc_parser;
+
+=head1 NAME
+
+  GO::Parsers::mgi_assoc_parser - parses MGI gene assoc stanza files
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=head1 DESCRIPTION
+
+This is an EXPERIMENTAL module for converting MGIs in-house stanza format
+
+this is richer than go_assoc files as it allows combinatorial assocs
+
+these are represented with the go-assoc xml <in> element
+
+=head1 AUTHOR
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser Exporter);
+use GO::Parsers::ParserEventNames;
+
+use Carp;
+use FileHandle;
+use strict;
+
+sub dtd {
+    'go_assoc-parser-events.dtd';
+}
+
+sub ev_filter {
+    my $self = shift;
+    $self->{_ev_filter} = shift if @_;
+    return $self->{_ev_filter};
+}
+
+
+
+sub skip_uncurated {
+    my $self = shift;
+    $self->{_skip_uncurated} = shift if @_;
+    return $self->{_skip_uncurated};
+}
+
+sub _parse_ids {
+    my $txt = shift;
+    $txt =~ s/^:+//;
+    $txt =~ s/^\s+//;
+    my @parts = split(/\|/,$txt);
+    return grep {$_} map {if (/(\w+:\S+)/){$1}else {()}} @parts;
+}
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+    my $file = $self->file;
+
+
+    $self->start_event(ASSOCS);
+    $self->start_event(DBSET);
+    $self->event(PRODDB, 'mgi');
+
+    my $curr_gene = '';
+    while (<$fh>) {
+        # UNICODE causes problems for XML and DB
+        # delete 8th bit
+        tr [\200-\377]
+          [\000-\177];   # see 'man perlop', section on tr/
+        # weird ascii characters should be excluded
+        tr/\0-\10//d;   # remove weird characters; ascii 0-8
+                        # preserve \11 (9 - tab) and \12 (10-linefeed)
+        tr/\13\14//d;   # remove weird characters; 11,12
+                        # preserve \15 (13 - carriage return)
+        tr/\16-\37//d;  # remove 14-31 (all rest before space)
+        tr/\177//d;     # remove DEL character
+
+	chomp;
+	if (/^\!/) {
+	    next;
+	}
+	if (!$_) {
+	    next;
+	}
+
+        if (/^MGI gene:\s(\S+);\s+(\S+)/) {
+            if ($1 ne $curr_gene) {
+                $self->pop_stack_to_depth(2);
+                $self->start_event(PROD);
+                $self->event(PRODACC, $1);
+                $self->event(PRODSYMBOL, $2);
+                $self->event(PRODTYPE, 'gene');
+                $curr_gene = $1;
+            }
+        }
+        if (/^GO term:\s(.*);\s+(\S+)/) {
+	    $self->start_event(ASSOC);
+	    $self->event(TERMACC, $2);
+            while (<>) {
+                chomp;
+                last unless $_;
+                if (/^GO evidence:\s*(.*)/) {
+                    my $evtxt = $1;
+                    foreach (split(/\s+\|\s+/,$evtxt)) {
+                        $self->start_event(EVIDENCE);
+                        $self->event(EVCODE, $_);
+                        $self->end_event(EVIDENCE);
+                    }
+                }
+                elsif (/^anatomy:(.*)/) {
+                    my @ids = _parse_ids($1);
+                    $self->event(property_value=>[[type=>'located_in'],
+                                                  [to=>$_]]) foreach @ids;
+                }
+                elsif (/^cell type:(.*)/) {
+                    my @ids = _parse_ids($1);
+                    $self->event(property_value=>[[type=>'located_in'],
+                                                  [to=>$_]]) foreach @ids;
+                }
+                else {
+                }
+            }
+	    $self->end_event(ASSOC);
+        }
+    }
+    $fh->close;
+
+    $self->pop_stack_to_depth(0);
+}
+
+
+1;
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ncbi_taxon_names_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ncbi_taxon_names_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ncbi_taxon_names_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,73 @@
+# $Id: ncbi_taxon_names_parser.pm,v 1.2 2004/11/24 02:28:02 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::ncbi_taxon_names_parser;
+
+=head1 NAME
+
+  GO::Parsers::ncbi_taxon_names_parser     - OBO Flat file parser object
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+
+=cut
+
+use Exporter;
+use Text::Balanced qw(extract_quotelike extract_bracketed);
+use base qw(GO::Parsers::base_parser);
+
+use Carp;
+use FileHandle;
+use strict qw(subs vars refs);
+
+
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+
+    my @stags = ();
+    my $curr_id;
+    $self->start_event('taxon_set');
+    while (<$fh>) {
+	chomp;
+	my @vals = split(/\s*\|\s*/,$_);
+	my ($id,$val,$xx,$tag) = @vals;
+	if ($curr_id && $id != $curr_id) {
+	    $self->event(taxon=>[
+				 [id=>$curr_id],
+				 @stags
+				]);
+	    @stags = ();
+	}
+	$tag = lc($tag);
+	$tag =~ s/\s/_/g;
+	$tag =~ tr/a-z0-0_//cd;
+	push(@stags, [$tag=>$val]);
+	if ($tag eq 'scientific_name') {
+	    # lump subspecies in with species;
+	    # eg genus=Homo, species=sapiens neanderthalensis
+	    my ($genus,$species) = ($val =~ /^(\S+)\s+(.*)/);
+	    push(@stags, [genus=>$genus],[species=>$species]);
+	}
+	$curr_id = $id;
+    }
+    $self->event(taxon=>[
+			 [id=>$curr_id],
+			 @stags
+			]);
+    $self->end_event('taxon_set');
+    return;
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ncbi_taxonomy_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ncbi_taxonomy_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/ncbi_taxonomy_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,213 @@
+# $Id: ncbi_taxonomy_parser.pm,v 1.9 2006/12/07 23:16:53 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::ncbi_taxonomy_parser;
+
+=head1 NAME
+
+  GO::Parsers::ncbi_taxonomy_parser 
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+See L<ftp://ftp.ebi.ac.uk/pub/databases/taxonomy/taxonomy.dat>
+
+
+=head1 PARSER ARCHITECTURE
+
+This generates Stag event streams from one of the various GO flat file
+formats (ontology, defs, xref, associations). See GO::Parser for details
+
+Examples of these files can be found at http://www.geneontology.org
+
+A description of the event streams generated follows; Stag or an XML
+handler can be used to catch these events
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser);
+use GO::Parsers::ParserEventNames;  # declare XML constants
+
+use Carp;
+use FileHandle;
+use strict qw(subs vars refs);
+
+my %synonymtypes =
+  (
+   'genbank synonym'=>['related'],
+   'synonym'=>['related'],
+   'in-part'=>['related'],
+   'blast name'=>['related'],
+   'misnomer'=>['related'],
+   'misspelling'=>['related'],
+   'scientific name'=>['exact'],
+   'equivalent name'=>['exact'],
+   'common name'=>['exact'],
+   'genbank common name'=>['exact'],
+   'acronym'=>['broad'],
+   'genbank acronym'=>['broad'],
+   'teleomorph'=>['related'],
+   'anamorph'=>['related'],
+   'genbank anamorph'=>['related'],
+  );
+
+sub syn {
+    my $name = shift;
+    $name =~ s/\s/_/g;
+    $name =~ s/\-/_/g;
+    $name;
+}
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+    my $file = $self->file;
+    $self->{name_h} = {};
+
+    $self->start_event(OBO);
+    $self->event(header=>
+                 [
+                  ['default-namespace'=>'ncbi_taxonomy'],
+                  [remark=>'autogenerated via GO::Parsers::ncbi_taxonomy_parser'],
+                  (map {[synonymtypedef=>[[name=>syn($_)],[defstr=>$_],[scope=>$synonymtypes{$_}->[0]]]]} keys %synonymtypes),
+                 ]);
+
+    $self->event(typedef=>
+                 [
+                  [id=>'has_rank'],
+                  [name=>"has_rank"],
+                  [def=>[[defstr=>"A metadata relation between a class and its taxonomic rank (eg species, family)"]]],
+                  [is_metadata_tag=>1],
+                  [comment=>"This is an abstract class for use with the NCBI taxonomy to name the depth of the node within the tree. The link between the node term and the rank is only visible if you are using an obo 1.3 aware browser/editor; otherwise this can be ignored"]
+                 ]);
+
+    $self->event(term=>
+                 [
+                  [id=>_fix_id("taxonomic_rank")],
+                  [name=>"taxonomic_rank"],
+                  [def=>[[defstr=>"A level of depth within a species taxonomic tree"]]],
+                  [comment=>"This is an abstract class for use with the NCBI taxonomy to name the depth of the node within the tree. The link between the node term and the rank is only visible if you are using an obo 1.3 aware browser/editor; otherwise this can be ignored"]
+                 ]);
+
+    my $lnum = 0;
+    my %h = ();
+    my $text;
+    while (my $line = <$fh>) {
+        chomp $line;
+        if ($line eq '//') {
+            $self->emit_term(\%h,$text);
+            %h = ();
+            $text = '';
+        }
+        else {
+            if ($line =~ /^([\w\s\-]+)\s+:\s*(.*)/) {
+                my ($k,$v) = ($1,$2);
+                $k = lc($k); # lowercase
+                $k =~ s/\s+$//;  # removing trailing ws
+                push(@{$h{$k}},$v);
+            }
+            else {
+                $self->parse_err("Line: $line");
+            }
+            $text .= "$line\n";
+        }
+    }
+    $self->pop_stack_to_depth(0);  # end event obo
+}
+
+sub _rank_id {
+    my $rank = shift;
+    $rank =~ s/\s+/_/g;
+    _fix_id($rank);
+}
+
+sub _fix_id {
+    return "NCBITaxon:$_[0]";
+}
+
+sub emit_term {
+    my ($self, $h, $text) = @_;
+    my $id = pop @{$h->{id}};
+    if (!$id) {
+        $self->parse_err("No id! in:\n$text");
+        return;
+    }
+    $id = _fix_id($id);
+    $self->start_event(TERM);
+    $self->event(ID,$id);
+    my $name = pop @{$h->{'scientific name'}};
+    my ($gname) = @{$h->{'genbank common name'} || []};
+    if (!$name) {
+        $name = $gname;
+        pop @{$h->{'genbank common name'}} if $gname;
+    }
+    if ($self->{name_h}->{$name}) {
+        $name .= " [$id]"; # force unique
+    }
+    $self->{name_h}->{$name} = $id;
+    $self->event(NAME, $name);
+    foreach my $st (keys %synonymtypes) {
+        my $syns = $h->{$st};
+        next unless $syns;
+        my $scope = $synonymtypes{$st}->[0];
+        foreach my $s (@$syns) {
+            my @xrefs = ();
+            if ($s =~ /\"(.+)\"\s*(.+)/ ||
+                $s =~ /\'(.+)\'\s*(.+)/) {
+                my $xref = $2;
+                $s = $1;
+                $xref =~ s/\s+/_/g;
+                $xref =~ tr/\(\)//d;
+                push(@xrefs, [dbxref=>[[acc=>$xref],[dbname=>"NCBITaxonRef"]]]);
+            }
+            $self->event(SYNONYM,[
+                                  ['@'=>[['scope',$scope],
+                                         [SYNONYM_TYPE,syn($st)]]],
+                                  [SYNONYM_TEXT,$s],
+                                  @xrefs]);
+        }
+    }
+    my $rank = pop @{$h->{rank}};
+    if ($rank eq 'no rank') {
+        $rank = undef;
+    }
+    if ($rank) {
+        if (!$self->{__rank}->{$rank}) {
+            $self->{__rank}->{$rank} = 1;
+            $self->event(TERM,[[ID,_rank_id($rank)],
+                               [NAME,$rank],
+                               [IS_A,_rank_id('taxonomic_rank')],
+                              ]);
+        }
+
+        #this is the correct way to handle this - as annotation properties
+        $self->event(PROPERTY_VALUE,[[TYPE,'has_rank'],
+                                     [TO,_rank_id($rank)]])
+          if $rank;
+        
+# do it this way for now until oboedit is fixed:
+#        $self->event(RELATIONSHIP,[[TYPE,'has_rank'],
+#                                   [TO,_rank_id($rank)]])
+    }
+
+    my $gc = pop @{$h->{'gc id'}};
+    $self->event(XREF, "GC_ID:$gc") if $gc;
+    my $parent_id = pop @{$h->{'parent id'}};
+    if ($parent_id) {
+        $parent_id = _fix_id($parent_id);
+        $self->event(IS_A,$parent_id);
+    }
+    $self->end_event(TERM);
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_emitter.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_emitter.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_emitter.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,178 @@
+# $Id: obj_emitter.pm,v 1.3 2006/08/13 02:02:37 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::obj_emitter;
+
+=head1 NAME
+
+GO::Parsers::obj_emitter     - 
+
+=head1 SYNOPSIS
+
+do not use this class directly; use GO::Parser
+
+=head1 DESCRIPTION
+
+This is not a file parser - it takes a L<GO::Model::Graph> object as
+inputs and fires OBO XML events
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser);
+use GO::Parsers::ParserEventNames;
+use GO::Model::Graph;
+
+use Carp;
+use FileHandle;
+
+use strict;
+
+our @TAGS =
+  qw(id
+     name
+     alt_id*
+     namespace
+     comment
+     def
+     subset*
+     is_a*
+     relationship*
+     is_root
+     is_obsolete
+     is_transitive
+     synonym*
+     xref_analog*
+     xref_unknown*
+    );
+
+sub dtd {
+    'obo-parser-events.dtd';
+}
+
+sub emit_graph {
+    my ($self, $g) = @_;
+
+    $self->start_event(OBO);
+    $self->fire_source_event($self->file || "object");
+    $self->start_event(HEADER);
+    $self->end_event(HEADER);
+
+    $g->iterate(sub {
+                    my $ni = shift;
+                    $self->emit_term($ni->term, $g);
+                    return;
+                });
+    $self->end_event(OBO);
+}
+
+sub emit_term {
+    my ($self, $t, $g) = @_;
+    my $stanza = TERM;
+    if ($t->is_relationship_type) {
+        $stanza = TYPEDEF;
+    }
+    $self->start_event($stanza);
+
+    my $parent_rels = $g->get_parent_relationships($t->acc);
+    foreach my $xtag (@TAGS) {
+        my $multiple = 0;
+        my $tag = $xtag;
+        if ($xtag =~ /(.*)\*$/) {
+            $tag = $1;
+            $multiple = 1;
+        }
+
+        if ($tag eq ID) {
+            $self->event(ID, $t->acc);
+        }
+        elsif ($tag eq IS_ROOT) {
+            $self->event(IS_ROOT, 1)
+              unless @$parent_rels;
+        }
+        elsif ($tag eq IS_OBSOLETE) {
+            $self->event(IS_OBSOLETE, 1)
+              if $t->is_obsolete;
+        }
+        elsif ($tag eq IS_TRANSITIVE ||
+               $tag eq IS_SYMMETRIC  ||
+               $tag eq IS_ANTI_SYMMETRIC  ||
+               $tag eq IS_REFLEXIVE  ||
+               $tag eq INVERSE_OF) {
+            # obo extensions - not dealt with yet
+        }
+        elsif ($tag eq XREF_ANALOG || $tag eq XREF_UNKNOWN) {
+            $self->event($tag=>dbxref($_))
+              foreach @{$t->dbxref_list || []};
+        }
+        elsif ($tag eq DEF) {
+            my $xrefs = $t->definition_dbxref_list || [];
+            $self->event(DEF, 
+                         [[DEFSTR, $t->definition],
+                          map {
+                              [DBXREF,dbxref($_)]
+                          } @$xrefs
+                         ]);
+        }
+        elsif ($tag eq SYNONYM) {
+            my $sh = $t->synonyms_by_type_idx || {};
+            foreach my $type (keys %$sh) {
+                foreach my $val (@{$sh->{$type} || []}) {
+                    $self->event(SYNONYM,
+                                 [['@'=>[[scope=>$type]]],
+                                  [SYNONYM_TEXT,$val]]);
+                }
+            }
+        }
+        elsif ($tag eq IS_A) {
+            foreach (grep {$_->type eq 'is_a'} @$parent_rels) {
+                $self->event(IS_A, $_->parent_acc)
+            }
+        }
+        elsif ($tag eq RELATIONSHIP) {
+            foreach (grep {$_->type ne 'is_a'} @$parent_rels) {
+                $self->event(RELATIONSHIP,
+                             [[TYPE,$_->type],
+                              [TO,$_->parent_acc]
+                             ]);
+            }
+                
+        }
+        else {
+            if ($multiple) {
+                my $method = $tag.'_list';
+                my $vals = $t->$method();
+                $self->event($tag, $_)
+                  foreach @$vals;
+            }
+            else {
+                if ($t->can($tag)) {
+                    my $v = $t->$tag();
+                    $self->event($tag, $v) if defined $v;
+                }
+                else {
+                    warn("no method for: $tag");
+                }
+            }
+        }
+    }
+
+    $self->end_event($stanza);
+}
+
+sub dbxref {
+    my $xref = shift || confess;
+    my $name = $xref->name;
+    return 
+      [[acc=>$xref->acc],
+       [dbname=>$xref->dbname],
+       $name ? [name=>$xref->name] : ()
+      ];
+}
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_storable_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_storable_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_storable_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,28 @@
+package GO::Parsers::obj_storable_parser;
+use GO::Parsers::ParserEventNames;
+use strict;
+use base qw(GO::Parsers::obj_emitter GO::Parsers::base_parser);
+use GO::Model::Graph;
+use Storable qw(fd_retrieve);
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+#    my $t=time;
+#    print STDERR "RETRIEVING FROM CACHE $t\n"; 
+    my $g = fd_retrieve($fh);
+    if ($self->handler->isa("GO::Handler::obj")) {
+        $self->handler->g($g);
+        $self->start_event(OBO);
+        $self->end_event(OBO);
+    }
+    else {
+        $self->emit_graph($g);
+    }
+#    my $t2 = time;
+#    my $td = $t2-$t;
+#    print STDERR "GOT FROM CACHE $t2 [$td]\n"; 
+    return $g;
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_yaml_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_yaml_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obj_yaml_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,17 @@
+package GO::Parsers::obj_yaml_parser;
+use strict;
+use base qw(GO::Parsers::obj_emitter GO::Parsers::base_parser);
+use GO::Model::Graph;
+use YAML;
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+    my $str = join('',<$fh>);
+    $fh->close;
+    my $g = Load($str);
+    $self->emit_graph($g);
+    return $g;
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,3 @@
+package GO::Parsers::obo_parser;
+use base qw(GO::Parsers::obo_text_parser);
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_text_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_text_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_text_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,703 @@
+# $Id: obo_text_parser.pm,v 1.41 2007/09/12 03:07:30 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::obo_text_parser;
+
+=head1 NAME
+
+  GO::Parsers::obo_text_parser     - OBO Flat file parser object
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+
+=cut
+
+use Exporter;
+use Text::Balanced qw(extract_quotelike extract_bracketed);
+use base qw(GO::Parsers::base_parser);
+use GO::Parsers::ParserEventNames;
+
+use Carp;
+use FileHandle;
+
+use strict qw(vars refs);
+
+sub dtd {
+    'obo-parser-events.dtd';
+}
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+    my $file = $self->file;
+    my $litemode = $self->litemode;
+    my $is_go;
+    local($_);    # latest perl is more strict about modification of $_
+
+    $self->start_event(OBO);
+    $self->fire_source_event($file);
+    $self->start_event(HEADER);
+    my $stanza_count;
+    my $in_hdr = 1;
+    my $is_root = 1; # default
+    my $namespace_set;
+    my $id;
+    my $namespace = $self->force_namespace; # default
+    my $force_namespace = $self->force_namespace;
+    my $usc = $self->replace_underscore;
+    my %id_remap_h = ();
+
+    # temporary hack...
+    if ($ENV{OBO_IDMAP}) {
+        my @parts = split(/\;/,$ENV{OBO_IDMAP});
+        foreach (@parts) {
+            if (/(.*)=(.*)/) {
+                $id_remap_h{$1} = $2;
+            }
+        }
+    }
+
+    my $default_id_prefix;
+
+    while(<$fh>) {
+	chomp;
+
+
+        tr [\200-\377]
+          [\000-\177];   # see 'man perlop', section on tr/
+        # weird ascii characters should be excluded
+        tr/\0-\10//d;   # remove weird characters; ascii 0-8
+                        # preserve \11 (9 - tab) and \12 (10-linefeed)
+        tr/\13\14//d;   # remove weird characters; 11,12
+                        # preserve \15 (13 - carriage return)
+        tr/\16-\37//d;  # remove 14-31 (all rest before space)
+        tr/\177//d;     # remove DEL character
+
+        s/^\!.*//;
+        s/[^\\]\!.*//;
+        #s/[^\\]\#.*//;
+        s/^\s+//;
+        s/\s+$//;
+	next unless $_;
+        next if ($litemode && $_ !~ /^(\[|id:|name:|is_a:|relationship:|namespace:|is_obsolete:)/ && !$in_hdr);
+	if (/^\[(\w+)\]\s*(.*)/) { # new stanza
+
+            # we are at the beginning of a new stanza
+            # reset everything and make sure everything from
+            # previous stanza is exported
+
+	    my $stanza = lc($1);
+	    my $rest = $2;
+	    if ($in_hdr) {
+		$in_hdr = 0;
+		$self->end_event(HEADER);
+	    }
+	    else {
+                if (!$namespace_set) {
+                    if (!$namespace) {
+                        if ($stanza ne 'instance') {
+                            #$self->parse_err("missing namespace for ID: $id");
+                        }
+                    }
+                    else {
+                        $self->event(NAMESPACE, $namespace);
+                    }
+                }
+                $self->event(IS_ROOT,1) if $is_root;
+                $is_root = 1; # assume root by default; override if parents found
+                $namespace_set = 0;
+		$self->end_event;
+	    }
+            $is_root = 0 unless $stanza eq 'term';
+	    $self->start_event($stanza);
+            $id = undef;
+            $stanza_count++;
+	}
+        elsif ($in_hdr) {
+
+            # we are in the header section
+
+            if (/^([\w\-]+)\:\s*(.*)/) {  # tag-val pair
+                my ($tag, $val) = ($1,$2);
+                if ($tag eq 'subsetdef') {
+                    if ($val =~ /(\S+)\s+(.*)/) {
+                        my $subset_id = $1;
+                        $val = $2;
+                        my ($subset_name, $parts) =
+                          extract_qstr($val);
+                        $val =
+                          [[ID,$subset_id],
+                           [NAME,$subset_name],
+                           map {dbxref($_)} @$parts];
+                    }
+                    else {
+                        $self->parse_err("subsetdef: expect ID \"NAME\", got: $val");
+                    }
+                }
+                if ($tag eq 'synonymtypedef') {
+                    if ($val =~ /(\S+)\s+\"(.*)\"\s*(.*)/) {
+                        my $stname = $1;
+                        my $stdef = $2;
+                        my $scope = $3;
+                        $val =
+                          [[ID,$stname],
+                           [NAME,$stdef],
+                           ($scope ? ['scope', $scope] : ())];
+
+                    }
+                    else {
+                        $self->parse_err("subsetdef: expect ID \"NAME\", got: $val");
+                    }
+                }
+                if ($tag eq 'idspace') {
+                    my ($idspace,$global, at rest) = split(' ',$val);
+                    if (!$global) {
+                        $self->parse_err("id-mapping requires two columns");
+                    }
+                    $val =
+                      [['local',$idspace],
+                       ['global',$global],
+                       (@rest ? [COMMENT,join(' ', at rest)] : ()),
+                      ];
+                }
+
+                $self->event($tag=>$val);
+
+                # post-processing
+                if ($tag eq 'default-namespace') {
+                    $namespace = $val
+                      unless $namespace;
+                }
+                if ($tag eq 'id-mapping') {
+                    if ($val =~ /(\S+)\s+(.*)/) {
+                        if ($id_remap_h{$1}) {
+                            $self->parse_err("remapping $1 to $2");
+                        }
+                        $id_remap_h{$1} = $2;
+                    }
+                    else {
+                        $self->parse_err("id-mapping requires two columns");
+                    }
+                }
+                if ($tag eq 'default-id-prefix') {
+                    $default_id_prefix = $val;
+                }
+            }
+            else {
+                $self->parse_err("illegal header entry: $_");
+            }
+        } # END OF IN-HEADER
+	elsif (/^([\w\-]+)\:\s*(.*)/) {  # tag-val pair
+	    my ($tag, $val) = ($1,$2);
+            my $qh;
+            ($val, $qh) = extract_quals($val);
+	    #$val =~ s/\\//g;
+	    my $val2 = $val;
+	    $val2 =~ s/\\,/,/g;
+	    $val2 =~ s/\\//g;
+            if ($tag eq ID) {
+                if ($id_remap_h{$val}) {
+                    $val = $id_remap_h{$val};
+                }
+                if ($val !~ /:/) {
+                    if ($default_id_prefix) {
+                        $val = "$default_id_prefix:$val";
+                    }
+                }
+            }
+            elsif ($tag eq NAME) {
+                # replace underscore in name
+                $val = $val2;
+                if ($usc) {
+                    $val =~ s/_/$usc/g;
+                }
+            }
+	    elsif ($tag eq RELATIONSHIP) {
+		my ($type, $id) = split(' ', $val2);
+                if ($id_remap_h{$type}) {
+                    $type = $id_remap_h{$type};
+                }
+                if ($type !~ /:/) {
+                    if ($default_id_prefix) {
+                        $type = "$default_id_prefix:$type";
+                    }
+                }
+		$val = [[TYPE,$type],[TO,$id]];
+	    }
+	    elsif ($tag eq INTERSECTION_OF || $tag eq UNION_OF) {
+		my ($type, $id) = split(' ', $val2);
+                if ($id_remap_h{$type}) {
+                    $type = $id_remap_h{$type};
+                }
+		if ($id) {
+                    $val = [[TYPE,$type],[TO,$id]];
+                }
+                else {
+                    $id = $type;
+                    $val = [[TO,$id]];
+                }
+	    }
+	    elsif ($tag eq INVERSE_OF || $tag eq TRANSITIVE_OVER) {
+                if ($id_remap_h{$val}) {
+                    $val = $id_remap_h{$val};
+                }
+	    }
+	    elsif ($tag eq XREF) {
+                $tag = XREF_ANALOG;
+		my $dbxref = dbxref($val);
+		$val = $dbxref->[1];
+	    }
+	    elsif ($tag eq XREF_ANALOG) {
+		my $dbxref = dbxref($val);
+		$val = $dbxref->[1];
+	    }
+	    elsif ($tag eq XREF_UNKNOWN) {
+		my $dbxref = dbxref($val);
+		$val = $dbxref->[1];
+	    }
+	    elsif ($tag eq PROPERTY_VALUE) {
+                if ($val =~ /^(\S+)\s+(\".*)/) {
+                    # first form
+                    # property_value: relation "literal value" xsd:datatype
+                    my $type = $1;
+                    my $rest = $2;
+                    my ($to, $datatype) = extract_quotelike($rest);
+                    $to =~ s/^\"//;
+                    $to =~ s/\"$//;
+                    $datatype =~ s/^\s+//;
+                    $val = [[TYPE,$type],
+                            [VALUE,$to],
+                            [DATATYPE,$datatype]];
+                }
+                else {
+                    # second form
+                    # property_value: relation ToID
+                    my ($type,$to) = split(' ',$val);
+                    $val = [[TYPE,$type],
+                            [TO,$to]];
+                }
+	    }
+            elsif ($tag eq NAMESPACE) {
+                if ($force_namespace) {
+                    # override whatever namespace was provided
+                    $val = $force_namespace;
+                }
+                else {
+                    # do nothing - we will export later
+                }
+                $namespace_set = $val;
+            }
+	    elsif ($tag eq DEF) {
+		my ($defstr, $parts) =
+		  extract_qstr($val);
+		$val =
+		  [[DEFSTR,$defstr],
+		   map {dbxref($_)} @$parts];
+	    }
+	    elsif ($tag =~ /(\w*)synonym/) {
+                my $scope = $1 || '';
+                if ($scope) {
+                    $tag = SYNONYM;
+                    if ($scope =~ /(\w+)_$/) {
+                        $scope = $1;
+                    }
+                    else {
+                        $self->parse_err("bad synonym type: $scope");
+                        $scope = '';
+                    }
+                }
+		my ($syn, $parts, $extra_quals) =
+		  extract_qstr($val2);
+                if (@$extra_quals) {
+                    $scope = shift @$extra_quals;
+                    $scope = lc($scope);
+                    $qh->{synonym_type} = shift @$extra_quals if @$extra_quals;
+                }
+                if ($qh->{scope}) {
+                    if ($scope) {
+                        if ($scope ne $qh->{scope}) {
+                            $self->parse_err("inconsistent scope: $scope/$qh->{scope}");
+                        }
+                        else {
+                            $self->parse_err("redundant scope: $scope");
+                        }
+                    }
+                }
+                else {
+                    $qh->{scope} = $scope;
+                }
+            
+		$val =
+		  [[SYNONYM_TEXT,$syn],
+		   (map {dbxref($_)} @$parts)];
+	    }
+	    elsif ($tag eq 'holds_temporally_between' ||    # experimental support for obof1.3
+                   $tag eq 'holds_atemporally_between' ||
+                   $tag eq 'holds_on_class_level_between') {
+		my ($sub, $ob) = split(' ', $val2);
+                if ($id_remap_h{$sub}) {
+                    $sub = $id_remap_h{$sub};
+                }
+                if ($id_remap_h{$ob}) {
+                    $ob = $id_remap_h{$ob};
+                }
+		$val = [[subject=>$sub],[object=>$ob]];
+	    }
+	    elsif ($tag eq 'holds_over_chain') {    # experimental support for obof1.3
+		my @rels = split(/\s*\*\s*/, $val2);
+
+                @rels = map {                 
+                    if ($id_remap_h{$_}) { 
+                        $id_remap_h{$_}
+                    }
+                    else {
+                        $_;
+                    }
+                } @rels;
+		$val = [map {[relation=>$_]} @rels];
+	    }
+	    else {
+		$val = $val2;
+		# normal tag:val
+	    }
+            if (!ref($val) && $val eq 'true') {
+                $val = 1;
+            }
+            if (!ref($val) && $val eq 'false') {
+                $val = 0;
+            }
+            if (%$qh) {
+                # note that if attributes are used for
+                # terminal nodes then we effectively have
+                # to 'push the node down' a level;
+                # eg
+                # <is_a>x</is_a>
+                #    ==> [is_a=>'x']
+                # <is_a t="v">x</is_a> 
+                #    ==> [is_a=>[[@=>[[t=>v]]],[.=>x]]]
+                my $data = ref $val ? $val : [['.'=>$val]];
+                my @quals = map {[$_=>$qh->{$_}]} keys %$qh;
+                $self->event($tag=>[['@'=>[@quals]],
+                                    @$data,
+                                   ]);
+            }
+            else {
+                $self->event($tag=>$val);
+            }
+            if ($tag eq IS_A || $tag eq RELATIONSHIP) {
+                $is_root = 0;
+            }
+            if ($tag eq IS_OBSOLETE && $val) {
+                $is_root = 0;
+            }
+	    if ($tag eq ID) {
+                $id = $val;
+	    }
+	    if ($tag eq NAME) {
+                if (!$id) {
+                    $self->parse_err("missing id!")
+                }
+                else {
+                    $self->acc2name_h->{$id} = $val;
+                }
+	    }
+	}
+	else {
+	    $self->throw("uh oh: $_");
+	}
+    }
+
+    # duplicated code! check final event
+    if (!$namespace_set) {
+        if (!$namespace && $stanza_count) {
+            #$self->parse_err("missing namespace for ID: $id");
+        }
+        else {
+            $self->event(NAMESPACE, $namespace);
+        }
+    }
+    $self->event(IS_ROOT,1) if $is_root;
+    $self->pop_stack_to_depth(0);
+    $self->parsed_ontology(1);
+    return;
+}
+
+# each tag line can have trailing qualifiers in {}s at the end
+sub extract_quals {
+    my $str = shift;
+
+    my %q = ();
+    if ($str =~ /(.*)\s+(\{.*)\}\s*$/) {
+        my $return_str = $1;
+        my $extr = $2;
+        if ($extr) {
+            my @qparts = split_on_comma($extr);
+            foreach (@qparts) {
+                if (/(\w+)=\"(.*)\"/) {
+                    $q{$1} = $2;
+                }
+                elsif (/(\w+)=\'(.*)\'/) {
+                    $q{$1} = $2;
+                }
+                elsif (/(\w+)=(\S+)/) { # current 1.2 standard; non-quoted
+                    $q{$1} = $2;
+                }
+                else {
+                    warn("$_ in $str");
+                }
+            }
+        }
+        return ($return_str, \%q);
+    }
+    else {
+        return ($str, {});
+    }
+}
+
+sub extract_qstr {
+    my $str = shift;
+
+    my ($extr, $rem, $prefix) = extract_quotelike($str);
+    my $txt = $extr;
+    $txt =~ s/^\"//;
+    $txt =~ s/\"$//;
+    if ($prefix) {
+	warn("illegal prefix: $prefix in: $str");
+    }
+
+    my @extra = ();
+
+    # synonyms can have two words following quoted part
+    # before dbxref section
+    #  - two
+    if ($rem =~ /(\w+)\s+(\w+)\s+(\[.*)/) {
+        $rem = $3;
+        push(@extra,$1,$2);
+    }
+    elsif ($rem =~ /(\w+)\s+(\[.*)/) {
+        $rem = $2;
+        push(@extra,$1);
+    }
+    else {
+    }
+
+    my @parts = ();
+    while (($extr, $rem, $prefix) = extract_bracketed($rem, '[]')) {
+	last unless $extr;
+	$extr =~ s/^\[//;
+	$extr =~ s/\]$//;
+	push(@parts, $extr) if $extr;
+    }
+    @parts =
+      map {split_on_comma($_)} @parts;
+    
+    $txt =~ s/\\//g;
+    return ($txt, \@parts, \@extra);
+}
+
+sub split_on_comma {
+    my $str = shift;
+    my @parts = ();
+    while ($str =~ /(.*[^\\],\s*)(.*)/) {
+	$str = $1;
+	my $part = $2;
+	unshift(@parts, $part);
+	$str =~ s/,\s*$//;
+    }
+    unshift(@parts, $str);
+    return map {s/\\//g;$_} @parts;
+}
+
+# turns a DB:ACC string into an obo-xml dbxref element
+sub dbxref {
+    my $str = shift;
+    $str =~ s/\\//g;
+    my $name;
+    if ($str =~ /(.*)\s+\"(.*)\"$/) {
+        $str = $1;
+        $name = $2;
+    }
+    my ($db, @rest) = split(/:/, $str);
+    my $acc = join(':', at rest);
+    $db =~ s/^\s+//;
+    if ($db eq 'http' && $acc =~ /^\/\//) {
+        # dbxref is actually a URI
+        $db = 'URL';
+        $acc =~ simple_escape($acc);
+        $acc =~ s/\s/\%20/g;
+        $acc = "http:$acc";
+    }
+    else {
+#        $db=escape($db);
+#        $acc=escape($acc);
+    }
+    #$db =~ s/\s+/_/g;  # HumanDO.obo has spaces in xref
+    #$acc =~ s/\s+/_/g;
+    $db = 'NULL' unless $db;
+    $acc = 'NULL' unless $acc;
+    [DBXREF,[[ACC,$acc],
+              [DBNAME,$db],
+              defined $name ? [NAME,$name] : ()
+             ]];
+}
+
+sub parse_term_expression {
+    my $self = shift;
+    my $expr = shift;
+    my ($te,$rest) = $self->parse_term_expression_with_rest($expr);
+    if ($rest) {
+        $self->parse_err("trailing: $rest");
+    }
+    return Data::Stag->nodify($te);
+}
+
+sub parse_term_expression_with_rest {
+    my $self = shift;
+    my $expr = shift;
+    if ($expr =~ /^\((.*)/) {
+        my $genus_expr = $1;
+        my ($genus,$diff_expr) = $self->parse_term_expression_with_rest($genus_expr);
+        my $next_c = substr($diff_expr,0,1,'');
+        if ($next_c eq ')') {
+            my ($diffs,$rest) = $self->parse_differentia_with_rest($diff_expr);
+            my $stag = [intersection=>[
+                                       [link=>[[to=>[$genus]]]],
+                                       @$diffs]];
+            return ($stag,$rest);
+            
+        }
+        else {
+            $self->parse_err("expected ) at end of genus. Got: $next_c followed by $diff_expr");
+        }
+    }
+    elsif ($expr =~ /^([\w\:]+)\^(.*)/) {
+        my $genus = $1;
+        my $diff_expr = $2;
+        my ($diffs,$rest) = $self->parse_differentia_with_rest($diff_expr);
+        my $stag = [intersection=>[
+                                   [link=>[[to=>$genus]]],
+                                   @$diffs]];
+        return ($stag,$rest);
+    }
+    elsif ($expr =~ /^([\w\:]+)(.*)/) {
+        return ($1,$2);
+    }
+    else {
+        $self->parse_err("could not parse: $expr");
+    }
+}
+
+sub parse_differentia {
+    my $self = shift;
+    my $expr = shift;
+    my ($diffs,$rest) = $self->parse_differentia_with_rest($expr);
+    if ($rest) {
+        $self->parse_err("trailing: $rest");
+    }
+    
+    Data::Stag->nodify($_) foreach @$diffs;
+    return $diffs;
+}
+
+sub parse_differentia_with_rest {
+    my $self = shift;
+    my $expr = shift;
+    if ($expr =~ /^(.+?)\((.*)/) {
+        my $rel = $1;
+        my $term_expr = $2;
+        my ($term,$rest) = $self->parse_term_expression_with_rest($term_expr);
+        my $diff = [link=>[[type=>$rel],
+                           [to=>(ref($term) ? [$term] : $term)]]];
+        if ($rest) {
+            my $next_c = substr($rest,0,1,'');
+            if ($next_c eq ')') {
+                $next_c = substr($rest,0,1);
+                if ($next_c eq '^' || $next_c eq ',') {
+                    my ($next_diffs,$next_rest) = $self->parse_differentia_with_rest(substr($rest,1));
+                    return ([$diff,@$next_diffs],$next_rest);
+                }
+                elsif ($next_c eq '') {
+                    return ([$diff],$rest);
+                }
+                elsif ($next_c eq ')') {
+                    return ([$diff],$rest);
+                }
+                else {
+                    $self->parse_err("expected ^ or ). Got: $next_c followed_by: $rest");
+                }
+            }
+            else {
+                $self->parse_err("exprected ). Got: $next_c followed by: $rest");
+            }
+        }
+        else {
+            $self->parse_err("expected ). Got: \"\"");
+        }
+    }
+    else {
+        $self->parse_err("expect relation(...). Got: $expr");
+    }
+}
+
+# lifted from CGI::Util
+
+our $EBCDIC = "\t" ne "\011";
+# (ord('^') == 95) for codepage 1047 as on os390, vmesa
+our @E2A = (
+   0,  1,  2,  3,156,  9,134,127,151,141,142, 11, 12, 13, 14, 15,
+  16, 17, 18, 19,157, 10,  8,135, 24, 25,146,143, 28, 29, 30, 31,
+ 128,129,130,131,132,133, 23, 27,136,137,138,139,140,  5,  6,  7,
+ 144,145, 22,147,148,149,150,  4,152,153,154,155, 20, 21,158, 26,
+  32,160,226,228,224,225,227,229,231,241,162, 46, 60, 40, 43,124,
+  38,233,234,235,232,237,238,239,236,223, 33, 36, 42, 41, 59, 94,
+  45, 47,194,196,192,193,195,197,199,209,166, 44, 37, 95, 62, 63,
+ 248,201,202,203,200,205,206,207,204, 96, 58, 35, 64, 39, 61, 34,
+ 216, 97, 98, 99,100,101,102,103,104,105,171,187,240,253,254,177,
+ 176,106,107,108,109,110,111,112,113,114,170,186,230,184,198,164,
+ 181,126,115,116,117,118,119,120,121,122,161,191,208, 91,222,174,
+ 172,163,165,183,169,167,182,188,189,190,221,168,175, 93,180,215,
+ 123, 65, 66, 67, 68, 69, 70, 71, 72, 73,173,244,246,242,243,245,
+ 125, 74, 75, 76, 77, 78, 79, 80, 81, 82,185,251,252,249,250,255,
+  92,247, 83, 84, 85, 86, 87, 88, 89, 90,178,212,214,210,211,213,
+  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,179,219,220,217,218,159
+	 );
+
+sub escape {
+  shift() if @_ > 1 and ( ref($_[0]) || (defined $_[1] && $_[0] eq $CGI::DefaultClass));
+  my $toencode = shift;
+  return undef unless defined($toencode);
+  # force bytes while preserving backward compatibility -- dankogai
+  $toencode = pack("C*", unpack("C*", $toencode));
+    if ($EBCDIC) {
+      $toencode=~s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",$E2A[ord($1)])/eg;
+    } else {
+      $toencode=~s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord($1))/eg;
+    }
+  return $toencode;
+}
+
+sub simple_escape {
+  return unless defined(my $toencode = shift);
+  $toencode =~ s{&}{&amp;}gso;
+  $toencode =~ s{<}{&lt;}gso;
+  $toencode =~ s{>}{&gt;}gso;
+  $toencode =~ s{\"}{&quot;}gso;
+# Doesn't work.  Can't work.  forget it.
+#  $toencode =~ s{\x8b}{&#139;}gso;
+#  $toencode =~ s{\x9b}{&#155;}gso;
+  $toencode;
+}
+
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_xml_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_xml_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/obo_xml_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,36 @@
+# $Id: obo_xml_parser.pm,v 1.3 2004/11/24 02:28:02 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::obo_xml_parser;
+
+=head1 NAME
+
+  GO::Parsers::obo_xml_parser.pm     - Parses xml made from events
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+this parser does a direct translation of XML to events, passed on to the handler
+
+the XML used should be the attribute-less xml generated by the
+GO::Handlers::XmlOutHandler class
+
+=head1 AUTHOR
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser Data::Stag::XMLParser);
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/owl_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/owl_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/owl_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,35 @@
+# $Id: owl_parser.pm,v 1.3 2005/04/19 04:35:50 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::owl_parser;
+
+=head1 NAME
+
+  GO::Parsers::owl_parser.pm     - turns OWL XML into event stream
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+this parser does a direct translation of XML to events, passed on to the handler
+
+=head1 AUTHOR
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser Data::Stag::XMLParser);
+
+sub xslt { 'owl_to_oboxml' }
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/references_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/references_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/references_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,36 @@
+# $Id: references_parser.pm,v 1.1 2006/12/06 02:59:07 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::references_parser;
+
+=head1 NAME
+
+  GO::Parsers::references_parser     - syntax parsing of GO.refences files
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+Parses this file:
+
+L<http://www.geneontology.org/doc/GO.references>
+
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::generic_tagval_parser);
+use strict qw(subs vars refs);
+
+sub _class { 'GOModel:References' }
+sub _id_column {'go_ref_id'}
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/refgenomes_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/refgenomes_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/refgenomes_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,132 @@
+# $Id: refgenomes_parser.pm,v 1.1 2007/01/24 01:16:20 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::refgenomes_parser;
+
+=head1 NAME
+
+  GO::Parsers::refgenomes_parser     - syntax parsing of GO .def flat files
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+
+=head1 GO DEFINITION FILES
+
+=head1 AUTHOR
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::base_parser);
+use GO::Parsers::ParserEventNames;  # declare XML constants
+
+use Carp;
+use FileHandle;
+use strict qw(subs vars refs);
+
+sub dtd {
+    'refgenomes-parser-events.dtd';
+}
+
+sub _class { 'generic' }
+sub _id_column {}
+sub _map_property_type { shift;@_ }
+
+our %DB_LOOKUP =
+  (dictybase=>'DDB',
+   flybase=>'FB',
+   wormbase=>'WB',
+   goa=>'UniProt',
+   chicken=>'UniProt',
+   zfin=>'ZFIN',
+   pombase=>'GeneDB_Spombe',
+   );
+
+sub parse_fh {
+    my ($self, $fh) = @_;
+    my $file = $self->file;
+
+    my $LAST_COL = 'completion target';
+    my @hdr = ();
+    $self->start_event('refgenomeset');
+
+    my $lnum = 0;
+    my $in_record=0;
+    my $class = $self->_class;
+    my $id_column = $self->_id_column;
+    while (my $line = <$fh>) {
+        chomp $line;
+	++$lnum;
+        next if $line =~ /^\!/;
+        $line =~ s/^\s+$//;
+        if (!$line) {
+	    $self->pop_stack_to_depth(1);
+            $in_record = 0;
+            next;
+        }
+        my @vals = split(/\t/,$line);
+        if (!@hdr) {
+            @hdr = @vals;
+            next;
+	}
+
+        $self->start_event('homologset');
+
+        my %valh = ();
+        for (my $i=0; $i<@hdr; $i++) {
+            my $col = $hdr[$i];
+            $col =~ s/\s/_/g;
+            $col =~ s/\W//g;
+            $valh{$col} = $vals[$i];
+        }
+        my $id = $valh{OMIM_ID};
+        $id =~ s/\W//g;
+        $self->event('@'=>[[id=>"MIM:$id"]]);
+        
+        my $in_genes = 0;
+        my $i=-1;
+        while ($i<@vals) {
+            $i++;
+            my $col = $hdr[$i];
+            my $val = $vals[$i];
+            if ($in_genes) {
+                my ($sp, @extra) = split(' ',$col);
+                if (!@extra) {
+                    # ignore anything with annoying chatty text
+                    next if $val =~ / /i;
+                    next unless $val;
+                    next if $val =~ /\"/;
+                    my $sp2 = $DB_LOOKUP{lc($sp)};
+                    $sp = $sp2 if ($sp2);
+                    my $fid = "$sp:$val";
+                    $self->event('member',[['@'=>[[ref=>$fid]]]]);
+                }
+            }
+            else {
+                if ($col eq $LAST_COL) {
+                    $in_genes = 1;
+                }
+                $col =~ s/\s/_/g;
+                $col =~ s/\W//g;
+                $self->event(tagval=>[['@'=>[[type=>$col]]],['.'=>$val]]) if $val;
+            }
+        }
+        $self->end_event('homologset');
+        
+    }
+    $self->pop_stack_to_depth(0);  # end event obo
+}
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/unknown_format_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/unknown_format_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/unknown_format_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,150 @@
+# $Id: unknown_format_parser.pm,v 1.9 2005/08/18 21:23:11 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::unknown_format_parser;
+
+=head1 NAME
+
+  GO::Parsers::unknown_format_parser     - base class for parsers
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+=head1 AUTHOR
+
+=cut
+
+use Carp;
+use FileHandle;
+use GO::Parser;
+use base qw(GO::Parsers::base_parser Exporter);
+use strict qw(subs vars refs);
+
+sub parse_file_by_type {
+    shift->parse_file(@_);
+}
+sub parse_file {
+    my ($self, $file, $dtype) = @_;
+    $self->file($file);
+    my $fmt;   # input file format
+    my $p;
+    
+    # determine format based on dtype
+    # (legacy code - dtypes should switch to standard formars)
+    if ($dtype) {
+
+	# convert legacy types
+	if ($dtype =~ /ontology$/) {
+	    $fmt = "go_ont";
+	}
+	elsif ($dtype =~ /defs$/) {
+	    $fmt = "go_def";
+	}
+	elsif ($dtype =~ /xrefs$/) {
+	    $fmt = "go_xref";
+	}
+	elsif ($dtype =~ /assocs$/) {
+	    $fmt = "go_assoc";
+	}
+	else {
+	    $fmt = $dtype;
+	}
+    }
+    if (!$p) {
+	# no default parser, or it has been overwritten
+	if (!$fmt) {
+	    # messy guessing of format from file extension
+	    if ($file =~ /\.go$/) {
+		$fmt = "go_ont";
+	    }
+	    if ($file =~ /\.ontology$/) {
+		$fmt = "go_ont";
+	    }
+	    if ($file =~ /defs$/) {
+		$fmt = "go_def";
+	    }
+	    if ($file =~ /2go$/) {
+		$fmt = "go_xref";
+	    }
+	    if ($file =~ /gene_association/) {
+		$fmt = "go_assoc";
+	    }
+	    if ($file =~ /\.obo$/ || $file =~ /\.obo[\.\-_]text$/) {
+		$fmt = "obo_text";
+	    }
+	    if ($file =~ /\.obo\W*xml$/) {
+		$fmt = "obo_xml";
+	    }
+	    if (!$fmt) {
+                # if suffix is a known parser module, use it
+                if ($file =~ /\.(\w+)$/) {
+                    my $suffix = $1;
+                    my $mod = "GO/Parsers/$suffix"."_parser.pm";
+                    eval {
+                        require "$mod";
+                    };
+                    if ($@) {
+                    }
+                    else {
+                        $fmt = $suffix;
+                    }
+                }
+            }
+	    if (!$fmt) {
+		#$self->throw("I have no idea how to parse: $file\n");
+                open(F,$file) || $self->throw("Cannot open $file");
+                my $first_line = <F>;
+                if ($first_line =~ /^format/) {
+                    $fmt = 'obo_text';
+                }
+                else {
+                    $fmt = 'go_ont';
+                }
+                close(F);
+	    }
+	}
+	$p = GO::Parser->get_parser_impl($fmt);
+    }
+    %$p = %$self;
+    $p->parse($file);
+    %$self = %$p;
+    $self->parser($p);
+    $self;
+}
+
+sub parser {
+    my $self = shift;
+    $self->{_parser} = shift if @_;
+    return $self->{_parser};
+}
+
+
+sub parse {
+    my $self = shift;
+    my $filename;
+    foreach $filename (@_) {
+        $self->parse_file($filename);
+    }
+    return;
+}
+
+
+# deprecated!
+sub parse_ontology {
+    my ($self, $file) = @_;
+    $self->parse_file($file, 'go_ont');
+}
+
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/xrf_abbs_parser.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/xrf_abbs_parser.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Parsers/xrf_abbs_parser.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,38 @@
+# $Id: xrf_abbs_parser.pm,v 1.2 2007/01/24 01:16:20 cmungall Exp $
+#
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Parsers::xrf_abbs_parser;
+
+=head1 NAME
+
+  GO::Parsers::xrf_abbs_parser     - syntax parsing of GO xrf_abbs flat files
+
+=head1 SYNOPSIS
+
+  do not use this class directly; use GO::Parser
+
+=cut
+
+=head1 DESCRIPTION
+
+Parses this file:
+
+L<http://www.geneontology.org/doc/GO.xrf_abbs>
+
+
+=cut
+
+use Exporter;
+use base qw(GO::Parsers::generic_tagval_parser);
+use strict qw(subs vars refs);
+
+sub _class { 'GOMetaModel:Database' }
+sub _id_column {'abbreviation'}
+sub _map_property_type { shift;return "GOMetaModel:".shift }
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Utils.pm
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Utils.pm	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/Utils.pm	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,424 @@
+# $Id: Utils.pm,v 1.2 2004/11/24 02:28:00 cmungall Exp $
+#
+# This GO module is maintained by Chris Mungall <cjm at fruitfly.org>
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+package GO::Utils;
+
+use Exporter;
+
+ at ISA = qw(Exporter);
+
+ at EXPORT_OK = qw(rearrange remove_duplicates merge_hashes get_method_ref
+	       get_param pset2hash dd spell_greek max check_obj_graph);
+
+use strict;
+use Carp;
+use Data::Dumper;
+
+=head2 rearrange()
+
+ Usage    : n/a
+ Function : Rearranges named parameters to requested order.
+ Returns  : @params - an array of parameters in the requested order.
+ Argument : $order : a reference to an array which describes the desired
+                     order of the named parameters.
+            @param : an array of parameters, either as a list (in
+                     which case the function simply returns the list),
+                     or as an associative array (in which case the
+                     function sorts the values according to @{$order}
+                     and returns that new array.
+
+ Exceptions : carps if a non-recognised parameter is sent
+
+=cut
+
+sub rearrange {
+  # This function was taken from CGI.pm, written by Dr. Lincoln
+  # Stein, and adapted for use in Bio::Seq by Richard Resnick.
+  # ...then Chris Mungall came along and adapted it for BDGP
+  my($order, at param) = @_;
+
+  # If there are no parameters, we simply wish to return
+  # an undef array which is the size of the @{$order} array.
+  return (undef) x $#{$order} unless @param;
+
+  # If we've got parameters, we need to check to see whether
+  # they are named or simply listed. If they are listed, we
+  # can just return them.
+  return @param unless (defined($param[0]) && $param[0]=~/^-/);
+
+  # Now we've got to do some work on the named parameters.
+  # The next few lines strip out the '-' characters which
+  # preceed the keys, and capitalizes them.
+  my $i;
+  for ($i=0;$i<@param;$i+=2) {
+      if (!defined($param[$i])) {
+	  carp("Hmmm in $i ".join(";", @param)." == ".join(";",@$order)."\n");
+      }
+      else {
+	  $param[$i]=~s/^\-//;
+	  $param[$i]=~tr/a-z/A-Z/;
+      }
+  }
+  
+  # Now we'll convert the @params variable into an associative array.
+  my(%param) = @param;
+
+  my(@return_array);
+  
+  # What we intend to do is loop through the @{$order} variable,
+  # and for each value, we use that as a key into our associative
+  # array, pushing the value at that key onto our return array.
+  my($key);
+
+  foreach $key (@{$order}) {
+      $key=~tr/a-z/A-Z/;
+      my($value) = $param{$key};
+      delete $param{$key};
+      push(@return_array,$value);
+  }
+  
+  # catch user misspellings resulting in unrecognized names
+  my(@restkeys) = keys %param;
+  if (scalar(@restkeys) > 0) {
+       carp("@restkeys not processed in rearrange(), did you use a
+       non-recognized parameter name ? ");
+  }
+  return @return_array;
+}
+
+
+
+
+=head2 get_param()
+
+Usage    : get_param('name',(-att1=>'ben',-name=>'the_name'))
+Function : Fetches a  named parameter.
+Returns  : The value of the requested parameter.
+Argument : $name : The name of the the parameter desired
+           @param : an array of parameters, as an associative array 
+Exceptions : carps if a non-recognised parameter is sent
+
+Based on rearrange(), which is originally from CGI.pm by Lincoln
+Stein and BioPerl by Richard Resnick.  See rearrange() for details.
+
+=cut
+
+sub get_param
+  {
+
+  # This function was taken from CGI.pm, written by Dr. Lincoln
+  # Stein, and adapted for use in Bio::Seq by Richard Resnick.
+  # ...then Chris Mungall came along and adapted it for BDGP
+    # ... and ben berman added his 2 cents.
+
+  my($name, at param) = @_;
+
+  # If there are no parameters, we simply wish to return
+  # false.
+  return '' unless @param;
+
+  # If we've got parameters, we need to check to see whether
+  # they are named or simply listed. If they are listed, we
+  # can't return anything.
+  return '' unless (defined($param[0]) && $param[0]=~/^-/);
+
+  # Now we've got to do some work on the named parameters.
+  # The next few lines strip out the '-' characters which
+  # preceed the keys, and capitalizes them.
+  my $i;
+  for ($i=0;$i<@param;$i+=2) {
+        $param[$i]=~s/^\-//;
+        $param[$i] = uc($param[$i]);
+  }
+  
+  # Now we'll convert the @params variable into an associative array.
+  my(%param) = @param;
+
+  # We capitalize the key, and use it as a key into our
+  # associative array
+  my $key = uc($name);
+  my $val = $param{$key};
+
+  return $val;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+=head2 remove_duplicates
+
+remove duplicate items from an array
+
+ usage: remove_duplicates(\@arr)
+
+affects the array passed in, and returns the modified array
+
+=cut
+
+sub remove_duplicates {
+    
+    my $arr_r = shift;
+    my @arr = @{$arr_r};
+    my %h = ();
+    my $el;
+    foreach $el (@arr) {
+	$h{$el} = 1;
+    }
+    my @new_arr = ();
+    foreach $el (keys %h) {
+	push (@new_arr, $el);
+    }
+    @{$arr_r} = @new_arr;
+    @new_arr;
+}
+
+=head1 merge_hashes
+
+joins two hashes together
+
+ usage: merge_hashes(\%h1, \%h2);
+
+%h1 will now contain the key/val pairs of %h2 as well. if there are
+key conflicts, %h2 values will take precedence.
+
+=cut
+
+sub merge_hashes {
+    my ($h1, $h2) = @_;
+    map {
+	$h1->{$_} = $h2->{$_};
+    } keys %{$h2};
+    return $h1;
+}
+
+=head1 get_method_ref
+
+ returns a pointer to a particular objects method
+ e.g.   my $length_f = get_method_ref($seq, 'length');
+        $len = &$length_f();
+
+=cut
+
+sub get_method_ref {
+    my $self = shift;
+    my $method = shift;
+    return sub {return $self->$method(@_)};
+}
+
+
+=head2 pset2hash
+
+  Usage   - my $h = pset2hash([{name=>"id", value=>"56"}, {name=>"name", value=>"jim"}]);
+  Returns - hashref
+  Args    - arrayref of name/value keyed hashrefs
+
+=cut
+
+sub pset2hash {
+    my $pset = shift;
+    my $h = {};
+    # printf STDERR "REF=%s;\n", ref($pset);
+    if (ref($pset) eq "ARRAY") {
+	map {$h->{$_->{name}} = $_->{value}} @$pset;
+    }
+    elsif (ref($pset) eq "HASH") {
+	$h = $pset;
+    }
+    else {
+        $h = $pset;
+    }
+    return $h;
+}
+
+sub dd {
+    my $obj = shift;
+    my $d= Data::Dumper->new(['obj',$obj]);
+    print $d->Dump;
+}
+  
+=head2 spell_greek
+
+takes a word as a parameter and spells out any greek symbols encoded
+within (eg s/&agr;/alpha/g)
+
+=cut
+
+sub spell_greek
+{
+    my $name = shift;
+
+    $name =~ s/&agr\;/alpha/g;
+    $name =~ s/&Agr\;/Alpha/g;
+    $name =~ s/&bgr\;/beta/g;
+    $name =~ s/&Bgr\;/Beta/g;
+    $name =~ s/&ggr\;/gamma/g;
+    $name =~ s/&Ggr\;/Gamma/g;
+    $name =~ s/&dgr\;/delta/g;
+    $name =~ s/&Dgr\;/Delta/g;
+    $name =~ s/&egr\;/epsilon/g;
+    $name =~ s/&Egr\;/Epsilon/g;
+    $name =~ s/&zgr\;/zeta/g;
+    $name =~ s/&Zgr\;/Zeta/g;
+    $name =~ s/&eegr\;/eta/g;
+    $name =~ s/&EEgr\;/Eta/g;
+    $name =~ s/&thgr\;/theta/g;
+    $name =~ s/&THgr\;/Theta/g;
+    $name =~ s/&igr\;/iota/g;
+    $name =~ s/&Igr\;/Iota/g;
+    $name =~ s/&kgr\;/kappa/g;
+    $name =~ s/&Kgr\;/Kappa/g;
+    $name =~ s/&lgr\;/lambda/g;
+    $name =~ s/&Lgr\;/Lambda/g;
+    $name =~ s/&mgr\;/mu/g;
+    $name =~ s/&Mgr\;/Mu/g;
+    $name =~ s/&ngr\;/nu/g;
+    $name =~ s/&Ngr\;/Nu/g;
+    $name =~ s/&xgr\;/xi/g;
+    $name =~ s/&Xgr\;/Xi/g;
+    $name =~ s/&ogr\;/omicron/g;
+    $name =~ s/&Ogr\;/Omicron/g;
+    $name =~ s/&pgr\;/pi/g;
+    $name =~ s/&Pgr\;/Pi/g;
+    $name =~ s/&rgr\;/rho/g;
+    $name =~ s/&Rgr\;/Rho/g;
+    $name =~ s/&sgr\;/sigma/g;
+    $name =~ s/&Sgr\;/Sigma/g;
+    $name =~ s/&tgr\;/tau/g;
+    $name =~ s/&Tgr\;/Tau/g;
+    $name =~ s/&ugr\;/upsilon/g;
+    $name =~ s/&Ugr\;/Upsilon/g;
+    $name =~ s/&phgr\;/phi/g;
+    $name =~ s/&PHgr\;/Phi/g;
+    $name =~ s/&khgr\;/chi/g;
+    $name =~ s/&KHgr\;/Chi/g;
+    $name =~ s/&psgr\;/psi/g;
+    $name =~ s/&PSgr\;/Psi/g;
+    $name =~ s/&ohgr\;/omega/g;
+    $name =~ s/&OHgr\;/Omega/g;
+    $name =~ s/<up>/\[/g;
+    $name =~ s/<\/up>/\]/g;
+    $name =~ s/<down>/\[\[/g;
+    $name =~ s/<\/down>/\]\]/g;
+
+    return $name;
+}
+
+
+=head2 check_obj_graph
+
+  Usage   -
+  Returns - true if cycle detected
+  Args    - any object
+
+=cut
+
+sub check_obj_graph {
+    my $object = shift;
+    
+    my $h = {};
+    my $cnt = 1;
+    my @nodes = ({obj=>$object,path=>[]});
+    my @path = ();
+    my $cycle = 0;
+    while (!$cycle && @nodes) {
+	my $node = shift @nodes;
+	my $obj = $node->{obj};
+	my $id = sprintf("%s", $node->{obj});
+	if (ref($obj) && $id !~ /GLOB/) {
+	    
+	    if (!$h->{$id}) {
+		$h->{$id} = $cnt;
+		$cnt++;
+	    }
+	    
+	    # check for cycles
+	    if (grep {my $idelt = sprintf("%s", $_); $idelt eq $id}
+		@{$node->{path}}) {
+		$cycle = $node;
+	    }
+
+	    printf 
+	      "* OB:%5s %20s [%s]\n",
+	      $h->{$id},
+	      $obj,
+	      join(", ", map {$h->{$_}} @{$node->{path}});
+
+	    my @newobjs = ();
+	    if (ref($obj) eq "ARRAY") {
+		@newobjs = @$obj;
+	    }
+##	    if (ref($obj) eq "HASH") {
+	    elsif (ref($obj) eq "GLOB") {
+	    }
+	    else {
+		@newobjs = values %$obj;
+	    }
+	    map {
+		my @newpath = (@{$node->{path}}, $obj);
+		my $newnode = {obj=>$_, path=>\@newpath};
+		push(@nodes, $newnode);
+	    } @newobjs;
+	}
+    }
+    return $cycle;
+
+}
+
+
+
+sub max
+  {
+    my @items = @_;
+
+    my $max;
+    my $item;
+    foreach $item (@items)
+      {
+        if (!defined($max))
+          {
+            $max = $item;
+          }
+        else
+          {
+            $max = $item if ($item > $max);
+          }
+      }
+
+    return $max;
+  }
+
+
+
+1;

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/chadoxml_to_oboxml.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/chadoxml_to_oboxml.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/chadoxml_to_oboxml.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,447 @@
+DEPRECATED< NOT COMPLETE
+
+<?xml version = "1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- chadoxml xml can be loaded into a chado db using XML::XORT -->
+
+<!-- does not build transitive closure -->
+
+  <xsl:output indent="yes" method="xml"/>
+
+  <xsl:key name="terms" match="term" use="id"/>
+
+  <xsl:template match="/">
+    <chado>
+
+      <!-- set macros; ensure the basic stuff is there -->
+      <cv op="force" id="relationship">
+        <name>relationship</name>
+      </cv>
+      <cv op="force" id="synonym_type">
+        <name>synonym_type</name>
+      </cv>
+      <cv op="force" id="cvterm_property_type">
+        <name>cvterm_property_type</name>
+      </cv>
+
+      <!-- contact_id should really be nullable -->
+      <contact op="force" id="no_contact">
+        <name>no contact</name>
+      </contact>
+      <db op="force" id="obo_rel">
+        <name>OBO_REL</name>
+        <contact_id>no_contact</contact_id>
+      </db>
+      <db op="force" id="internal">
+        <name>internal</name>
+        <contact_id>no_contact</contact_id>
+      </db>
+      <cvterm op="force" id="comment_type">
+        <dbxref_id>
+          <dbxref>
+            <db_id>internal</db_id>
+            <accession>cvterm_property_type</accession>
+          </dbxref>
+        </dbxref_id>
+        <cv_id>cvterm_property_type</cv_id>
+        <name>comment</name>
+      </cvterm>
+
+      <cvterm op="force" id="is_a">
+        <dbxref_id>
+          <dbxref>
+            <db_id>obo_rel</db_id>
+            <accession>is_a</accession>
+          </dbxref>
+        </dbxref_id>
+        <cv_id>relationship</cv_id>
+        <name>is_a</name>
+        <is_relationship_type>1</is_relationship_type>
+      </cvterm>
+
+      <!-- required for owl compatibility, and compatibility
+           with advanced features of obo 1.2 format -->
+      <cvterm op="force" id="intersection_of">
+        <dbxref_id>
+          <dbxref>
+            <db_id>internal</db_id>
+            <accession>intersection_of</accession>
+          </dbxref>
+        </dbxref_id>
+        <cv_id>cvterm_property_type</cv_id>
+        <name>intersection_of</name>
+        <is_relationship_type>1</is_relationship_type>
+      </cvterm>
+
+      <!-- terms can appear in different obo file types -->
+      <xsl:apply-templates select="*/typedef"/>
+      <xsl:apply-templates select="*/term"/>
+      <xsl:apply-templates select="*/term/is_a"/>
+      <xsl:apply-templates select="*/term/relationship"/>
+      <xsl:apply-templates select="*/typedef/is_a"/>
+
+    </chado>
+  </xsl:template>
+
+  <xsl:template match="term">
+    <cvterm>
+      <dbxref_id>
+        <xsl:apply-templates select="id" mode="dbxref"/>
+      </dbxref_id>
+      <name>
+        <xsl:value-of select="name"/>
+      </name>
+      <cv_id>
+        <cv>
+          <name>
+            <xsl:value-of select="namespace"/>
+          </name>
+        </cv>
+      </cv_id>
+      <xsl:if test="is_obsolete">
+        <is_obsolete>1</is_obsolete>
+      </xsl:if>
+      <xsl:apply-templates select="def"/>
+      <xsl:apply-templates select="comment"/>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog"/>
+    </cvterm>
+  </xsl:template>
+
+  <xsl:template match="typedef">
+    <cvterm>
+      <dbxref_id>
+        <dbxref>
+          <db_id>obo_rel</db_id>
+          <accession>
+            <xsl:value-of select="id"/>
+          </accession>
+        </dbxref>
+      </dbxref_id>
+      <name>
+        <xsl:value-of select="name"/>
+      </name>
+      <xsl:choose>
+        <xsl:when test="namespace">
+          <cv_id>
+            <cv>
+              <name>
+                <xsl:value-of select="namespace"/>
+              </name>
+            </cv>
+          </cv_id>
+        </xsl:when>
+        <xsl:otherwise>
+          <cv_id>relationship</cv_id>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:if test="is_obsolete">
+        <is_obsolete>1</is_obsolete>
+      </xsl:if>
+      <is_relationship_type>1</is_relationship_type>
+      <xsl:if test="def">
+        <definition>
+          <xsl:value-of select="defstr"/>
+        </definition>
+      </xsl:if>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog"/>
+    </cvterm>
+  </xsl:template>
+
+  <xsl:template match="*" mode="dbxref">
+    <dbxref>
+      <db_id>
+        <db>
+          <contact_id>no_contact</contact_id>
+          <name>
+            <xsl:value-of select="substring-before(.,':')"/>    
+          </name>
+        </db>
+      </db_id>
+      <accession>
+        <xsl:value-of select="substring-after(.,':')"/>    
+      </accession>
+    </dbxref>
+  </xsl:template>
+
+  <xsl:template match="is_a">
+    <cvterm_relationship>
+      <type_id>is_a</type_id>
+      <subject_id>
+        <cvterm op="lookup">
+          <dbxref_id>
+            <xsl:apply-templates select="../id" mode="dbxref"/>
+          </dbxref_id>
+        </cvterm>
+      </subject_id>
+      <object_id>
+        <cvterm op="lookup">
+          <dbxref_id>
+            <xsl:apply-templates select="." mode="dbxref"/>
+          </dbxref_id>
+        </cvterm>
+      </object_id>
+    </cvterm_relationship>
+  </xsl:template>
+
+  <xsl:template match="type">
+    <cvterm op="lookup">
+      <cv_id>relationship</cv_id>
+      <name>
+        <xsl:value-of select="."/>
+      </name>
+      <is_relationship_type>1</is_relationship_type>
+      <!-- dbxref is the same as the name for relationships -->
+      <dbxref_id>
+        <dbxref>
+          <db_id>obo_rel</db_id>
+          <accession>
+            <xsl:value-of select="type"/>
+          </accession>
+        </dbxref>
+      </dbxref_id>
+    </cvterm>
+  </xsl:template>
+
+  <xsl:template match="relationship">
+    <cvterm_relationship>
+      <type_id>
+        <xsl:apply-templates select="type"/>
+      </type_id>
+      <subject_id>
+        <cvterm op="lookup">
+          <dbxref_id>
+            <xsl:apply-templates select="../id" mode="dbxref"/>
+          </dbxref_id>
+        </cvterm>
+      </subject_id>
+      <object_id>
+        <cvterm op="lookup">
+          <dbxref_id>
+            <xsl:apply-templates select="to" mode="dbxref"/>
+          </dbxref_id>
+        </cvterm>
+      </object_id>
+    </cvterm_relationship>
+  </xsl:template>
+
+  <!-- see obo1.2 docs for more info on this tag -->
+  <!-- intersection_ofs (aka logical definitions) are
+       recorded in the DAG as a collection of intersection_of
+       relationships between the defined term and either
+       (a) another term (the genus, or generic term)
+       (b) an anonymous term, itself linked to another term by a
+           relationship of some type (a differentium)
+       -->
+  <xsl:template match="intersection_of">
+    <cvterm_relationship>
+      <type_id>intersection_of</type_id>
+      <subject_id>
+        <cvterm op="lookup">
+          <dbxref_id>
+            <xsl:apply-templates select="../id" mode="dbxref"/>
+          </dbxref_id>
+        </cvterm>
+      </subject_id>
+      <object_id>
+        <xsl:choose>
+          <xsl:when test="type">
+            <!-- anonymous term -->
+            <cvterm>
+              <dbxref_id>
+                <xsl:call-template name="make-anon-term">
+                  <xsl:with-param name="anon_id" select="concat(../id)"/>
+                </xsl:call-template>
+              </dbxref_id>
+              <cvterm_relationship>
+                <type_id>
+                  <xsl:apply-templates select="type"/>
+                </type_id>
+                <object_id>
+                  <cvterm op="lookup">
+                    <dbxref_id>
+                      <xsl:apply-templates select="to" mode="dbxref"/>
+                    </dbxref_id>
+                  </cvterm>
+                </object_id>
+              </cvterm_relationship>
+            </cvterm>
+          </xsl:when>
+          <xsl:otherwise>
+            <cvterm op="lookup">
+              <dbxref_id>
+                <xsl:apply-templates select="to" mode="dbxref"/>
+              </dbxref_id>
+            </cvterm>
+          </xsl:otherwise>
+        </xsl:choose>
+      </object_id>
+    </cvterm_relationship>
+  </xsl:template>
+
+  <xsl:template match="synonym">
+    <cvtermsynonym>
+      <synonym>
+        <xsl:value-of select="synonym_text"/>
+      </synonym>
+      <xsl:if test="type">
+        <type_id>
+          <cvterm>
+            <dbxref_id>
+              <dbxref>
+                <db_id>internal</db_id>
+                <accession>
+                  <xsl:value-of select="type"/>
+                </accession>
+              </dbxref>
+            </dbxref_id>
+            <cv_id>synonym_type</cv_id>
+            <name>
+              <xsl:value-of select="type"/>
+            </name>
+          </cvterm>
+        </type_id>
+      </xsl:if>
+    </cvtermsynonym>
+  </xsl:template>
+    
+  <xsl:template match="comment">
+    <cvtermprop>
+      <type_id>comment_type</type_id>
+      <value>
+        <xsl:value-of select="."/>
+      </value>
+      <rank>0</rank>
+    </cvtermprop>
+  </xsl:template>
+    
+  <xsl:template match="xref_analog">
+    <cvterm_dbxref>
+      <dbxref_id>
+        <dbxref>
+          <db_id>
+            <db>
+              <contact_id>no_contact</contact_id>
+              <name>
+                <xsl:value-of select="dbname"/>
+              </name>
+            </db>
+          </db_id>
+          <accession>
+            <xsl:value-of select="acc"/>
+          </accession>
+        </dbxref>
+      </dbxref_id>
+    </cvterm_dbxref>
+  </xsl:template>
+    
+  <xsl:template match="dbxref" mode="is_for_definition">
+    <cvterm_dbxref>
+      <dbxref_id>
+        <dbxref>
+          <db_id>
+            <db>
+              <contact_id>no_contact</contact_id>
+              <name>
+                <xsl:value-of select="dbname"/>
+              </name>
+            </db>
+          </db_id>
+          <accession>
+            <xsl:value-of select="acc"/>
+          </accession>
+        </dbxref>
+      </dbxref_id>
+      <is_for_definition>1</is_for_definition>
+    </cvterm_dbxref>
+  </xsl:template>
+    
+  <xsl:template match="alt_id">
+    <cvterm_dbxref>
+      <dbxref_id>
+        <xsl:apply-templates select="." mode="dbxref"/>
+      </dbxref_id>
+    </cvterm_dbxref>
+  </xsl:template>
+  
+  <xsl:template match="def">
+    <definition>
+      <xsl:value-of select="defstr"/>
+    </definition>
+    <xsl:apply-templates select="dbxref" mode="is_for_definition"/>
+  </xsl:template>
+
+  <xsl:template match="prod">
+    <feature>
+      <dbxref>
+        <db>
+          <contact_id>no_contact</contact_id>
+          <name>
+            <xsl:value-of select="../proddb"/>
+          </name>
+        </db>
+        <accession>
+          <xsl:value-of select="prodacc"/>
+        </accession>
+      </dbxref>
+      <name>
+        <xsl:value-of select="prodsymbol"/>
+      </name>
+      <uniquename>
+        <xsl:value-of select="prodsymbol"/>
+      </uniquename>
+      <type>
+        <cvterm>
+          <name>
+            <xsl:value-of select="prodtype"/>
+          </name>
+          <cv>
+            <name>
+              sequence
+            </name>
+          </cv>
+        </cvterm>
+      </type>
+      <organism>
+        <dbxref>
+          <db>
+            <contact_id>no_contact</contact_id>
+            <name>
+              ncbi_taxononmy
+            </name>
+          </db>
+          <accession>
+            <xsl:value-of select="prodtaxa"/>
+          </accession>
+        </dbxref>
+      </organism>
+      <xsl:apply-templates select="assoc"/>
+    </feature>
+  </xsl:template>
+
+  <xsl:template match="assoc">
+    <feature_cvterm>
+      <cvterm>
+        <xsl:apply-templates select="termacc" mode="dbxref"/>
+      </cvterm>
+      <xsl:apply-templates select="evidence"/>
+    </feature_cvterm>
+  </xsl:template>
+
+  <xsl:template match="evidence">
+    <feature_cvtermprop>
+    </feature_cvtermprop>
+  </xsl:template>
+
+  <xsl:template match="text()|@*">
+  </xsl:template>
+
+
+</xsl:stylesheet>
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/ipr_to_oboxml.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/ipr_to_oboxml.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/ipr_to_oboxml.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:strip-space elements="*"/>
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:template match="/">
+    <obo>
+      <xsl:apply-templates select="//interpro"/>
+    </obo>
+  </xsl:template>
+  <xsl:template match="interpro">
+    <term>
+      <id>
+        <xsl:text>InterPro:</xsl:text><xsl:value-of select="@id"/>
+      </id>
+      <name>
+        <xsl:value-of select="name"/>
+      </name>
+      <!-- abstract is mixed attribute xml; need to convert. how?
+           -->
+       <xsl:apply-templates select="parent_list"/>
+      <xsl:apply-templates select="member_list"/>
+      <xsl:apply-templates select="structure_db_links"/>
+      <xsl:apply-templates select="taxonomy_distribution"/>
+    </term>
+  </xsl:template>
+
+  <xsl:template match="parent_list">
+    <xsl:for-each select="rel_ref">
+      <is_a>
+        <xsl:text>InterPro:</xsl:text><xsl:value-of select="@ipr_ref"/>
+      </is_a>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="member_list|structure_db_links">
+    <xsl:for-each select="db_xref">
+      <xref_analog>
+        <acc>
+          <xsl:value-of select="@dbkey"/>
+        </acc>
+        <dbname>
+          <xsl:value-of select="@db"/>
+        </dbname>
+      </xref_analog>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="taxonomy_distribution">
+    <xsl:for-each select="taxon_data">
+      <restriction>
+        <type>
+          <xsl:text>ipr:can_occur_in</xsl:text>
+        </type>
+        <to>
+          <xsl:text>taxon_name:</xsl:text><xsl:value-of select="@name"/>
+        </to>
+      </restriction>
+    </xsl:for-each>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_filter.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_filter.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_filter.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- AUTHOR: Chris Mungall :: cjm at fruitfly dot org  -->
+
+<!-- to filter out anonymous terms, use arg filter_anonymous=1 -->
+<!-- usage: -->
+<!--     xsltproc xsl/oboxml_filter.xsl -param filter_anonymous 1 -stringparam namespace cellular_component my.obo.xml -->
+
+     <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+  <xsl:strip-space elements="*"/>
+  <xsl:param name="namespace"/>
+  <xsl:param name="filter_anonymous"/>
+  <xsl:param name="filter_named"/>
+  <xsl:output indent="yes" method="xml"/>
+
+  <xsl:template match="term">
+    <xsl:choose>
+      <xsl:when test="$filter_anonymous and (($filter_anonymous != 0 and is_anonymous != 0) or ($filter_named = 0 and is_anonymous != 1))">
+        <!-- do nothing -->
+      </xsl:when>
+      <xsl:when test="$namespace and namespace != $namespace">
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy>
+          <xsl:apply-templates select="@* | node()" />
+        </xsl:copy>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- match everything else -->
+  <xsl:template match="/ | @* | node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@* | node()" />
+    </xsl:copy>
+  </xsl:template>
+
+
+</xsl:stylesheet>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_chadoxml.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_chadoxml.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_chadoxml.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,636 @@
+<?xml version = "1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- this transforms oboxml into chadoxml -->
+  <!-- chadoxml can be loaded into a chado db using XML::XORT -->
+  <!-- does NOT build transitive closure 'cvtermpath' -->
+  <!-- use the Pg function fill_cvtermpath for this  -->
+
+  <xsl:output indent="yes" method="xml"/>
+
+  <xsl:param name="default_idspace"/>
+
+  <xsl:key name="k_entity" match="term|typedef|instance" use="id"/>
+  <xsl:key name="k_typeref" match="//type" use="."/>
+  <xsl:key name="k_namespace" match="//namespace" use="."/>
+  <xsl:variable name="unique_typeref" select="//type[not(.=preceding::type) and not(key('k_entity',.))]"/>
+  <xsl:variable name="unique_namespace" select="//namespace[not(.=preceding::namespace)]"/>
+
+  <xsl:template match="/">
+    <chado>
+
+      <xsl:comment>
+        <xsl:text>XORT macros - we can refer to these later</xsl:text>
+      </xsl:comment>
+      <!-- set macros; ensure the basic stuff is there -->
+      <cv op="force" id="relationship">
+        <name>relationship</name>
+      </cv>
+      <cv op="force" id="synonym_type">
+        <name>synonym_type</name>
+      </cv>
+      <cv op="force" id="cvterm_property_type">
+        <name>cvterm_property_type</name>
+      </cv>
+      <cv op="force" id="anonymous_cv">
+        <name>anonymous</name>
+      </cv>
+
+      <db op="force" id="OBO_REL">
+        <name>OBO_REL</name>
+      </db>
+
+      <db op="force" id="_default_idspace">
+        <name>
+          <xsl:choose>
+            <xsl:when test="$default_idspace">
+              <xsl:value-of select="$default_idspace"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>_global</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </name>
+      </db>
+
+      <db op="force" id="internal">
+        <name>internal</name>
+      </db>
+
+      <cvterm op="force" id="comment_type">
+        <dbxref_id>
+          <dbxref>
+            <db_id>internal</db_id>
+            <accession>cvterm_property_type</accession>
+          </dbxref>
+        </dbxref_id>
+        <cv_id>cvterm_property_type</cv_id>
+        <name>comment</name>
+      </cvterm>
+
+      <cvterm op="force" id="is_anonymous">
+        <dbxref_id>
+          <dbxref>
+            <db_id>internal</db_id>
+            <accession>is_anonymous</accession>
+          </dbxref>
+        </dbxref_id>
+        <cv_id>cvterm_property_type</cv_id>
+        <name>is_anonymous</name>
+      </cvterm>
+
+      <cvterm op="force" id="builtin__is_a">
+        <dbxref_id>
+          <dbxref>
+            <db_id>OBO_REL</db_id>
+            <accession>is_a</accession>
+          </dbxref>
+        </dbxref_id>
+        <cv_id>relationship</cv_id>
+        <name>is_a</name>
+        <is_relationshiptype>1</is_relationshiptype>
+      </cvterm>
+
+      <!-- required for owl compatibility, and compatibility
+           with advanced features of obo 1.2 format -->
+      <cvterm op="force" id="intersection_of">
+        <dbxref_id>
+          <dbxref>
+            <db_id>internal</db_id>
+            <accession>intersection_of</accession>
+          </dbxref>
+        </dbxref_id>
+        <cv_id>cvterm_property_type</cv_id>
+        <name>intersection_of</name>
+        <is_relationshiptype>1</is_relationshiptype>
+      </cvterm>
+
+      <xsl:comment>
+        external cvterms that are referred to in this document
+      </xsl:comment>
+
+      <xsl:for-each select="$unique_typeref">
+        <xsl:apply-templates select="." mode="dbxref"/>
+        <cvterm id="{.}">
+          <dbxref_id>
+            <xsl:text>dbxref__</xsl:text>
+            <xsl:value-of select="."/>
+          </dbxref_id>
+        </cvterm>
+      </xsl:for-each>
+
+      <xsl:comment>
+        cv/namespaces
+      </xsl:comment>
+
+      <xsl:for-each select="$unique_namespace">
+        <cv id="cv__{.}">
+          <name>
+            <xsl:value-of select="."/>
+          </name>
+        </cv>
+      </xsl:for-each>
+
+      <!-- terms can appear in different obo file types -->
+      <xsl:comment>relationship types</xsl:comment>
+      <xsl:apply-templates select="*/typedef"/>
+
+      <xsl:comment>terms</xsl:comment>
+      <xsl:apply-templates select="*/term"/>
+
+      <xsl:comment>instances</xsl:comment>
+      <xsl:apply-templates select="*/instance"/>
+
+      <xsl:comment>is_a relationship types</xsl:comment>
+      <xsl:apply-templates select="*/term/is_a"/>
+
+      <xsl:comment>other relationship types</xsl:comment>
+      <xsl:apply-templates select="*/term/relationship"/>
+
+      <xsl:comment>
+        intersection_of; logical definition DAG links.
+        you should only expect to find cvterm_relationships
+        under here for advanced obo1.2 and owl sourced ontologies
+      </xsl:comment>
+      <xsl:apply-templates select="*/term/intersection_of"/>
+
+      <xsl:comment>is_a relationship types between typedefs</xsl:comment>
+      <xsl:apply-templates select="*/typedef/is_a"/>
+
+      <xsl:comment>cvterm metadata</xsl:comment>
+      <xsl:apply-templates select="*/term/property_value"/>
+
+      <xsl:comment>instance-level relations</xsl:comment>
+      <xsl:apply-templates select="*/instance/property_value"/>
+
+
+
+    </chado>
+  </xsl:template>
+
+  <xsl:template match="term">
+    <cvterm id="{id}">
+      <dbxref_id>
+        <xsl:apply-templates select="id" mode="dbxref"/>
+      </dbxref_id>
+
+      <!-- we must munge the name for obsoletes -->
+      <xsl:choose>
+        <xsl:when test="is_obsolete">
+          <is_obsolete>1</is_obsolete>
+          <name>
+            <xsl:value-of select="name"/>
+            <xsl:text> (obsolete </xsl:text>
+            <xsl:value-of select="id"/>
+            <xsl:text>)</xsl:text>
+          </name>
+        </xsl:when>
+        <xsl:otherwise>
+          <name>
+            <xsl:value-of select="name"/>
+          </name>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:apply-templates select="namespace"/>
+
+      <xsl:apply-templates select="def"/>
+      <xsl:apply-templates select="comment"/>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog"/>
+    </cvterm>
+  </xsl:template>
+
+  <!-- in oboxml, a typedef element is used for relations and
+       slots. these map to cvterms in chado -->
+  <xsl:template match="typedef">
+    <cvterm op="force" id="{id}">
+      <dbxref_id>
+        <xsl:apply-templates select="id" mode="dbxref"/>
+      </dbxref_id>
+      <name>
+        <!-- note: earlier versions of ontologies had ad-hoc names -->
+        <!-- we want to use the ID of the name here -->
+        <xsl:choose>
+          <xsl:when test="contains(id,':')">
+            <!-- we have a 'real' ID, which means the name is real -->
+            <xsl:value-of select="name"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <!-- old ontology: ID is actually the name -->
+            <xsl:value-of select="id"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </name>
+
+      <xsl:apply-templates select="namespace"/>
+      
+      <xsl:if test="is_obsolete">
+        <is_obsolete>1</is_obsolete>
+      </xsl:if>
+      <xsl:apply-templates select="is_symmetric|is_cyclic|is_anti_symmetric|is_reflexive|is_transitive"/>
+
+      <is_relationshiptype>1</is_relationshiptype>
+      <xsl:if test="def">
+        <definition>
+          <xsl:value-of select="defstr"/>
+        </definition>
+      </xsl:if>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog"/>
+    </cvterm>
+  </xsl:template>
+
+  <xsl:template match="instance">
+    <cvterm id="{id}">
+      <dbxref_id>
+        <xsl:apply-templates select="id" mode="dbxref"/>
+      </dbxref_id>
+
+      <is_instance>1</is_instance>
+      <!-- we must munge the name for obsoletes -->
+      <xsl:if test="name">
+        <name>
+          <xsl:value-of select="name"/>
+        </name>
+      </xsl:if>
+      
+      <xsl:apply-templates select="namespace"/>
+    </cvterm>
+  </xsl:template>
+
+  <xsl:template match="is_symmetric|is_cyclic|is_anti_symmetric|is_reflexive|is_transitive">
+    <cvtermprop>
+      <type_id>
+        <cvterm op="force">
+          <dbxref_id>
+            <dbxref>
+              <db_id>internal</db_id>
+              <accession><xsl:value-of select="name(.)"/></accession>
+            </dbxref>
+          </dbxref_id>
+          <cv_id>cvterm_property_type</cv_id>
+          <name><xsl:value-of select="name(.)"/></name>
+        </cvterm>
+      </type_id>
+      <value>1</value>
+    </cvtermprop>
+  </xsl:template>
+
+  <!-- reference to a cvterm
+       assumed to be inside a -->
+  <xsl:template match="*" mode="cvterm_id">
+    <xsl:if test="not(.)">
+      <xsl:message terminate="yes">
+        <xsl:copy select="."/>
+        <xsl:text>No ID</xsl:text>
+      </xsl:message>
+    </xsl:if>
+    <xsl:choose>
+      <!-- is there a term or typedef by this ID in this file? -->
+      <xsl:when test="key('k_entity',.)">
+        <xsl:value-of select="."/>
+      </xsl:when>
+      
+      <!-- have we already referenced it? -->
+      <xsl:when test="key('k_typeref',.)">
+        <xsl:value-of select="."/>
+      </xsl:when>
+      
+      <!-- not present in this document -->
+      <xsl:otherwise>
+        <cvterm>
+          <xsl:apply-templates select="." mode="dbxref"/>
+        </cvterm>
+      </xsl:otherwise>
+
+    </xsl:choose>
+
+  </xsl:template>
+
+  <xsl:template match="*" mode="dbxref">
+    <dbxref id="dbxref__{.}">
+      <xsl:choose>
+        <xsl:when test="contains(.,':')">
+          <db_id>
+            <db>
+              <name>
+                <xsl:value-of select="substring-before(.,':')"/>    
+              </name>
+            </db>
+          </db_id>
+          <accession>
+            <xsl:value-of select="substring-after(.,':')"/>    
+          </accession>
+        </xsl:when>
+
+        <!-- OBO Format has no concept of a default ID space.
+             IDs that are not prefixed with a dbspace go into
+             the DB 'global'.
+             In previous versions of obo2chado we made exceptions
+             for OBO_REL, since most relation stanzas (Typedefs)
+             in obo files implicitly refer to OBO_REL. However
+             this caused problems. Equivalence to OBO_REL must
+             now be stated, otherwise an unprefixed part_of
+             will be treated as _global:part_of
+             -->
+        <xsl:otherwise>
+          <db_id>_default_idspace</db_id>
+          <accession>
+            <xsl:value-of select="."/>
+          </accession>
+        </xsl:otherwise>
+      </xsl:choose>
+    </dbxref>
+  </xsl:template>
+
+  <!-- TODO: implied links -->
+  <xsl:template match="is_a">
+    <cvterm_relationship>
+      <type_id>builtin__is_a</type_id>
+      <subject_id>
+        <xsl:apply-templates select="../id" mode="cvterm_id"/>
+      </subject_id>
+      <object_id>
+        <xsl:apply-templates select="." mode="cvterm_id"/>
+      </object_id>
+    </cvterm_relationship>
+  </xsl:template>
+
+  <xsl:template match="relationship">
+    <cvterm_relationship>
+      <type_id>
+        <xsl:apply-templates select="type" mode="cvterm_id"/>
+      </type_id>
+      <subject_id>
+        <xsl:apply-templates select="../id" mode="cvterm_id"/>
+      </subject_id>
+      <object_id>
+        <xsl:apply-templates select="to" mode="cvterm_id"/>
+      </object_id>
+    </cvterm_relationship>
+  </xsl:template>
+
+  <!-- for instances: slot-values and relationships between instances -->
+  <xsl:template match="property_value">
+    <xsl:choose>
+      <xsl:when test="datatype">
+        <!-- slots -->
+        <cvtermprop>
+          <cvterm_id>
+            <xsl:apply-templates select="../id" mode="cvterm_id"/>
+          </cvterm_id>
+          <type_id>
+            <xsl:apply-templates select="type" mode="cvterm_id"/>
+          </type_id>
+          <value>
+            <xsl:value-of select="to"/>
+          </value>
+        </cvtermprop>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- instance to instance links -->
+        <cvterm_relationship>
+          <type_id>
+            <xsl:apply-templates select="type" mode="cvterm_id"/>
+          </type_id>
+          <subject_id>
+            <xsl:apply-templates select="../id" mode="cvterm_id"/>
+          </subject_id>
+          <object_id>
+            <xsl:value-of select="to"/>
+          </object_id>
+        </cvterm_relationship>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- see obo1.2 docs for more info on this tag -->
+  <!-- intersection_ofs (aka logical definitions) are
+       recorded in the DAG as a collection of intersection_of
+       relationships between the defined term and either
+       (a) another term (the genus, or generic term)
+       (b) an anonymous term, itself linked to another term by a
+           relationship of some type (a differentium)
+       -->
+  <xsl:template match="intersection_of">
+    <cvterm_relationship>
+      <type_id>intersection_of</type_id>
+      <subject_id>
+        <xsl:apply-templates select="../id" mode="cvterm_id"/>
+      </subject_id>
+      <object_id>
+        <xsl:choose>
+          <xsl:when test="type">
+            <!-- anonymous term -->
+            <cvterm>
+              <xsl:call-template name="make-anon-term-elts">
+                <xsl:with-param name="anon_id" select="concat('restriction','--',concat(type,'--',../id))"/>
+              </xsl:call-template>
+              <cvterm_relationship>
+                <type_id>
+                  <xsl:apply-templates select="type" mode="cvterm_id"/>
+                </type_id>
+                <object_id>
+                  <xsl:apply-templates select="to" mode="cvterm_id"/>
+                </object_id>
+              </cvterm_relationship>
+            </cvterm>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates select="to" mode="cvterm_id"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </object_id>
+    </cvterm_relationship>
+  </xsl:template>
+
+  <xsl:template name="make-anon-term-elts">
+    <xsl:param name="anon_id"/>
+    <dbxref_id>
+      <dbxref>
+        <db_id>internal</db_id>
+        <accession><xsl:value-of select="$anon_id"/></accession>
+      </dbxref>
+    </dbxref_id>
+    <name><xsl:value-of select="$anon_id"/></name>
+    <cv_id>anonymous_cv</cv_id>
+    <cvtermprop>
+      <type_id>is_anonymous</type_id>
+      <value>
+        <xsl:text>1</xsl:text>
+      </value>
+      <rank>0</rank>
+    </cvtermprop>
+  </xsl:template>
+
+  <xsl:template match="synonym">
+    <cvtermsynonym>
+      <synonym>
+        <xsl:value-of select="synonym_text"/>
+      </synonym>
+      <xsl:if test="@scope">
+        <type_id>
+          <cvterm>
+            <dbxref_id>
+              <dbxref>
+                <db_id>internal</db_id>
+                <accession>
+                  <xsl:value-of select="@scope"/>
+                </accession>
+              </dbxref>
+            </dbxref_id>
+            <cv_id>synonym_type</cv_id>
+            <name>
+              <xsl:value-of select="@scope"/>
+            </name>
+          </cvterm>
+        </type_id>
+      </xsl:if>
+    </cvtermsynonym>
+  </xsl:template>
+
+  <!-- TODO: use this -->
+  <xsl:template match="namespace">
+    <cv_id>
+      <xsl:text>cv__</xsl:text>
+      <xsl:value-of select="."/>
+    </cv_id>
+  </xsl:template>
+    
+  <xsl:template match="comment">
+    <cvtermprop>
+      <type_id>comment_type</type_id>
+      <value>
+        <xsl:value-of select="."/>
+      </value>
+      <rank>0</rank>
+    </cvtermprop>
+  </xsl:template>
+    
+  <xsl:template match="xref_analog">
+    <cvterm_dbxref>
+      <dbxref_id>
+        <dbxref>
+          <db_id>
+            <db>
+              <name>
+                <xsl:value-of select="dbname"/>
+              </name>
+            </db>
+          </db_id>
+          <accession>
+            <xsl:value-of select="acc"/>
+          </accession>
+        </dbxref>
+      </dbxref_id>
+    </cvterm_dbxref>
+  </xsl:template>
+    
+  <xsl:template match="dbxref" mode="is_for_definition">
+    <cvterm_dbxref>
+      <dbxref_id>
+        <dbxref>
+          <db_id>
+            <db>
+              <name>
+                <xsl:value-of select="dbname"/>
+              </name>
+            </db>
+          </db_id>
+          <accession>
+            <xsl:value-of select="acc"/>
+          </accession>
+        </dbxref>
+      </dbxref_id>
+      <is_for_definition>1</is_for_definition>
+    </cvterm_dbxref>
+  </xsl:template>
+    
+  <xsl:template match="alt_id">
+    <cvterm_dbxref>
+      <dbxref_id>
+        <xsl:apply-templates select="." mode="dbxref"/>
+      </dbxref_id>
+    </cvterm_dbxref>
+  </xsl:template>
+  
+  <xsl:template match="def">
+    <definition>
+      <xsl:value-of select="defstr"/>
+    </definition>
+	<xsl:if test="string-length(dbxref/acc) > 0 and string-length(dbxref/dbname) > 0">
+        <xsl:apply-templates select="dbxref" mode="is_for_definition"/>
+	</xsl:if>
+  </xsl:template>
+
+  <xsl:template match="prod">
+    <feature>
+      <dbxref>
+        <db>
+          <name>
+            <xsl:value-of select="../proddb"/>
+          </name>
+        </db>
+        <accession>
+          <xsl:value-of select="prodacc"/>
+        </accession>
+      </dbxref>
+      <name>
+        <xsl:value-of select="prodsymbol"/>
+      </name>
+      <uniquename>
+        <xsl:value-of select="prodsymbol"/>
+      </uniquename>
+      <type>
+        <cvterm>
+          <name>
+            <xsl:value-of select="prodtype"/>
+          </name>
+          <cv>
+            <name>
+              sequence
+            </name>
+          </cv>
+        </cvterm>
+      </type>
+      <organism>
+        <dbxref>
+          <db>
+            <name>
+              ncbi_taxononmy
+            </name>
+          </db>
+          <accession>
+            <xsl:value-of select="prodtaxa"/>
+          </accession>
+        </dbxref>
+      </organism>
+      <xsl:apply-templates select="assoc"/>
+    </feature>
+  </xsl:template>
+
+  <xsl:template match="assoc">
+    <feature_cvterm>
+      <cvterm_id>
+        <xsl:apply-templates select="termacc" mode="cvterm_id"/>
+      </cvterm_id>
+      <xsl:apply-templates select="evidence"/>
+    </feature_cvterm>
+  </xsl:template>
+
+  <xsl:template match="evidence">
+    <feature_cvtermprop>
+    </feature_cvtermprop>
+  </xsl:template>
+
+  <xsl:template match="text()|@*">
+  </xsl:template>
+
+
+</xsl:stylesheet>
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_dig.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_dig.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_dig.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,141 @@
+<?xml version = "1.0"?>
+<xsl:stylesheet version="1.0" 
+  xmlns="http://dl.kr.org/dig/lang">
+  
+</xsl:stylesheet>
+
+  <xsl:output indent="yes" method="xml"/>
+
+  <xsl:key name="terms" match="term" use="id"/>
+
+  <xsl:template match="/">
+    <tells   xmlns="http://dl.kr.org/dig/lang">
+      <clearKB\>
+      <xsl:apply-templates select="obo/term"/>
+      <xsl:apply-templates select="obo/typedef"/>
+    </rdf:RDF>
+  </xsl:template>
+
+  <xsl:template match="term">
+    <defconcept>
+      <xsl:attribute name="name">
+        <xsl:value-of select="id"/>        
+      </xsl:attribute>
+    </defconcept>
+    <xsl:apply-templates select="is_a"/>
+    <xsl:apply-templates select="relationship"/>
+    <xsl:if test="count(intersection_of)>0">
+      <equalc>
+        <catom>
+          <xsl:attribute name="name">
+            <xsl:value-of select="id"/>                    
+          </xsl:attribute>
+        </catom>
+        <and>
+          <xsl:apply-templates select="intersection_of"/>
+        </and>
+      </equalc>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="typedef">
+    <defrole>
+      <xsl:attribute name="name">
+        <xsl:value-of select="id"/>        
+      </xsl:attribute>
+    </defrole>
+  </xsl:template>
+
+  <xsl:template match="is_a">
+    <xsl:if test="not(@novel_inferred) and not(@problematic_inferred)">
+      <xsl:comment>
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="key('terms',.)/name"/>
+        <xsl:text> </xsl:text>
+      </xsl:comment>
+      <rdfs:subClassOf>
+        <xsl:apply-templates mode="rdf-resource" select="."/>
+      </rdfs:subClassOf>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="relationship">
+    <rdfs:subClassOf>
+      <xsl:apply-templates mode="restriction" select="."/>      
+    </rdfs:subClassOf>
+  </xsl:template>
+    
+  <xsl:template match="intersection_of">
+    <xsl:choose>
+      <xsl:when test="type='is_a'">
+        <catom>
+          <xsl:attribute name="name">
+            <xsl:value-of select="to"/>                    
+          </xsl:attribute>
+        </catom>
+      </xsl:when>
+      <xsl:otherwise>
+        <some>
+          <ratom>
+            <xsl:attribute name="name">
+              <xsl:value-of select="type"/>
+            </xsl:attribute>
+          </ratom>
+          <iset>
+            <atom>
+              <xsl:attribute name="name">
+                <xsl:value-of select="to"/>
+              </xsl:attribute>
+            </atom>
+          </iset>
+        </some>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template mode="restriction" match="*">
+    <owl:Restriction>
+      <owl:onProperty>
+        <owl:ObjectProperty>
+          <xsl:apply-templates mode="rdf-about" select="type"/>
+        </owl:ObjectProperty>
+      </owl:onProperty>
+      <owl:someValuesFrom>
+        <xsl:apply-templates mode="rdf-resource" select="to"/>
+      </owl:someValuesFrom>
+    </owl:Restriction>
+    <xsl:comment>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="key('terms', to)/name"/>
+      <xsl:text> </xsl:text>
+    </xsl:comment>
+  </xsl:template>
+  
+  <xsl:template match="text()|@*">
+  </xsl:template>
+
+  <!-- RDF stuff -->
+  <xsl:template mode="rdf-id" match="*">
+    <xsl:attribute name="rdf:ID">
+      <xsl:value-of select="translate(.,':','_')"/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template mode="rdf-about" match="*">
+    <xsl:attribute name="rdf:about">
+      <xsl:text>#</xsl:text>
+      <xsl:value-of select="translate(.,':','_')"/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template mode="rdf-resource" match="*">
+    <xsl:attribute name="rdf:resource">
+      <xsl:text>#</xsl:text>
+      <xsl:value-of select="translate(.,':','_')"/>
+    </xsl:attribute>
+  </xsl:template>
+
+</xsl:stylesheet>
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_godb_prestore.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_godb_prestore.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_godb_prestore.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,734 @@
+<?xml version = "1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- transforms OBO XML format to an XML format that maps directly
+       to the GO Database. This transformed XML can be loaded
+       directly using the generic DBIx::DBStag module
+
+       see also: go-dev/go-db-perl/scripts/load-go-into-db.pl
+
+       CONSTRAINTS:
+
+       The file to be loaded cannot have trailing IDs
+
+       If an ID from another ontology is referenced, then that
+       ontology should also be included in the load
+
+       -->
+
+  <xsl:output indent="yes" method="xml"/>
+
+  <xsl:key name="terms" match="term" use="id"/>
+  <xsl:key name="k-synonymtypedef" match="synonymtypedef" use="id"/>
+  <xsl:key name="obs-terms-by-name" match="term[is_obsolete]" use="name"/>
+
+  <xsl:template match="/">
+    <godb_prestore>
+      <dbstag_metadata>
+        <map>type/term_synonym.synonym_type_id=term.id</map>
+        <map>category/term_synonym.synonym_category_id=term.id</map>
+        <map>property_key/term_property.property_key_id=term.id</map>
+        <map>term1/term2term.term1_id=term.id</map>
+        <map>term2/term2term.term2_id=term.id</map>
+        <map>type/term2term.relationship_type_id=term.id</map>
+        <map>term1/term2term_metadata.term1_id=term.id</map>
+        <map>term2/term2term_metadata.term2_id=term.id</map>
+        <map>type/term2term_metadata.relationship_type_id=term.id</map>
+        <map>type/association_property.relationship_type_id=term.id</map>
+        <map>type/gene_product.type_id=term.id</map>
+        <map>source_db/association.source_db_id=db.id</map>
+        <map>type/synonym.type_id=term.id</map>
+        <map>parentfk:term2term.term2_id</map>
+        <map>parentfk:term2term_metadata.term2_id</map>
+        <map>subset/term_subset.subset_id=term.id</map>
+      </dbstag_metadata>
+      <xsl:apply-templates select="*/source"/>
+
+      <term>
+        <acc>all</acc>
+        <name>all</name>
+        <is_root>1</is_root>
+        <term_type>universal</term_type>
+        <term_definition>
+          <term_definition>
+            This term is the most general term possible
+          </term_definition>
+        </term_definition>
+      </term>
+      <term>
+        <acc>is_a</acc>
+        <name>is_a</name>
+        <term_type>relationship</term_type>
+        <term_definition>
+          <term_definition>
+            inheritance relationship
+          </term_definition>
+        </term_definition>
+      </term>
+
+      <xsl:apply-templates select="*/header/subsetdef"/>
+
+      <!-- load relationships before terms -->
+      <xsl:apply-templates select="*/typedef"/>
+      <xsl:apply-templates select="*/term"/>
+      <xsl:apply-templates select="*/term/is_a"/>
+      <xsl:apply-templates select="*/typedef/is_a"/>
+      <xsl:apply-templates select="*/term/relationship"/>
+      <xsl:apply-templates select="*/term/intersection_of"/>
+      <xsl:apply-templates select="assocs/dbset/prod"/>
+      <xsl:apply-templates select="*/instance"/>
+
+      <!-- experimental -->
+      <xsl:apply-templates select="//homologset"/>
+    </godb_prestore>
+  </xsl:template>
+
+  <xsl:template match="source">
+    <source_audit>
+      <xsl:copy-of select="./*"/>
+    </source_audit>
+  </xsl:template>
+
+  <xsl:template match="subsetdef">
+    <term>
+      <acc>
+        <xsl:value-of select="id"/>
+      </acc>
+      <name>
+        <xsl:value-of select="name"/>
+      </name>
+      <term_type>
+        <xsl:text>subset</xsl:text>
+      </term_type>
+    </term>
+  </xsl:template>
+
+  <xsl:template match="term">
+    <term>
+      <acc>
+        <xsl:value-of select="id"/>
+      </acc>
+      <xsl:if test="name">
+        <name>
+          <xsl:value-of select="name"/>
+        </name>
+      </xsl:if>
+      <xsl:if test="namespace">
+        <term_type>
+          <xsl:value-of select="namespace"/>
+        </term_type>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="is_obsolete">
+          <is_obsolete>1</is_obsolete>
+          <!-- add extra parentage for obsolete terms -->
+          <term2term>
+            <type>
+              <term>
+                <acc>is_a</acc>
+              </term>
+            </type>
+            <term1>
+              <term>
+                <name>
+                  <xsl:text>obsolete_</xsl:text>
+                  <xsl:value-of select="namespace"/>
+                </name>
+                <acc>
+                  <xsl:text>obsolete_</xsl:text>
+                  <xsl:value-of select="namespace"/>
+                </acc>
+                <term_type>
+                  <xsl:value-of select="namespace"/>
+                </term_type>
+                <is_obsolete>1</is_obsolete>
+                <is_root>1</is_root>
+              </term>
+            </term1>
+          </term2term>
+        </xsl:when>
+        <xsl:otherwise>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:if test="is_root">
+        <is_root>1</is_root>
+      </xsl:if>
+      <xsl:apply-templates select="def"/>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="subset"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog|xref"/>
+      <xsl:apply-templates select="consider|replaced_by"/>
+      <xsl:apply-templates select="property_value"/>
+    </term>
+  </xsl:template>
+
+  <xsl:template match="typedef">
+    <term>
+      <acc>
+        <xsl:value-of select="id"/>
+      </acc>
+      <name>
+        <xsl:value-of select="translate(name,' ','_')"/>
+      </name>
+      <term_type>
+        <xsl:choose>
+          <xsl:when test="namespace">
+            <xsl:value-of select="namespace"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>relationship</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </term_type>
+      <xsl:if test="is_obsolete">
+        <is_obsolete>1</is_obsolete>
+      </xsl:if>
+      <xsl:apply-templates select="def"/>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog|xref"/>
+    </term>
+  </xsl:template>
+
+  <xsl:template match="*" mode="dbxref">
+    <dbxref>
+      <xref_dbname>
+        <xsl:value-of select="substring-before(.,':')"/>    
+      </xref_dbname>
+      <xref_key>
+        <xsl:value-of select="substring-after(.,':')"/>    
+      </xref_key>
+    </dbxref>
+  </xsl:template>
+
+  <xsl:template match="is_a">
+    <term2term>
+      <type>
+        <term>
+          <acc>is_a</acc>
+        </term>
+      </type>
+      <!-- term1 is the parent/object/target -->
+      <term1>
+        <term>
+          <acc>
+            <xsl:value-of select="."/>
+          </acc>
+        </term>
+      </term1>
+      <!-- term2 is the child/subject/current -->
+      <term2>
+        <term>
+          <acc>
+            <xsl:value-of select="../id"/>
+          </acc>
+        </term>
+      </term2>
+      <xsl:if test = "@completes='true'">
+        <completes>1</completes>
+      </xsl:if>
+    </term2term>
+  </xsl:template>
+
+  <xsl:template match="relationship">
+    <term2term>
+      <type>
+        <term>
+          <term_type>relationship</term_type>
+          <name>
+            <xsl:value-of select="type"/>
+          </name>
+          <acc>
+            <xsl:value-of select="type"/>
+          </acc>
+        </term>
+      </type>
+      <term1>
+        <term>
+          <acc>
+            <xsl:value-of select="to"/>
+          </acc>
+        </term>
+      </term1>
+      <term2>
+        <term>
+          <acc>
+            <xsl:value-of select="../id"/>
+          </acc>
+        </term>
+      </term2>
+      <xsl:if test = "@completes='true'">
+        <completes>1</completes>
+      </xsl:if>
+    </term2term>
+  </xsl:template>
+
+  <!-- see obo1.2 docs for more info on this tag -->
+  <!-- intersection_ofs (aka logical definitions) are
+       recorded in the DAG as a collection of intersection_of
+       relationships between the defined term and either
+       (a) another term (the genus, or generic term)
+       (b) an anonymous term, itself linked to another term by a
+           relationship of some type (a differentium)
+       -->
+  <xsl:template match="intersection_of">
+    <term2term>
+      <complete>1</complete>
+      <type>
+        <term>
+          <acc>
+            <xsl:choose>
+              <xsl:when test="type">
+                <xsl:value-of select="type"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:text>is_a</xsl:text>
+              </xsl:otherwise>
+            </xsl:choose>
+          </acc>
+        </term>
+      </type>
+
+      <!-- subject -->
+      <term2>
+        <term>
+          <acc>
+            <xsl:value-of select="../id"/>
+          </acc>
+        </term>
+      </term2>
+
+      <!-- object -->
+      <term1>
+        <term>
+          <acc>
+            <xsl:value-of select="to"/>
+          </acc>
+        </term>
+      </term1>
+    </term2term>
+  </xsl:template>
+
+  <xsl:template match="synonym">
+    <term_synonym>
+      <term_synonym>
+        <xsl:value-of select="synonym_text"/>
+      </term_synonym>
+      <xsl:if test="@scope != ''">
+        <type>
+          <term>
+            <term_type>synonym_scope</term_type>
+            <name>
+              <xsl:value-of select="@scope"/>
+            </name>
+            <acc>
+              <xsl:value-of select="@scope"/>
+            </acc>
+          </term>
+        </type>
+      </xsl:if>
+      <xsl:if test="@synonym_type != ''">
+        <category>
+          <term>
+            <term_type>synonym_type</term_type>
+            <name>
+              <xsl:value-of select="key('k-synonymtypedef', at synonym_type)/name"/>
+            </name>
+            <acc>
+              <xsl:value-of select="@synonym_type"/>
+            </acc>
+          </term>
+        </category>
+      </xsl:if>
+    </term_synonym>
+  </xsl:template>
+    
+  <xsl:template match="subset">
+    <term_subset>
+      <subset>
+        <term>
+          <acc>
+            <xsl:value-of select="."/>
+          </acc>
+        </term>
+      </subset>
+    </term_subset>
+  </xsl:template>
+    
+  <xsl:template match="alt_id">
+    <term_synonym>
+      <term_synonym>
+        <xsl:value-of select="."/>
+      </term_synonym>
+      <acc_synonym>
+        <xsl:value-of select="."/>
+      </acc_synonym>
+      <type>
+        <term>
+          <term_type>synonym_type</term_type>
+          <name>
+            alt_id
+          </name>
+          <acc>
+            alt_id
+          </acc>
+        </term>
+      </type>
+    </term_synonym>
+  </xsl:template>
+    
+  <xsl:template match="xref_analog|xref">
+    <term_dbxref>
+      <dbxref>
+        <xref_dbname>
+          <xsl:value-of select="dbname"/>
+        </xref_dbname>
+        <xref_key>
+          <xsl:value-of select="acc"/>
+        </xref_key>
+      </dbxref>
+      <is_for_definition>0</is_for_definition>
+    </term_dbxref>
+  </xsl:template>
+    
+  <xsl:template match="property_value">
+    <term_property>
+      <property_key>
+        <term>
+          <acc>
+            <xsl:value-of select="type"/>
+          </acc>
+        </term>
+      </property_key>
+      <property_val>
+        <xsl:value-of select="value"/>
+      </property_val>
+    </term_property>
+  </xsl:template>
+
+  <xsl:template match="consider|replaced_by">
+    <term2term_metadata>
+      <type>
+        <term>
+          <acc>
+            <xsl:value-of select="name(.)"/>
+          </acc>
+        </term>
+      </type>
+      <term1>
+        <term>
+          <acc>
+            <xsl:value-of select="."/>
+          </acc>
+        </term>
+      </term1>
+    </term2term_metadata>
+  </xsl:template>
+    
+  <xsl:template match="dbxref" mode="is_for_definition">
+    <term_dbxref>
+      <dbxref>
+        <xref_dbname>
+          <xsl:value-of select="dbname"/>
+        </xref_dbname>
+        <xref_key>
+          <xsl:value-of select="acc"/>
+        </xref_key>
+      </dbxref>
+      <is_for_definition>1</is_for_definition>
+    </term_dbxref>
+  </xsl:template>
+    
+  <xsl:template match="def">
+    <term_definition>
+      <term_definition>
+        <xsl:value-of select="defstr"/>
+      </term_definition>
+      <!-- comment can appear in one of two places -->
+      <xsl:if test="../comment">
+        <term_comment>
+          <xsl:value-of select="../comment"/>          
+        </term_comment>
+      </xsl:if>
+      <xsl:if test="comment">
+        <term_comment>
+          <xsl:value-of select="comment"/>          
+        </term_comment>
+      </xsl:if>
+    </term_definition>
+    <xsl:apply-templates select="dbxref" mode="is_for_definition"/>
+  </xsl:template>
+
+  <xsl:template match="prod">
+    <gene_product>
+      <dbxref>
+        <xref_dbname>
+          <xsl:value-of select="../proddb"/>
+        </xref_dbname>
+        <xref_key>
+          <xsl:value-of select="prodacc"/>
+        </xref_key>
+      </dbxref>
+      <symbol>
+        <xsl:value-of select="prodsymbol"/>
+      </symbol>
+      <full_name>
+        <xsl:value-of select="prodname"/>
+      </full_name>
+      <type>
+        <term>
+          <term_type>sequence</term_type>
+          <name>
+            <xsl:value-of select="prodtype"/>
+          </name>
+          <acc>
+            <xsl:value-of select="prodtype"/>
+          </acc>
+        </term>
+      </type> 
+      <species>
+        <ncbi_taxa_id>
+          <xsl:value-of select="prodtaxa"/>
+        </ncbi_taxa_id>
+      </species>
+      <xsl:apply-templates select="assoc"/>
+      <xsl:apply-templates select="prodsyn"/>
+    </gene_product>
+  </xsl:template>
+
+  <xsl:template match="prodsyn">
+    <gene_product_synonym>
+      <product_synonym>
+        <xsl:value-of select="."/>
+      </product_synonym>
+    </gene_product_synonym>
+  </xsl:template>
+
+  <xsl:template match="assoc">
+    <association>
+      <term>
+        <acc>
+          <xsl:value-of select="termacc"/>
+        </acc>
+      </term>
+      <xsl:if test="is_not">
+        <is_not>
+          <xsl:value-of select="is_not"/>
+        </is_not>
+      </xsl:if>
+      <xsl:apply-templates select="qualifier"/>
+      <xsl:apply-templates select="species_qualifier"/>
+      <xsl:apply-templates select="properties"/>
+      <xsl:apply-templates select="evidence"/>
+      <assocdate>
+        <xsl:value-of select="assocdate"/>
+      </assocdate>
+      <xsl:if test="source_db">
+        <source_db>
+          <db>
+            <name>
+              <xsl:value-of select="source_db"/>
+            </name>
+          </db>
+        </source_db>
+      </xsl:if>
+    </association>
+  </xsl:template>
+
+  <xsl:template match="qualifier">
+    <association_qualifier>
+      <term>
+        <acc>
+          <xsl:value-of select="."/>
+        </acc>
+        <!-- duplicate ID in name column -->
+        <name>
+          <xsl:value-of select="."/>
+        </name>
+        <term_type>association_qualifier</term_type>
+      </term>
+    </association_qualifier>
+  </xsl:template>
+
+  <xsl:template match="properties">
+    <xsl:for-each select="link">
+      <association_property>
+        <type>
+          <term>
+            <acc>
+              <xsl:value-of select="type"/>
+            </acc>
+          </term>
+        </type>
+        <term>
+          <acc>
+            <!-- todo: check for nested -->
+            <xsl:value-of select="to"/>
+          </acc>
+        </term>
+      </association_property>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="species_qualifier">
+    <association_species_qualifier>
+      <species>
+        <ncbi_taxa_id>
+          <xsl:value-of select="."/>
+        </ncbi_taxa_id>
+      </species>
+    </association_species_qualifier>
+  </xsl:template>
+
+  <xsl:template match="evidence">
+    <evidence>
+      <code>
+        <xsl:value-of select="evcode"/>
+      </code>
+      <seq_acc>
+        <xsl:value-of select="with"/>
+      </seq_acc>
+      <xsl:apply-templates select="ref" mode="dbxref"/>
+      <xsl:apply-templates select="with"/>
+    </evidence>
+  </xsl:template>
+
+  <xsl:template match="with">
+    <evidence_dbxref>
+      <xsl:apply-templates select="." mode="dbxref"/>
+    </evidence_dbxref>
+  </xsl:template>
+
+
+  <!-- GO.xrf_abs data stored as generic instance data -->
+  <xsl:template match="instance[instance_of='GOMetaModel:Database']">
+    <db>
+      <name>
+        <xsl:value-of select="id"/>
+      </name>
+      <xsl:if test="property_value[type='GOMetaModel:database']">
+        <fullname>
+          <xsl:value-of select="property_value[type='GOMetaModel:database']/value"/>
+        </fullname>
+      </xsl:if>
+      <xsl:if test="property_value[type='GOMetaModel:object']">
+        <datatype>
+          <xsl:value-of select="property_value[type='GOMetaModel:object']/value"/>
+        </datatype>
+      </xsl:if>
+      <xsl:if test="property_value[type='GOMetaModel:generic_url']">
+        <generic_url>
+          <xsl:value-of select="property_value[type='GOMetaModel:generic_url']/value"/>
+        </generic_url>
+      </xsl:if>
+      <xsl:if test="property_value[type='GOMetaModel:url_syntax']">
+        <url_syntax>
+          <xsl:value-of select="property_value[type='GOMetaModel:url_syntax']/value"/>
+        </url_syntax>
+      </xsl:if>
+      <xsl:if test="property_value[type='GOMetaModel:url_example']">
+        <url_example>
+          <xsl:value-of select="property_value[type='GOMetaModel:url_example']/value"/>
+        </url_example>
+      </xsl:if>
+    </db>
+  </xsl:template>
+
+  <!-- homology data (EXPERIMENTAL) - comes from reference genomes -->
+  <xsl:template match="homologset">
+    <!-- we create a term for the disease/homology set/human gene -->
+    <term>
+      <acc>
+        <xsl:value-of select="@id"/>
+      </acc>
+      <name>
+        <xsl:value-of select="tagval[@type='HS_gene_symbol']"/>
+      </name>
+      <term_type>
+        <xsl:text>reference_genome</xsl:text>
+      </term_type>
+      <term_definition>
+        <term_definition>
+          <xsl:value-of select="tagval[@type='OMIM_Disease_name']"/>
+        </term_definition>
+      </term_definition>
+
+      <term2term>
+        <type>
+          <term>
+            <acc>is_a</acc>
+          </term>
+        </type>
+        <term1>
+          <term>
+            <name>
+              <xsl:text>collection of homologous genes</xsl:text>
+            </name>
+            <acc>
+              <xsl:text>REFGENOMES:1</xsl:text>
+            </acc>
+            <term_type>
+              <xsl:text>reference_genomes</xsl:text>
+            </term_type>
+          </term>
+        </term1>
+      </term2term>
+    </term>
+    <xsl:for-each select="member">
+      <gene_product>
+        <dbxref>
+          <xref_dbname>
+            <xsl:value-of select="substring-before(@ref,':')"/>
+          </xref_dbname>
+          <xref_key>
+            <xsl:value-of select="substring-after(@ref,':')"/>
+          </xref_key>
+        </dbxref>
+        <association>
+          <term>
+            <acc>
+              <xsl:value-of select="../@id"/>
+            </acc>
+          </term>
+          <source_db>
+            <db>
+              <name>
+                <xsl:text>reference_genomes</xsl:text>
+              </name>
+            </db>
+          </source_db>
+          <association_qualifier>
+            <term>
+              <acc>
+                <xsl:text>oban:evolutionary_ancestory_of</xsl:text>
+              </acc>
+              <name>evolutionary ancestor of</name>
+              <term_type>relation</term_type>
+            </term>
+          </association_qualifier>
+          <evidence>
+            <code>
+              <xsl:text>TAS</xsl:text>
+            </code>
+            <seq_acc>
+              <xsl:text>TEST</xsl:text>
+            </seq_acc>
+            <dbxref>
+              <xref_dbname>test</xref_dbname>
+              <xref_key>1234</xref_key>
+            </dbxref>
+          </evidence>
+        </association>
+      </gene_product>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="text()|@*">
+  </xsl:template>
+
+
+</xsl:stylesheet>
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_obd_prestore.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_obd_prestore.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_obd_prestore.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,1141 @@
+<?xml version = "1.0"?>
+<!DOCTYPE stylesheet [
+  <!ENTITY oboInOwl "http://www.geneontology.org/formats/oboInOwl#">
+  <!ENTITY oboContent "http://purl.org/obo/owl/">
+  <!ENTITY xref "http://purl.org/obo/owl/">
+  <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+  ]>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- this transforms oboxml into obdxml -->
+  <!-- obdxml can be loaded into an obd db using DBIx::DBStag -->
+  <xsl:param name="source"/>
+
+  <xsl:output indent="yes" method="xml"/>
+
+  <!-- *********************************************** -->
+  <!-- Parameters -->
+  <!-- *********************************************** -->
+  <xsl:param name="localid_prefix"/>
+  <xsl:param name="default_idspace"/>
+
+  <!-- *********************************************** -->
+  <!-- Indexes -->
+  <!-- *********************************************** -->
+  <xsl:key name="k_idspace" match="obo/header/idspace" use="local"/>
+  <xsl:key name="k_entity" match="term|typedef|instance" use="id"/>
+
+  <xsl:variable name="unique_namespace" select="//namespace[not(.=preceding::namespace)]"/>
+  <xsl:variable name="source_id" select="//source/source_id"/>
+
+  <xsl:template match="/">
+    <obd>
+      <xsl:comment>
+        <xsl:text>XORT macros - we can refer to these later by stag??</xsl:text>
+      </xsl:comment>
+
+      <!-- set macros; ensure the basic stuff is there -->
+
+      <node op="force" id="OBO_REL">
+        <uid>OBO_REL</uid>
+        <label>OBO_REL</label>
+        <uri>http://www.obofoundry.org/ro#</uri>
+        <metatype><xsl:text>I</xsl:text></metatype>
+      </node>
+
+      <node op="force" id="_default_idspace">
+        <uid>
+          <xsl:choose>
+            <xsl:when test="$default_idspace">
+              <xsl:value-of select="$default_idspace"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>_global</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </uid>
+      </node>
+
+      <node op="force" id="is_a">
+        <uid>OBO_REL:is_a</uid>
+        <metatype><xsl:text>R</xsl:text></metatype>
+      </node>
+
+      <node op="force" id="instance_of">
+        <uid>OBO_REL:instance_of</uid>
+        <metatype><xsl:text>R</xsl:text></metatype>
+      </node>
+
+      <node op="force" id="owl:inverseOf">
+        <uid>owl:inverseOf</uid>
+        <metatype><xsl:text>R</xsl:text></metatype>
+      </node>
+
+      <node op="force" id="in_organism">
+        <uid>oban:in_organism</uid>
+        <metatype><xsl:text>R</xsl:text></metatype>
+      </node>
+
+      <node op="force" id="influences">
+        <uid>oban:influences</uid>
+        <metatype><xsl:text>R</xsl:text></metatype>
+      </node>
+
+      <!-- ID only appears as an attribute in trailing qualifiers -->
+      <xsl:for-each select="//@id">
+        <node id="{.}">
+          <is_reiflink><xsl:text>t</xsl:text></is_reiflink>
+          <is_anonymous><xsl:text>t</xsl:text></is_anonymous>
+        </node>
+      </xsl:for-each>
+
+      <xsl:call-template name="embed-delete-directives"/>
+      <xsl:apply-templates select="*/source"/>
+      <xsl:apply-templates select="*/header/subsetdef"/>
+
+      <!-- terms can appear in different obo file types -->
+      <xsl:comment>relationship types</xsl:comment>
+      <xsl:apply-templates select="*/typedef"/>
+
+      <xsl:comment>terms</xsl:comment>
+      <xsl:apply-templates select="*/term"/>
+
+      <xsl:comment>instances</xsl:comment>
+      <xsl:apply-templates select="*/instance"/>
+
+      <xsl:comment>annotations</xsl:comment>
+      <xsl:apply-templates select="*/annotation"/>
+
+
+      <xsl:comment>is_a relationship types</xsl:comment>
+      <xsl:apply-templates select="*/term/is_a"/>
+      <xsl:apply-templates select="*/typedef/is_a"/>
+      <xsl:apply-templates select="*/typedef/inverse_of"/>
+
+      <xsl:comment>other relationship types</xsl:comment>
+      <xsl:apply-templates select="*/term/relationship"/>
+
+      <xsl:comment>
+        logical definitions (by intersection or union)
+      </xsl:comment>
+      <xsl:apply-templates select="*/term/intersection_of"/>
+      <xsl:apply-templates select="*/term/union_of"/>
+
+      <xsl:comment>instance-level relations</xsl:comment>
+      <xsl:apply-templates select="*/instance/property_value"/>
+
+      <!-- old-style obo-xml annotations -->
+      <xsl:apply-templates select="//prod"/>
+
+    </obd>
+  </xsl:template>
+
+  <!-- todo -->
+  <xsl:template name="embed-delete-directives">
+    <xsl:comment>
+      <xsl:text>
+        Update policy: all links from this source are deleted and repopulated
+      </xsl:text>
+    </xsl:comment>
+    <_sql op="delete" from="link" match="loaded_from_id" pkey="link_id">
+      <xsl:call-template name="sql-for-namespaces"/>
+    </_sql>
+    <_sql op="delete" from="tagval" match="loaded_from_id" pkey="tagval_id">
+      <xsl:call-template name="sql-for-namespaces"/>
+    </_sql>
+    <_sql op="delete" from="sameas" match="loaded_from_id" pkey="sameas_id">
+      <xsl:call-template name="sql-for-namespaces"/>
+    </_sql>
+    <_sql op="delete" from="alias" match="loaded_from_id" pkey="alias_id">
+      <xsl:call-template name="sql-for-namespaces"/>
+    </_sql>
+    <_sql op="delete" from="description" match="loaded_from_id" pkey="description_id">
+      <xsl:call-template name="sql-for-namespaces"/>
+    </_sql>
+    <!-- annotation nodes too? -->
+  </xsl:template>
+
+  <xsl:template name="sql-for-namespaces">
+    <_sql op="select" from="node" col="node_id" match="uid">
+      <xsl:value-of select="//source/source_id"/>
+    </_sql>
+  </xsl:template>
+
+  <xsl:template name="xxxx-sql-for-namespaces">
+    <xsl:for-each select="$unique_namespace">
+      <_sql op="select" from="node" col="node_id" match="uid">
+        <xsl:value-of select="."/>
+      </_sql>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="term">
+    <node id="{id}">
+      <xsl:apply-templates select="id" mode="id"/>
+      <xsl:call-template name="node_audit"/>
+
+      <xsl:choose>
+        <xsl:when test="is_anonymous=1">
+          <is_anonymous>
+            <xsl:text>t</xsl:text>
+          </is_anonymous>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="id" mode="uri"/>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <metatype><xsl:text>C</xsl:text></metatype>
+      <xsl:if test="is_obsolete=1">
+        <is_obsolete>t</is_obsolete>
+      </xsl:if>
+      <xsl:if test="name">
+        <label>
+          <xsl:value-of select="name"/>
+        </label>
+      </xsl:if>
+
+      <!-- when no namespace, use string before ':' in id for source  if any -->
+      <xsl:apply-templates mode="source_id" select="."/>
+
+      <xsl:apply-templates select="def"/>
+      <xsl:apply-templates select="comment"/>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog"/>
+      <xsl:apply-templates select="subset"/>
+    </node>
+  </xsl:template>
+
+  <!-- in oboxml, a typedef element is used for relations and slots. these map to nodes in obd -->
+  <xsl:template match="typedef">
+    <node id="{id}">
+      <xsl:apply-templates select="id" mode="id"/>
+      <metatype>
+        <xsl:text>R</xsl:text>
+      </metatype>
+      <label>
+        <!-- note: earlier versions of ontologies had ad-hoc names -->
+        <!-- we want to use the ID of the name here -->
+        <xsl:choose>
+          <xsl:when test="contains(id,':')">
+            <!-- we have a 'real' ID, which means the name is real -->
+            <xsl:value-of select="name"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <!-- old ontology: ID is actually the name -->
+            <xsl:value-of select="id"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </label>
+
+      <!-- by default, relations go in the relationship
+           namespace, even though they may not be defined in
+           official obo relations ontology -->
+      <xsl:choose>
+        <xsl:when test="namespace and contains(id,':')">
+          <source_id>
+            <node>
+              <uid>
+                <xsl:value-of select="namespace"/>
+              </uid>
+              <metatype><xsl:text>I</xsl:text></metatype>
+            </node>
+          </source_id>
+        </xsl:when>
+        <xsl:otherwise>
+          <source_id>_default_idspace</source_id>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:if test="is_obsolete">
+        <is_obsolete>t</is_obsolete>
+      </xsl:if>
+      <xsl:apply-templates select="is_symmetric|is_cyclic|is_anti_symmetric|is_reflexive|is_transitive"/>
+      <xsl:apply-templates select="def"/>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog"/>
+    </node>
+  </xsl:template>
+
+  <!-- more work needed here!! -->
+  <xsl:template match="instance">
+    <node id="{id}">
+      <xsl:apply-templates select="id" mode="id"/>
+      <xsl:choose>
+        <xsl:when test="is_anonymous=1">
+          <is_anonymous>
+            <xsl:text>t</xsl:text>
+          </is_anonymous>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="id" mode="uri"/>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates select="name" mode="label"/>
+      <metatype><xsl:text>I</xsl:text></metatype>
+      
+      <xsl:if test="namespace">
+        <source_id>
+          <node>
+            <uid>
+              <xsl:value-of select="namespace"/>
+            </uid>
+          </node>
+        </source_id>
+      </xsl:if>
+
+      <xsl:apply-templates select="instance_of"/>
+      <xsl:apply-templates select="comment"/>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog"/>
+      <xsl:apply-templates select="subset"/>
+
+    </node>
+  </xsl:template>
+
+  <xsl:template match="subsetdef">
+    <node>
+      <uid>
+        <xsl:value-of select="id"/>
+      </uid>
+      <label>
+        <xsl:value-of select="name"/>
+      </label>
+      <metatype><xsl:text>I</xsl:text></metatype>
+      <source_id>
+        <node>
+          <uid>subset</uid>
+        </node>
+      </source_id>
+    </node>
+  </xsl:template>
+
+  <xsl:template match="is_symmetric|is_cyclic|is_anti_symmetric|is_reflexive|is_transitive">
+    <xsl:if test="../is_transitive">
+      <is_transitive>t</is_transitive>
+    </xsl:if>
+    <!-- what about other rel property?? -->
+  </xsl:template>
+
+  <!-- reference to a node
+       assumed to be inside a foreign key element -->
+  <xsl:template match="*" mode="node_ref">
+    <xsl:if test="not(.)">
+      <xsl:message terminate="yes">
+        <xsl:copy select="."/>
+        <xsl:text>No ID</xsl:text>
+      </xsl:message>
+    </xsl:if>
+    <xsl:choose>
+      <!-- we've already referenced this node -
+           we assume it has already been loaded -->
+      <xsl:when test="key('k_entity',.)">
+        <xsl:value-of select="."/>
+      </xsl:when>
+      <!-- convention: bNodes are in _ idspace -->
+      <!-- is there a term or typedef by this ID in this file? -->
+      <xsl:when test="substring-before(.,':') = '_'">
+        <!-- use a XORT id -->
+        <xsl:value-of select="."/>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- explicit node reference -->
+        <node>
+          <uid>
+            <xsl:value-of select="."/>
+          </uid>
+        </node>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="link_audit">
+    <link_audit op="insert">
+      <source_id>__source</source_id>
+      <loadtime>now</loadtime>
+    </link_audit>
+  </xsl:template>
+  <xsl:template name="node_audit">
+    <node_audit op="insert">
+      <source_id>__source</source_id>
+      <loadtime>now</loadtime>
+    </node_audit>
+  </xsl:template>
+
+  <xsl:template match="*" mode="id">
+    <xsl:if test="not(.)">
+      <xsl:message terminate="yes">
+        <xsl:copy select="."/>
+        <xsl:text>No ID</xsl:text>
+      </xsl:message>
+    </xsl:if>
+    <xsl:choose>
+      <!-- convention: bNodes are in _ idspace -->
+      <xsl:when test="substring-before(.,':') = '_'">
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- not a bNode -->
+        <uid>
+          <xsl:value-of select="."/>
+        </uid>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- not the ones under def -->
+  <xsl:template match="*" mode="dbxref">
+    <sameas>
+      <object_id>
+        <xsl:apply-templates select="." mode="node_ref"/>
+      </object_id>
+    </sameas>
+  </xsl:template>
+
+  <xsl:template match="is_a|instance_of">
+    <link>
+      <xsl:call-template name="link_audit"/>
+      <xsl:apply-templates select="@implied"/>
+      <node_id>
+        <xsl:apply-templates select="../id" mode="node_ref"/>
+      </node_id>
+      <predicate_id>
+        <xsl:value-of select="name(.)"/>
+      </predicate_id>
+      <object_id>
+        <xsl:apply-templates select="." mode="node_ref"/>
+      </object_id>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </link>
+  </xsl:template>
+
+  <xsl:template match="inverse_of">
+    <link>
+      <xsl:apply-templates select="@implied"/>
+      <node_id>
+        <xsl:apply-templates select="../id" mode="node_ref"/>
+      </node_id>
+      <predicate_id>
+        <xsl:text>owl:inverseOf</xsl:text>
+      </predicate_id>
+      <object_id>
+        <xsl:apply-templates select="." mode="node_ref"/>
+      </object_id>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </link>
+  </xsl:template>
+
+  <xsl:template match="relationship">
+    <link>
+      <xsl:if test="@id">
+        <!-- if the link is identified, we also create or reference a tuple in the node table -->
+        <reiflink_node_id>
+          <!-- use a macro lookup -->
+          <xsl:value-of select="@id"/>
+        </reiflink_node_id>
+      </xsl:if>
+      <xsl:apply-templates select="@implied"/>
+      <node_id>
+        <xsl:apply-templates select="../id" mode="node_ref"/>
+      </node_id>
+      <predicate_id>
+        <xsl:apply-templates select="type" mode="node_ref"/>
+      </predicate_id>
+      <object_id>
+        <xsl:apply-templates select="to" mode="node_ref"/>
+      </object_id>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </link>
+  </xsl:template>
+
+  <!-- for instances: slot-values and relationships between instances -->
+  <xsl:template match="property_value">
+    <xsl:choose>
+      <xsl:when test="datatype">
+        <!-- slots -->
+        <tagval>
+          <node_id>
+            <xsl:value-of select="../id"/>
+          </node_id>
+          <tag_id>
+            <xsl:apply-templates select="type" mode="node_ref"/>
+          </tag_id>
+          <val>
+            <xsl:value-of select="value"/>
+          </val>
+          <xsl:apply-templates mode="source_id" select=".."/>
+        </tagval>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- instance to instance links -->
+        <link>
+          <xsl:if test="@id">
+            <!-- if the link is identified, we also create or reference a tuple in the node table -->
+            <reiflink_node_id>
+              <!-- use a macro lookup -->
+              <xsl:value-of select="@id"/>
+            </reiflink_node_id>
+          </xsl:if>
+          <xsl:apply-templates select="@implied"/>
+          <node_id>
+            <xsl:apply-templates select="../id" mode="node_ref"/>
+          </node_id>
+          <predicate_id>
+            <xsl:apply-templates select="type" mode="node_ref"/>
+          </predicate_id>
+          <object_id>
+            <xsl:apply-templates select="to" mode="node_ref"/>
+          </object_id>
+          <xsl:apply-templates mode="source_id" select=".."/>
+        </link>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- intersection_ofs: collection of links -->
+  <xsl:template match="intersection_of|union_of">
+    <link>
+      <xsl:apply-templates select="@implied"/>
+      <node_id>
+        <xsl:apply-templates select="../id" mode="node_ref"/>
+      </node_id>
+      <combinator>
+        <xsl:choose>
+          <xsl:when test="name(.)='intersection_of'">
+            <xsl:text>I</xsl:text>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>U</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </combinator>
+      <xsl:if test="@implied and @implied!='false'">
+        <is_inferred>
+          <xsl:text>t</xsl:text>
+        </is_inferred>
+      </xsl:if>
+      <predicate_id>
+        <xsl:choose>
+          <xsl:when test="type">
+            <xsl:apply-templates select="type" mode="node_ref"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>is_a</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </predicate_id>
+      <object_id>
+        <xsl:apply-templates select="to" mode="node_ref"/>
+      </object_id>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </link>
+  </xsl:template>
+
+  <xsl:template name="make-anon-node-attrs">
+    <xsl:param name="anon_id"/>
+    <uid><xsl:value-of select="$anon_id"/></uid>
+    <metatype><xsl:text>I</xsl:text></metatype>
+    <is_anonymous>t</is_anonymous>
+  </xsl:template>
+
+  <xsl:template match="synonym">
+    <alias>
+      <label>
+        <xsl:value-of select="synonym_text"/>
+      </label>
+      <xsl:if test="@scope">
+        <scope>
+          <xsl:value-of select="@scope"/>
+        </scope>
+      </xsl:if>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </alias>
+  </xsl:template>
+
+  <xsl:template match="comment">
+    <description>
+      <type_id>
+        <node>
+          <uid>comment</uid>
+          <metatype><xsl:text>R</xsl:text></metatype>
+        </node>
+      </type_id>
+      <label>
+        <xsl:value-of select="."/>
+      </label>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </description>
+  </xsl:template>
+
+  <xsl:template match="description">
+    <description>
+      <type_id>
+        <node>
+          <uid>oboMetaModel:description</uid>
+          <metatype><xsl:text>R</xsl:text></metatype>
+        </node>
+      </type_id>
+      <label>
+        <xsl:value-of select="."/>
+      </label>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </description>
+  </xsl:template>
+
+  <xsl:template match="creator">
+    <tagval>
+      <tag_id>
+        <node>
+          <uid>dc:creator</uid>
+          <metatype><xsl:text>R</xsl:text></metatype>
+        </node>
+      </tag_id>
+      <val>
+        <xsl:value-of select="."/>
+      </val>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </tagval>
+  </xsl:template>
+
+  <xsl:template match="annotation_date">
+    <tagval>
+      <tag_id>
+        <node>
+          <uid>dc:date</uid>
+          <metatype><xsl:text>R</xsl:text></metatype>
+        </node>
+      </tag_id>
+      <val>
+        <xsl:value-of select="."/>
+      </val>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </tagval>
+  </xsl:template>
+
+  <xsl:template match="provenance">
+    <link>
+      <predicate_id>
+        <node>
+          <uid>oboMetaModel:provenance</uid>
+          <metatype><xsl:text>R</xsl:text></metatype>
+        </node>
+      </predicate_id>
+      <object_id>
+        <xsl:apply-templates mode="id-or-expression" select="."/>
+      </object_id>
+      <xsl:apply-templates mode="source_id" select=".."/>
+      <is_metadata>
+        <xsl:text>t</xsl:text>
+      </is_metadata>
+    </link>
+  </xsl:template>
+
+  <xsl:template mode="xref" match="*">
+    <xsl:choose>
+      <!-- typically OBO xrefs are in the form DB:ID - eg EC:1.1.1.1
+           on occasion the xref is also a URI. This this case it may be
+           mistakenly mis-parsed as DB=http, ID=//xxx.yyy.zzz/foo
+           we correct for that here -->
+      <xsl:when test="dbname='URL'">
+        <xsl:value-of select="acc"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="dbname"/>
+        <xsl:text>:</xsl:text>
+        <xsl:value-of select="acc"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="xref_analog">
+    <link>
+      <predicate_id>
+        <node>
+          <uid>oboMetaModel:xref</uid>
+        </node>
+      </predicate_id>
+      <object_id>
+        <node>
+          <uid>
+            <xsl:apply-templates mode="xref" select="."/>
+          </uid>
+        </node>
+      </object_id>
+      <xsl:apply-templates mode="source_id" select=".."/>
+      <is_metadata>
+        <xsl:text>t</xsl:text>
+      </is_metadata>
+    </link>
+  </xsl:template>
+
+  <xsl:template match="OLD--xref_analog">
+    <node_xref>
+      <xref_id>
+        <node>
+          <uid>
+            <xsl:value-of select="acc"/>
+          </uid>
+          <source_id>
+            <node>
+              <uid>
+                <xsl:value-of select="dbname"/>
+              </uid>
+            </node>
+          </source_id>
+        </node>
+      </xref_id>
+    </node_xref>
+  </xsl:template>
+
+  <!-- only dbxref under def -->
+  <xsl:template match="dbxref" mode="is_for_definition">
+    <description_xref>
+      <xref_id>
+        <node>
+          <uid>
+            <xsl:apply-templates mode="xref" select="."/>
+          </uid>
+        </node>
+      </xref_id>
+    </description_xref>
+  </xsl:template>
+
+  <!-- TODO: fix this -->
+  <!-- treat alt_id as alias -->
+  <xsl:template match="alt_id">
+    <alias>
+      <type_id>
+        <node>
+          <uid>alt_id</uid>
+        </node>
+      </type_id>
+      <label>
+        <xsl:value-of select="."/>
+      </label>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </alias>
+  </xsl:template>
+  
+  <xsl:template match="def">
+    <description>
+      <type_id>
+        <node>
+          <uid>definition</uid>
+          <metatype><xsl:text>R</xsl:text></metatype>
+        </node>
+      </type_id>
+      <label>
+        <xsl:value-of select="defstr"/>
+      </label>
+      <xsl:if test="string-length(dbxref/acc) > 0 and string-length(dbxref/dbname) > 0">
+        <xsl:apply-templates select="dbxref" mode="is_for_definition"/>
+      </xsl:if>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </description>
+  </xsl:template>
+
+  <xsl:template match="subset">
+    <link>
+      <predicate_id>
+        <node>
+          <uid>oboMetaModel:inSubset</uid>
+        </node>
+      </predicate_id>
+      <object_id>
+        <node>
+          <uid>
+            <xsl:value-of select="."/>
+          </uid>
+        </node>
+      </object_id>
+      <is_metadata>
+        <xsl:text>t</xsl:text>
+      </is_metadata>
+      <xsl:apply-templates mode="source_id" select=".."/>
+    </link>
+  </xsl:template>
+
+  <!-- implied links (inferred by reasoner) -->
+  <xsl:template match="@implied">
+    <xsl:if test=". != 'false'">
+      <is_inferred>
+        <xsl:text>t</xsl:text>
+      </is_inferred>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="*" mode="label">
+    <xsl:if test=".">
+      <label>
+        <xsl:value-of select="."/>
+      </label>
+    </xsl:if>
+  </xsl:template>
+
+
+  <!-- also parse go_assoc xml -->
+  <xsl:template match="prod">
+    <node>
+      <xsl:comment>
+        <xsl:text>annotated entity</xsl:text>
+      </xsl:comment>
+      <source_id>
+        <node>
+          <uid>
+            <xsl:value-of select="../proddb"/>
+          </uid>
+        </node>
+      </source_id>
+      <uid>
+        <xsl:value-of select="../proddb"/>
+        <xsl:text>:</xsl:text>
+        <xsl:value-of select="prodacc"/>
+      </uid>
+      <xsl:call-template name="node_audit"/>
+      <label>
+        <xsl:value-of select="prodsymbol"/>
+      </label>
+      <xsl:if test="prodname">
+        <alias>
+          <type_id>
+            <node>
+              <uid>full_name</uid>
+            </node>
+          </type_id>
+          <label>
+            <xsl:value-of select="prodname"/>
+          </label>
+        </alias>
+      </xsl:if>
+      <xsl:for-each select="prodsyn">
+        <alias>
+          <type_id>
+            <node>
+              <uid>synonym</uid>
+            </node>
+          </type_id>
+          <label>
+            <xsl:value-of select="."/>
+          </label>
+        </alias>
+      </xsl:for-each>
+      <xsl:if test="prodtaxa">
+        <link>
+          <predicate_id>
+            <xsl:text>in_organism</xsl:text> <!-- TODO -->
+          </predicate_id>
+          <object_id>
+            <node>
+              <uid>
+                <xsl:text>NCBITaxon:</xsl:text>
+                <xsl:value-of select="prodtaxa"/>
+              </uid>
+            </node>
+          </object_id>
+        </link>
+      </xsl:if>
+      <xsl:if test="prodtype">
+        <link>
+          <predicate_id>
+            <xsl:text>is_a</xsl:text> <!-- TODO: is_a vs instance_of -->
+          </predicate_id>
+          <object_id>
+            <node>
+              <uid>
+                <xsl:value-of select="prodtype"/>
+              </uid>
+            </node>
+          </object_id>
+        </link>
+      </xsl:if>
+      <xsl:comment>
+        <xsl:text>annotations</xsl:text>
+      </xsl:comment>
+      <xsl:for-each select="assoc">
+        <link>
+          <predicate_id>
+            <xsl:text>influences</xsl:text> <!-- TODO -->
+          </predicate_id>
+          <object_id>
+            <node>
+              <uid>
+                <xsl:value-of select="termacc"/>
+              </uid>
+            </node>
+          </object_id>
+          <source_id>
+            <node>
+              <uid>
+                <xsl:value-of select="../proddb"/>
+              </uid>
+            </node>
+          </source_id>
+          <xsl:call-template name="link_audit"/>
+          <xsl:if test="is_not=1">
+            <is_negated><xsl:text>t</xsl:text></is_negated>
+          </xsl:if>
+          <xsl:comment>the annotation is the attribution for the link</xsl:comment>
+          <reiflink_node_id>
+            <node>
+              <!-- id is optional -->
+              <xsl:apply-templates select="id" mode="id"/>
+              <is_anonymous><xsl:text>t</xsl:text></is_anonymous>
+              <is_reiflink><xsl:text>t</xsl:text></is_reiflink>
+              <metatype><xsl:text>I</xsl:text></metatype>
+              <!-- type -->
+              <link>
+                <predicate_id>
+                  <xsl:text>instance_of</xsl:text>
+                </predicate_id>
+                <object_id>
+                  <node>
+                    <uid>oban:Annotation</uid>
+                  </node>
+                </object_id>
+              </link>
+              <!-- assocdata -->
+              <xsl:if test="assocdate">
+                <!-- TODO -->
+              </xsl:if>
+            </node>
+          </reiflink_node_id>
+        </link>
+      </xsl:for-each>
+    </node>
+    <!-- xsl:value-of select="../proddb"/?? -->
+    <!-- xsl:value-of select="prodtype"/?? -->
+    <!-- xsl:value-of select="prodtaxa"/?? -->
+  </xsl:template>
+
+  <!-- obo-format 1.3 annotation extension -->
+  <xsl:template match="annotation">
+    <link>
+      <predicate_id>
+        <node>
+          <uid>
+            <xsl:value-of select="relation"/>
+          </uid>
+        </node>
+      </predicate_id>
+      <node_id>
+        <node>
+          <uid>
+            <xsl:value-of select="subject"/>
+          </uid>
+        </node>
+      </node_id>
+      <object_id>
+        <xsl:apply-templates select="object" mode="id-or-expression"/>
+      </object_id>
+      <source_id>
+        <node>
+          <uid>
+            <xsl:value-of select="namespace"/>
+          </uid>
+        </node>
+      </source_id>
+      <xsl:call-template name="link_audit"/>
+      <xsl:if test="is_negated=1">
+        <is_negated>
+          <xsl:text>t</xsl:text>
+        </is_negated>
+      </xsl:if>
+      <xsl:comment>the annotation is the attributation for the link</xsl:comment>
+      <reiflink_node_id>
+        <node>
+          
+          <is_anonymous><xsl:text>t</xsl:text></is_anonymous>
+          <metatype><xsl:text>I</xsl:text></metatype>
+          <!-- type -->
+          <link>
+            <predicate_id>
+              <xsl:text>instance_of</xsl:text>
+            </predicate_id>
+            <object_id>
+              <node>
+                <uid>oban:Annotation</uid>
+              </node>
+            </object_id>
+          </link>
+          <!-- note: duplicated in node and link -->
+          
+          <xsl:apply-templates mode="source_id" select="."/>
+          <xsl:apply-templates select="description"/>
+          <xsl:apply-templates select="annotation_date"/>
+          <xsl:apply-templates select="provenance"/>
+          <xsl:apply-templates select="context"/>
+          <xsl:apply-templates select="creator"/>
+        </node>
+      </reiflink_node_id>
+    </link>
+  </xsl:template>
+
+  <xsl:template mode="source_id" match="*">
+    <source_id>
+      <node>
+        <uid>
+          <xsl:choose>
+            <xsl:when test="namespace">
+              <xsl:value-of select="namespace"/>
+            </xsl:when>
+            <xsl:when test="contains(id,':')">
+              <xsl:value-of select="substring-before(id,':')"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="//header/default-namespace"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </uid>
+        <metatype><xsl:text>I</xsl:text></metatype>
+      </node>
+    </source_id>
+    <loaded_from_id>
+      <xsl:text>__source</xsl:text>
+    </loaded_from_id>
+  </xsl:template>
+
+  <!-- auditing -->
+  <!-- audit source - not to be confused with namespace source... -->
+  <xsl:template match="source">
+    <node id="__source">
+      <xsl:apply-templates select="source_id" mode="id"/>
+      <xsl:apply-templates select="name" mode="label"/>
+      <metatype><xsl:text>I</xsl:text></metatype>
+      
+      <xsl:if test="namespace">
+        <source_id>
+          <node>
+            <uid>
+              <xsl:value-of select="source_path"/>
+            </uid>
+          </node>
+        </source_id>
+      </xsl:if>
+
+      <link>
+        <predicate_id>
+          <xsl:text>instance_of</xsl:text>
+        </predicate_id>
+        <object_id>
+          <node>
+            <uid>obd_meta:Document</uid>
+          </node>
+        </object_id>
+      </link>
+      <tagval>
+        <tag_id>
+          <node>
+            <uid>obd_meta:md5</uid>
+          </node>
+        </tag_id>
+        <val>
+          <xsl:value-of select="source_md5"/>
+        </val>
+      </tagval>
+      <tagval>
+        <tag_id>
+          <node>
+            <uid>obd_meta:modification_time</uid>
+          </node>
+        </tag_id>
+        <val>
+          <xsl:value-of select="source_mtime"/>
+        </val>
+      </tagval>
+      <tagval>
+        <tag_id>
+          <node>
+            <uid>obd_meta:source_fullpath</uid>
+          </node>
+        </tag_id>
+        <val>
+          <xsl:value-of select="source_fullpath"/>
+        </val>
+      </tagval>
+    </node>
+  </xsl:template>
+
+  <xsl:template match="*" mode="id-or-expression">
+    <xsl:choose>
+      <xsl:when test="intersection/link">
+        <node>
+          <is_anonymous>
+            <xsl:text>t</xsl:text>
+          </is_anonymous>
+          <metatype>
+            <xsl:text>C</xsl:text>
+          </metatype>
+          <xsl:for-each select="intersection/link">
+            <link>
+              <combinator>
+                <xsl:text>I</xsl:text>
+              </combinator>
+              <predicate_id>
+                <xsl:choose>
+                  <xsl:when test="type">
+                    <xsl:apply-templates select="type" mode="node_ref"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:text>is_a</xsl:text>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </predicate_id>
+              <object_id>
+                <xsl:apply-templates select="to" mode="id-or-expression"/>
+              </object_id>
+            </link>
+          </xsl:for-each>
+        </node>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="." mode="node_ref"/> 
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template mode="uri" match="*">
+    <uri>
+      <xsl:apply-templates mode="translate-id" select="."/>
+    </uri>
+  </xsl:template>
+
+  <xsl:template mode="translate-id" match="*">
+    <xsl:choose>
+      <xsl:when test="key('k_idspace',substring-before(.,':'))">
+        <xsl:value-of select="key('k_idspace',substring-before(.,':'))/global"/>
+        <xsl:if test="$localid_prefix">
+          <xsl:value-of select="$localid_prefix"/>
+        </xsl:if>
+        <xsl:value-of select="substring-after(.,':')"/>
+      </xsl:when>
+      <xsl:when test="substring-before(.,':')">
+        <xsl:text>&oboContent;</xsl:text>
+        <xsl:value-of select="substring-before(.,':')"/>
+        <xsl:text>#</xsl:text>
+        <xsl:value-of select="substring-before(.,':')"/>
+        <xsl:text>_</xsl:text>
+        <xsl:if test="$localid_prefix">
+          <xsl:value-of select="$localid_prefix"/>
+        </xsl:if>
+        <xsl:value-of select="substring-after(.,':')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>&oboContent;</xsl:text>
+        <xsl:text>_global/</xsl:text>
+        <xsl:if test="$localid_prefix">
+          <xsl:value-of select="$localid_prefix"/>
+        </xsl:if>
+        <xsl:value-of select="."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="text()|@*">
+  </xsl:template>
+
+
+</xsl:stylesheet>
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_obotext.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_obotext.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_obotext.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,315 @@
+<?xml version = "1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- not yet fully tested; perl transform still used for production mode -->
+
+    <xsl:output indent="yes" method="text"/>
+
+    <xsl:key name="terms" match="term" use="id"/>
+
+    <xsl:template match="/">
+      <xsl:apply-templates select="obo/header" />
+      <xsl:text>&#10;</xsl:text>
+
+      <xsl:apply-templates select="obo/typedef"/>
+      <xsl:apply-templates select="obo/term"/>
+      <xsl:apply-templates select="obo/instance"/>
+    </xsl:template>
+
+    <xsl:template match="header">
+      <xsl:text>format-version: 1.2</xsl:text>
+      <xsl:apply-templates select="date" />
+      <xsl:apply-templates select="saved-by" />
+      <xsl:apply-templates select="auto-generated-by" />
+      <xsl:apply-templates select="subsetdef">
+        <xsl:sort select="id" />
+      </xsl:apply-templates>
+      <xsl:apply-templates select="synonym_category">
+        <xsl:sort select="id" />
+      </xsl:apply-templates>
+      <xsl:apply-templates select="default-namespace" />
+      <xsl:apply-templates select="remark" />
+    </xsl:template>
+
+    <!-- mix term and typedef in same template -->
+    <xsl:template match="term|typedef">
+      <xsl:if test="name() = 'term'">
+        <xsl:text>[Term]</xsl:text>
+      </xsl:if>
+      <xsl:if test="name() = 'typedef'">
+        <xsl:text>[Typedef]</xsl:text>
+      </xsl:if>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text>id: </xsl:text>
+      <xsl:value-of select="id"/>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:apply-templates select="is_anonymous"/>
+      <xsl:text>name: </xsl:text>
+      <xsl:value-of select="name"/>
+      <xsl:text>&#10;</xsl:text>
+
+      <xsl:if test="namespace">
+        <xsl:text>namespace: </xsl:text>
+        <xsl:value-of select="namespace"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:if>
+      <xsl:apply-templates select="alt_id">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="def" />
+      <xsl:apply-templates select="comment" />
+
+      <xsl:apply-templates select="subset">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="synonym">
+        <xsl:sort select="synonym_text|@scope|category"/>
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="xref_analog">
+        <xsl:sort />
+      </xsl:apply-templates>
+      <xsl:apply-templates select="xref_unknown">
+        <xsl:sort />
+      </xsl:apply-templates>
+      <xsl:apply-templates select="domain">
+        <xsl:sort />
+      </xsl:apply-templates>
+      <xsl:apply-templates select="range">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="is_cyclic"/>
+      <xsl:apply-templates select="is_reflexive"/>
+      <xsl:apply-templates select="is_symmetric"/>
+      <xsl:apply-templates select="is_transitive"/>
+
+      <xsl:apply-templates select="is_a">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="intersection_of">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="inverse_of">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="union_of">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="disjoint_from">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="relationship|functional_property|datatype_property">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="is_obsolete"/>
+
+      <xsl:apply-templates select="replaced_by">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:apply-templates select="consider">
+        <xsl:sort />
+      </xsl:apply-templates>
+
+      <xsl:text>&#10;</xsl:text>
+    </xsl:template>
+
+    <xsl:template match="subsetdef">
+      <xsl:text>subsetdef: </xsl:text>
+      <xsl:apply-templates />
+    </xsl:template>
+
+    <xsl:template match="synonym_category">
+      <xsl:text>synonymtypedef: </xsl:text>
+      <xsl:apply-templates />
+    </xsl:template>
+
+    <!-- used for all boolean tags w/ default value false -->
+    <xsl:template match="is_obsolete|is_cyclic|is_reflexive|is_transitive|is_symmetric|is_anonymous">
+      <xsl:if test="text() = '1'">
+        <xsl:value-of select="name()"/>
+        <xsl:text>: true&#10;</xsl:text>
+      </xsl:if>
+    </xsl:template>
+
+    <xsl:template match="intersection_of">
+      <xsl:text>intersection_of: </xsl:text>
+
+      <xsl:if test = "count(type) > 0">
+	<xsl:value-of select="type"/>
+	<xsl:text> </xsl:text>
+      </xsl:if>
+      <xsl:value-of select="to"/>
+      <xsl:text> ! </xsl:text>
+      <xsl:value-of select="key('terms', .)/name"/>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:template>
+
+    <xsl:template match="is_a|inverse_of|disjoint_with|union_of">
+      <xsl:value-of select="name()"/>
+      <xsl:text>: </xsl:text>
+      <xsl:value-of select="."/>
+
+      <xsl:if test = "@namespace != ''">
+        <xsl:text> {namespaces="</xsl:text>
+	<xsl:value-of select="@namespace"/>
+	<xsl:text>"}</xsl:text>
+      </xsl:if>
+      <xsl:text> ! </xsl:text>
+      <xsl:value-of select="key('terms', .)/name"/>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:template>
+
+    <xsl:template match="relationship|functional_property|datatype_property">
+      <xsl:value-of select="name()"/>
+      <xsl:text>: </xsl:text>
+      <xsl:value-of select="type"/>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="to"/>
+
+      <xsl:if test = "@namespace != ''">
+        <xsl:text> {namespaces="</xsl:text>
+	<xsl:value-of select="@namespace"/>
+	<xsl:text>"}</xsl:text>
+      </xsl:if>
+      <xsl:text> ! </xsl:text>
+      <xsl:value-of select="key('terms', to)/name"/>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:template>
+
+    <xsl:template match="synonym">
+      <xsl:text>synonym: "</xsl:text>
+      <xsl:value-of select="synonym_text"/>
+      <xsl:text>"</xsl:text>
+      <xsl:choose>
+         <xsl:when test = "@scope='exact'">
+	    <xsl:text> EXACT</xsl:text>
+	 </xsl:when>
+	 <xsl:when test = "@scope='broad'">
+	    <xsl:text> BROAD</xsl:text>
+	 </xsl:when>
+	 <xsl:when test = "@scope='narrow'">
+	    <xsl:text> NARROW</xsl:text>
+	 </xsl:when>
+	 <xsl:otherwise>
+	    <xsl:text> UNSPECIFIED</xsl:text>
+	 </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:if test = "category != ''">
+        <xsl:text> </xsl:text>
+	<xsl:value-of select="category"/>
+      </xsl:if>
+
+      <xsl:call-template name="dbxreflist" />
+      <xsl:text>&#10;</xsl:text>
+    </xsl:template>
+
+    <xsl:template name="dbxreflist">
+      <xsl:if test="count(dbxref) = 0">
+         <xsl:text> []</xsl:text>
+      </xsl:if>
+      <xsl:for-each select="dbxref">
+         <xsl:sort select="dbname|acc" />
+         <xsl:if test="position() = 1">
+             <xsl:text> [</xsl:text>
+         </xsl:if>
+	 <xsl:if test="position() > 1">
+	     <xsl:text>, </xsl:text>
+	 </xsl:if>
+         <xsl:apply-templates select="." />
+	 <xsl:if test="position() = count(../dbxref)">
+	     <xsl:text>]</xsl:text>
+	 </xsl:if>
+      </xsl:for-each>
+    </xsl:template>
+
+    <xsl:template name="dbxref" match="dbxref">
+      <xsl:value-of select="dbname"/>
+      <xsl:text>:</xsl:text>
+      <xsl:value-of select="acc"/>
+      <xsl:if test="name != ''">
+         <xsl:text> "</xsl:text>
+           <xsl:value-of select="name"/>
+         <xsl:text>"</xsl:text>
+      </xsl:if>
+    </xsl:template>
+
+    <xsl:template match="def">
+      <xsl:text>def: "</xsl:text>
+      <xsl:value-of select="defstr"/>
+      <xsl:text>"</xsl:text>
+
+      <xsl:call-template name="dbxreflist" />
+      <xsl:text>&#10;</xsl:text>
+    </xsl:template>
+    
+    <xsl:template match="xref_analog|xref_unknown">
+      <xsl:if test="name() = 'xref_unknown'">
+         <xsl:text>xref: </xsl:text>
+      </xsl:if>
+      <xsl:if test="name() = 'xref_analog'">
+         <xsl:text>xref_analog: </xsl:text>
+      </xsl:if>
+      <xsl:call-template name="dbxref" />
+
+      <xsl:text>&#10;</xsl:text>
+    </xsl:template>
+    
+    <!-- generic tag: value template -->
+    <xsl:template
+    match="alt_id|domain|range|comment|subset|replaced_by|consider|format-version|date|saved-by|auto-generated-by|subsetdef|synonym_category|default-namespace|remark">
+      <xsl:if test=". != ''">
+        <xsl:value-of select="name()"/>
+        <xsl:text>: </xsl:text>
+        <xsl:value-of select="."/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:if>
+    </xsl:template>
+
+    <!-- INSTANCES -->
+    <xsl:template match="instance">
+      <xsl:text>[Instance]</xsl:text>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text>id: </xsl:text>
+      <xsl:value-of select="id"/>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text>instance_of: </xsl:text>
+      <xsl:value-of select="instance_of"/>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:for-each select="property_value">
+        <xsl:text>property_value: </xsl:text>
+        <xsl:value-of select="property"/>
+        <xsl:text> </xsl:text>
+        <xsl:choose>
+          <xsl:when test="xsd_type">
+            <xsl:text>"</xsl:text>
+            <xsl:value-of select="value"/>
+            <xsl:text>" </xsl:text>
+            <xsl:value-of select="xsd_type"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="value"/>
+          </xsl:otherwise>
+        </xsl:choose>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:for-each>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:template>
+
+   <xsl:template match="text()|@*">
+   </xsl:template>
+
+</xsl:stylesheet>
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_owl.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_owl.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_owl.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,762 @@
+<?xml version = "1.0"?>
+<!DOCTYPE stylesheet [
+  <!ENTITY oboInOwl "http://www.geneontology.org/formats/oboInOwl#">
+  <!ENTITY oboContent "http://purl.org/obo/owl/">
+  <!ENTITY xref "http://purl.org/obo/owl/">
+  <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
+  <!ENTITY owl "http://www.w3.org/2002/07/owl#">
+  ]>
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
+  xmlns:owl="http://www.w3.org/2002/07/owl#"
+  xmlns:oboInOwl="&oboInOwl;"
+  xmlns:oboContent="&oboContent;"
+  >
+
+  <!-- *********************************************** -->
+  <!-- Imports -->
+  <!-- *********************************************** -->
+
+  
+  <!-- *********************************************** -->
+  <!-- Parameters -->
+  <!-- *********************************************** -->
+  <xsl:param name="localid_prefix"/>
+
+  <!-- *********************************************** -->
+  <!-- XML -->
+  <!-- *********************************************** -->
+
+  <xsl:output indent="yes" method="xml"/>
+
+  <!-- *********************************************** -->
+  <!-- Indexes -->
+  <!-- *********************************************** -->
+  <xsl:key name="k_idspace" match="obo/header/idspace" use="local"/>
+
+  <!-- *********************************************** -->
+  <!-- block passthru -->
+  <!-- *********************************************** -->
+  <xsl:template match="text()|@*">
+  </xsl:template>
+
+
+  <xsl:variable name="default_idspace">
+    <xsl:choose>
+      <xsl:when test="substring-before(//obo/term[1]/id,':')">
+        <xsl:value-of select="substring-before(//obo/term[1]/id,':')"/>
+      </xsl:when>
+      <xsl:when test="substring-before(//obo/typedef[1]/id,':')">
+        <xsl:value-of select="substring-before(//obo/typedef[1]/id,':')"/>
+      </xsl:when>
+      <xsl:when test="substring-before(//obo/instance[1]/id,':')">
+        <xsl:value-of select="substring-before(//obo/instance[1]/id,':')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>obo</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:variable name="xmlbase">
+    <xsl:text>&oboContent;</xsl:text>
+    <!-- ontology must have unique xml base for imports
+         using the ID space seems to have problems, for example with bridging ontologies:
+         an xp ontology may have classes with idspace GO, but may be downloaded from somewhere else.
+
+         For now we use the file path, but there is no guarantee this is dereferenceable (use 303s?)
+         In future, consider a default-idspace tag
+         See also thread " Calling the rdf file an ontology?", july11 2007, semantic-web list
+         
+         -->
+    <xsl:value-of select="substring-before(*/source/source_path,'.')"/>
+  </xsl:variable>
+
+  <!-- *********************************************** -->
+  <!-- Top level -->
+  <!-- *********************************************** -->
+
+  <xsl:template match="/">
+    <rdf:RDF
+      xmlns="&oboContent;"
+      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+      xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+      xmlns:owl="http://www.w3.org/2002/07/owl#"
+      xmlns:xsd="&xsd;"
+      xmlns:oboInOwl="&oboInOwl;"
+      xmlns:oboContent="&oboContent;"
+      xml:base="{$xmlbase}"
+      >
+
+
+      <xsl:comment>
+        <xsl:text>oboInOwl meta-model - we must declare this here, otherwise the ontology will be OWL-Full unless we import &oboInOwl;</xsl:text>
+      </xsl:comment>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasAlternativeId"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasDate"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasVersion"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasDbXref"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasDefaultNamespace"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasOBONamespace"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasDefinition"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasExactSynonym"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasNarrowSynonym"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasBroadSynonym"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasRelatedSynonym"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasSynonymType"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasSubset"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;hasURI"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;inSubset"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;savedBy"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;replacedBy"/>
+      <owl:AnnotationProperty rdf:about="&oboInOwl;consider"/>
+      <owl:Class rdf:about="&oboInOwl;DbXref"/>
+      <owl:Class rdf:about="&oboInOwl;Definition"/>
+      <owl:Class rdf:about="&oboInOwl;Subset"/>
+      <owl:Class rdf:about="&oboInOwl;Synonym"/>
+      <owl:Class rdf:about="&oboInOwl;SynonymType"/>
+      <owl:Class rdf:about="&oboInOwl;ObsoleteClass"/>
+      <owl:ObjectProperty rdf:about="&oboInOwl;ObsoleteProperty"/>
+      
+      <xsl:apply-templates select="obo/header"/>
+      <xsl:apply-templates select="obo/synonym_category"/>
+      <xsl:apply-templates select="obo/term[not(builtin) or builtin!='1']"/>
+      <xsl:apply-templates select="obo/typedef[not(builtin) or builtin!='1']"/>
+      <xsl:apply-templates select="obo/instance"/>
+    </rdf:RDF>
+  </xsl:template>
+
+
+  <!-- *********************************************** -->
+  <!-- GENERAL PURPOSE -->
+  <!-- *********************************************** -->
+
+  <!-- obo names correspond to rdfs labels -->
+  <xsl:template match="name">
+    <!-- all names are presumed to be in english -->
+    <rdfs:label xml:lang="en">
+      <xsl:value-of select="."/>
+    </rdfs:label>
+  </xsl:template>
+
+  <xsl:template mode="label" match="*|@*">
+    <!-- all names are presumed to be in english -->
+    <rdfs:label xml:lang="en">
+      <xsl:value-of select="."/>
+    </rdfs:label>
+  </xsl:template>
+
+  <!-- added 0.4 SA -->
+  <xsl:template match="description">
+    <rdfs:comment rdf:datatype="&xsd;string">
+      <xsl:value-of select="."/>
+    </rdfs:comment>
+  </xsl:template>
+
+  <!-- dbxrefs -->
+
+  <!-- in obo-xml, both dbxref and xref_analog refer to the same thing.
+       note that the tag now used in obo-text-1.2 is just 'xref' -->
+  <xsl:template match="dbxref|xref_analog|xref">
+    <oboInOwl:hasDbXref>
+      <oboInOwl:DbXref>
+        <rdfs:label>
+          <xsl:value-of select="dbname"/>
+          <xsl:text>:</xsl:text>
+          <xsl:value-of select="acc"/>
+        </rdfs:label>
+        <oboInOwl:hasURI rdf:datatype="&xsd;anyURI">
+          <xsl:choose>
+            <!-- typically OBO xrefs are in the form DB:ID - eg EC:1.1.1.1
+                 on occasion the xref is also a URI. This this case it may be
+                 mistakenly mis-parsed as DB=http, ID=//xxx.yyy.zzz/foo
+                 we correct for that here -->
+            <xsl:when test="dbname='URL'">
+              <xsl:value-of select="acc"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>&xref;</xsl:text>
+              <xsl:value-of select="dbname"/>
+              <xsl:text>#</xsl:text>
+              <xsl:value-of select="dbname"/>
+              <xsl:text>_</xsl:text>
+              <xsl:value-of select="acc"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </oboInOwl:hasURI>
+      </oboInOwl:DbXref>
+    </oboInOwl:hasDbXref>
+  </xsl:template>
+
+  <!-- *********************************************** -->
+  <!-- Synonmyms -->
+  <!-- *********************************************** -->
+
+  <xsl:template match="synonym[@scope='exact']">
+    <oboInOwl:hasExactSynonym>
+      <xsl:apply-templates mode="synonym" select="."/>
+    </oboInOwl:hasExactSynonym>
+  </xsl:template>
+
+  <xsl:template match="synonym[@scope='narrow']">
+    <oboInOwl:hasNarrowSynonym>
+      <xsl:apply-templates mode="synonym" select="."/>
+    </oboInOwl:hasNarrowSynonym>
+  </xsl:template>
+
+  <xsl:template match="synonym[@scope='broad']">
+    <oboInOwl:hasBroadSynonym>
+      <xsl:apply-templates mode="synonym" select="."/>
+    </oboInOwl:hasBroadSynonym>
+  </xsl:template>
+
+  <xsl:template match="synonym">
+    <oboInOwl:hasRelatedSynonym>
+      <xsl:apply-templates mode="synonym" select="."/>
+    </oboInOwl:hasRelatedSynonym>
+  </xsl:template>
+
+  <xsl:template mode="synonym" match="*">
+    <oboInOwl:Synonym>
+      <xsl:apply-templates mode="label" select="synonym_text"/>
+      <xsl:apply-templates select="dbxref"/>
+    </oboInOwl:Synonym>
+  </xsl:template>
+  
+  <xsl:template match="synonym_category">
+    <oboInOwl:SynonymType>
+      <xsl:apply-templates select="id"/>
+      <xsl:apply-templates select="name"/>
+      <xsl:apply-templates select="namespace"/>
+    </oboInOwl:SynonymType>
+  </xsl:template>
+
+  <!-- *********************************************** -->
+  <!-- ONTOLOGY METADATA -->
+  <!-- *********************************************** -->
+
+  <!-- A subset is a view over an ontology -->
+  <xsl:template match="subsetdef">
+    <oboInOwl:hasSubset>
+      <oboInOwl:Subset>
+        <xsl:apply-templates select="id"/>
+        <rdfs:comment rdf:datatype="&xsd;string">
+          <xsl:value-of select="name"/>
+        </rdfs:comment>
+        <!-- subsetdefs can in theory have dbxrefs; no existing examples of this -->
+        <xsl:apply-templates select="dbxref"/>
+      </oboInOwl:Subset>
+    </oboInOwl:hasSubset>
+  </xsl:template>
+
+  <xsl:template match="idspace">
+    <oboInOwl:IDSpace>
+      <oboInOwl:local>
+        <xsl:value-of select="local"/>
+      </oboInOwl:local>
+      <oboInOwl:global>
+        <xsl:value-of select="global"/>
+      </oboInOwl:global>
+      <xsl:apply-templates select="comment"/>
+    </oboInOwl:IDSpace>
+  </xsl:template>
+
+
+  <xsl:template match="import">
+    <xsl:choose>
+      <xsl:when test="substring(.,string-length(.)-3) = '.obo'">
+        <owl:imports rdf:resource="{concat(substring(.,0,string-length(.)-3),'.owl')}"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <owl:imports rdf:resource="{.}"/>
+      </xsl:otherwise>
+    </xsl:choose>
+                               
+  </xsl:template>
+
+  <xsl:template match="format-version">
+  </xsl:template>
+
+  <xsl:template match="date">
+    <oboInOwl:hasDate>
+      <xsl:value-of select="."/>
+    </oboInOwl:hasDate>
+  </xsl:template>
+
+  <xsl:template match="saved-by">
+    <oboInOwl:savedBy>
+      <xsl:value-of select="."/>
+    </oboInOwl:savedBy>
+  </xsl:template>
+
+  <xsl:template match="auto-generated-by">
+  </xsl:template>
+
+  <xsl:template match="default-namespace">
+    <oboInOwl:hasDefaultNamespace>
+      <xsl:value-of select="."/>
+    </oboInOwl:hasDefaultNamespace>
+  </xsl:template>
+
+  <xsl:template match="remark">
+    <rdfs:comment>
+      <xsl:value-of select="."/>
+    </rdfs:comment>
+  </xsl:template>
+
+  <!-- *********************************************** -->
+  <!-- MAIN TEMPLATES -->
+  <!-- *********************************************** -->
+
+  <xsl:template match="header">
+
+    <!-- supply the Ontology metadata -->
+    <owl:Ontology rdf:about="">
+      <!-- most of these are not relevant in the OWL
+           transform but are required for round-tripping -->
+      <xsl:apply-templates select="import"/>
+      <xsl:apply-templates select="format-version"/>
+      <xsl:apply-templates select="date"/>
+      <xsl:apply-templates select="saved-by"/>
+      <xsl:apply-templates select="auto-generated-by"/>
+      <xsl:apply-templates select="default-namespace"/>
+      <xsl:apply-templates select="remark"/>
+      <!-- create an instance on OntologySubset for each subsetdef -->
+      <!-- OntologySubsets can be applied to multiple ontologies
+           - they are not specific to the ontology -->
+      <xsl:apply-templates select="subsetdef"/>
+      <rdfs:label>
+        <xsl:value-of select="default-namespace"/>
+      </rdfs:label>
+      <rdfs:comment>
+        <xsl:text>
+          This is an OWL translation of an ontology whose native representational form is .obo. The translation was performed using the oboInOwl xslt library. For details, see http://www.berkeleybop.org/obo-conv.cgi
+        </xsl:text>
+      </rdfs:comment>
+    </owl:Ontology>
+
+    
+  </xsl:template>
+
+  <!-- *********************************************** -->
+  <!-- Terms/classes -->
+  <!-- *********************************************** -->
+
+  <xsl:template match="term">
+    <owl:Class>
+      <xsl:apply-templates select="id"/>
+      <xsl:apply-templates select="name"/>
+      <xsl:apply-templates select="comment"/>
+      <xsl:apply-templates select="subset"/>
+      <xsl:apply-templates select="def"/>
+      <xsl:apply-templates select="synonym"/>
+      <xsl:apply-templates select="namespace"/>
+      <xsl:apply-templates select="alt_id"/>
+      <xsl:apply-templates select="xref_analog|xref"/>
+      <xsl:apply-templates select="lexical_category"/>
+      <xsl:apply-templates select="is_a"/>
+      <xsl:apply-templates select="relationship"/>
+      <xsl:apply-templates select="property_value"/>
+      <xsl:apply-templates select="disjoint_from"/>
+
+      <!-- we treat obsoletes as subclasses of the obsolete class;
+           although they are not truly classes, we must treat them as
+           such to avoid falling into OWL full when we have documents
+           including out-of-date annotations to obsolete terms -->
+      <xsl:if test="is_obsolete='1'">
+        <rdfs:subClassOf rdf:resource="&oboInOwl;ObsoleteClass"/>
+      </xsl:if>
+
+      <!-- logical definitions -->
+      <xsl:if test="count(intersection_of)>0">
+        <owl:equivalentClass>
+          <owl:Class>
+            <owl:intersectionOf>
+              <xsl:attribute name="rdf:parseType">Collection</xsl:attribute>
+              <xsl:apply-templates select="intersection_of"/>
+            </owl:intersectionOf>
+          </owl:Class>
+        </owl:equivalentClass>
+      </xsl:if>
+
+      <xsl:if test="count(union_of)>0">
+        <owl:equivalentClass>
+          <owl:Class>
+            <owl:unionOf>
+              <xsl:attribute name="rdf:parseType">Collection</xsl:attribute>
+              <xsl:apply-templates select="union_of"/>
+            </owl:unionOf>
+          </owl:Class>
+        </owl:equivalentClass>
+      </xsl:if>
+    </owl:Class>
+  </xsl:template>
+
+  <xsl:template match="is_a">
+    <!-- by default we exclude inferred is_a relations -->
+    <!-- this is mostly used for obol output -->
+    <xsl:if test="not(@novel_inferred) and not(@problematic_inferred)">
+      <rdfs:subClassOf>
+        <xsl:apply-templates mode="resource" select="."/>
+      </rdfs:subClassOf>
+    </xsl:if>
+    <xsl:variable name="is_a">
+      <xsl:value-of select="."/>
+    </xsl:variable>
+    <xsl:variable name="this_id">
+      <xsl:value-of select="../id"/>
+    </xsl:variable>
+    <!-- experimental tag : so far implemented by CARO -->
+    <xsl:if test="/obo/header/pairwise-disjoint='true'">
+      <!-- 
+           this search is perhaps inefficient; we could use a key
+           here, but keys are prohibitively expensive on large ontologies
+           -->
+      <xsl:for-each select="//term[is_a=$is_a]/id">
+        <xsl:if test=".!=$this_id">
+          <owl:disjointWith>
+            <xsl:apply-templates mode="resource" select="."/>
+          </owl:disjointWith>
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="relationship">
+    <rdfs:subClassOf>
+      <xsl:apply-templates mode="restriction" select="."/>      
+    </rdfs:subClassOf>
+  </xsl:template>
+    
+  <!-- *** DL Constructs *** -->
+  <!-- currently we support intersection_of, union_of -->
+  <!-- TODO: disjoint_from, complement_of -->
+
+  <xsl:template match="intersection_of">
+    <xsl:choose>
+      <!-- genus -->
+      <!-- some species of obo use is_a(X) in intersection list -->
+      <xsl:when test="type='is_a' or not(type)">
+        <owl:Class>
+          <xsl:apply-templates mode="about" select="to"/>
+        </owl:Class>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates mode="restriction" select="."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+    
+  <xsl:template match="union_of">
+    <owl:Class>
+      <xsl:apply-templates mode="about" select="."/>
+    </owl:Class>
+  </xsl:template>
+    
+  <xsl:template match="disjoint_from">
+    <owl:disjointWith>
+      <xsl:apply-templates mode="resource" select="."/>
+    </owl:disjointWith>
+  </xsl:template>
+    
+  <xsl:template mode="restriction" match="*">
+    <owl:Restriction>
+      <!-- only used if relationship is reified -->
+      <xsl:apply-templates select="@id"/>
+      <owl:onProperty>
+        <owl:ObjectProperty>
+          <xsl:apply-templates mode="about" select="type"/>
+        </owl:ObjectProperty>
+      </owl:onProperty>
+      <!-- TODO: For now we make the assumption that all relations
+           are existential (this is the case for all OBO relations)
+           may not be the case for non-foundry ontologies -->
+      <owl:someValuesFrom>
+        <xsl:apply-templates mode="resource" select="to"/>
+      </owl:someValuesFrom>
+    </owl:Restriction>
+  </xsl:template>
+
+  <xsl:template match="def">
+    <oboInOwl:hasDefinition>
+      <oboInOwl:Definition>
+        <xsl:apply-templates mode="label" select="defstr"/>
+        <xsl:apply-templates select="dbxref"/>
+      </oboInOwl:Definition>
+    </oboInOwl:hasDefinition>
+  </xsl:template>
+
+  <xsl:template match="comment">
+    <rdfs:comment rdf:datatype="&xsd;string">
+      <xsl:value-of select="."/>
+    </rdfs:comment>
+  </xsl:template>
+
+  <xsl:template match="namespace">
+    <oboInOwl:hasOBONamespace>
+      <xsl:value-of select="."/>
+    </oboInOwl:hasOBONamespace>
+  </xsl:template>
+  
+  <xsl:template match="alt_id">
+    <oboInOwl:hasAlternativeId>
+      <xsl:value-of select="."/>
+    </oboInOwl:hasAlternativeId>
+  </xsl:template>
+  
+  <xsl:template match="lexical_category">
+    <oboInOwl:hasLexicalCategory>
+      <xsl:value-of select="."/>
+    </oboInOwl:hasLexicalCategory>
+  </xsl:template>
+
+  <xsl:template match="subset">
+    <oboInOwl:inSubset>
+      <xsl:apply-templates mode="resource" select="."/>
+    </oboInOwl:inSubset>
+  </xsl:template>
+
+
+  <!-- *********************************************** -->
+  <!-- Relations -->
+  <!-- *********************************************** -->
+
+  <!-- In obo-xml, relations and datatype properties are confusingly
+       called "typedef" - the reasons for this are historical -->
+  <!-- These all map to owl properties -->
+
+  <!-- TODO:
+       Relation properties:
+
+       symmetric, anti_symmetric, reflexive
+
+       Transitive over (not yet supported in OWL 1.0 but supported in obo -->
+  
+  <xsl:template match="typedef">
+    <xsl:choose>
+      <xsl:when test="is_transitive=1">
+        <xsl:element name="owl:TransitiveProperty">
+          <xsl:apply-templates mode="detail" select="."/>
+        </xsl:element>
+      </xsl:when>
+      <xsl:when test="is_metadata_tag=1">
+        <xsl:element name="owl:AnnotationProperty">
+          <xsl:apply-templates mode="detail" select="."/>
+        </xsl:element>
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- TODO: datatype properties -->
+        <xsl:element name="owl:ObjectProperty">
+          <xsl:apply-templates mode="detail" select="."/>
+        </xsl:element>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template mode="detail" match="typedef">
+
+    <!-- most of the following are the same as for terms/classes -->
+    <xsl:apply-templates select="id"/>
+    <xsl:apply-templates select="name"/>
+    <xsl:apply-templates select="inverse_of"/>
+    <xsl:apply-templates select="domain"/>
+    <xsl:apply-templates select="range"/>
+    <xsl:apply-templates select="comment"/>
+    <xsl:apply-templates select="subset"/>
+    <xsl:apply-templates select="def"/>
+    <xsl:apply-templates select="synonym"/>
+    <xsl:apply-templates select="namespace"/>
+    <xsl:apply-templates select="alt_id"/>
+    <xsl:apply-templates select="xref_analog|xref"/>
+    <xsl:apply-templates select="lexical_category"/>
+
+    <xsl:if test="is_symmetric=1">
+      <rdf:type rdf:resource="&owl;SymmetricProperty"/>
+    </xsl:if>
+    <xsl:if test="is_functional=1">
+      <rdf:type rdf:resource="&owl;FunctionalProperty"/>
+    </xsl:if>
+
+    <xsl:if test="is_obsolete='1'">
+      <rdfs:subPropertyOf rdf:resource="&oboInOwl;ObsoleteProperty"/>
+    </xsl:if>
+
+    <!-- is_a is used for both subClassOf and subPropertyOf -->
+    <xsl:for-each select="is_a">
+      <rdfs:subPropertyOf>
+        <xsl:apply-templates mode="resource" select="."/>
+      </rdfs:subPropertyOf>
+    </xsl:for-each>
+    <xsl:apply-templates select="property_value"/>
+  </xsl:template>
+
+  <xsl:template match="inverse_of">
+    <owl:inverseOf>
+      <xsl:apply-templates mode="resource" select="."/>
+    </owl:inverseOf>
+  </xsl:template>
+
+  <xsl:template match="domain">
+    <rdfs:domain>
+      <xsl:apply-templates mode="resource" select="."/>
+    </rdfs:domain>
+  </xsl:template>
+
+  <xsl:template match="range">
+    <rdfs:range>
+      <xsl:apply-templates mode="resource" select="."/>
+    </rdfs:range>
+  </xsl:template>
+
+
+  <!-- *********************************************** -->
+  <!-- Instances -->
+  <!-- *********************************************** -->
+
+  <!-- Yes, obo supports instances too -->
+
+  <xsl:template match="instance">
+    <xsl:element name="rdf:Description">
+      <xsl:apply-templates select="id"/>
+      <xsl:apply-templates select="instance_of"/>
+      <xsl:apply-templates select="name"/>
+      <xsl:apply-templates select="namespace"/>
+      <xsl:apply-templates select="property_value"/>
+    </xsl:element>
+  </xsl:template>
+
+  <xsl:template match="instance_of">
+    <rdf:type>
+      <xsl:apply-templates mode="resource" select="."/>
+    </rdf:type>
+  </xsl:template>
+
+  <!-- TODO -->
+  <xsl:template match="property_value">
+    <xsl:variable name="property">
+      <xsl:choose>
+        <xsl:when test="contains(type,':')">
+          <xsl:value-of select="substring-after(type,':')"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="type"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:element name="{$property}">
+      <xsl:if test="contains(type,':')">
+        <xsl:attribute name="xmlns">
+          <xsl:variable name="ns">
+            <xsl:value-of select="substring-before(type,':')"/>
+          </xsl:variable>
+          <xsl:choose>
+            <xsl:when test="key('k_idspace',$ns)">
+              <xsl:value-of select="key('k_idspace',$ns)/global"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>&oboContent;</xsl:text>
+              <xsl:value-of select="$ns"/>
+              <xsl:text>#</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="datatype">
+          <xsl:attribute name="rdf:datatype">
+            <xsl:value-of select="datatype"/>
+          </xsl:attribute>
+          <xsl:value-of select="value"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates mode="resource" select="to"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:element>
+  </xsl:template>
+    
+  <!-- *********************************************** -->
+  <!-- Identifiers -->
+  <!-- *********************************************** -->
+
+  <!-- RDF stuff -->
+  <xsl:template match="id">
+    <xsl:attribute name="rdf:about">
+      <xsl:apply-templates mode="translate-id" select="."/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template match="@id">
+    <xsl:attribute name="rdf:about">
+      <xsl:apply-templates mode="translate-id" select="."/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template mode="resource" match="*">
+    <xsl:attribute name="rdf:resource">
+      <xsl:apply-templates mode="translate-id" select="."/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template mode="about" match="*">
+    <xsl:attribute name="rdf:about">
+      <xsl:apply-templates mode="translate-id" select="."/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template mode="translate-id" match="@*|*">
+    <xsl:variable name="idspace">
+      <xsl:value-of select="substring-before(.,':')"/>
+    </xsl:variable>
+    <xsl:variable name="localid">
+      <xsl:value-of select="substring-after(.,':')"/>
+    </xsl:variable>
+    <xsl:choose>
+      <!-- anonymous classes -->
+      <xsl:when test="$idspace = '_'">
+        <xsl:value-of select="$localid"/>
+      </xsl:when>
+      <!-- is the idspace mapped? -->
+      <xsl:when test="key('k_idspace',substring-before(.,':'))">
+        <xsl:value-of select="key('k_idspace',substring-before(.,':'))/global"/>
+        <xsl:if test="$localid_prefix">
+          <xsl:value-of select="$localid_prefix"/>
+        </xsl:if>
+        <xsl:value-of select="substring-after(.,':')"/>
+      </xsl:when>
+      <!-- idspace is specified but unmapped -->
+      <xsl:when test="substring-before(.,':')">
+        <xsl:text>&oboContent;</xsl:text>
+        <xsl:value-of select="substring-before(.,':')"/>
+        <xsl:text>#</xsl:text>
+        <xsl:value-of select="substring-before(.,':')"/>
+        <xsl:text>_</xsl:text>
+        <xsl:if test="$localid_prefix">
+          <xsl:value-of select="$localid_prefix"/>
+        </xsl:if>
+        <xsl:value-of select="substring-after(.,':')"/>
+      </xsl:when>
+      <!-- no idspace: ID is flat (eg part_of) -->
+      <xsl:otherwise>
+        <xsl:text>&oboContent;</xsl:text>
+        <xsl:choose>
+          <xsl:when test="$localid_prefix">
+            <xsl:value-of select="$localid_prefix"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>obo#</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+
+  <!-- *********************************************** -->
+
+
+</xsl:stylesheet>
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_racer.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_racer.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_racer.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,109 @@
+<?xml version = "1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output indent="yes" method="text"/>
+
+  <xsl:key name="terms" match="term" use="id"/>
+
+  <xsl:template mode="id" match="*">
+    <xsl:value-of select="translate(.,':','_')"/>
+  </xsl:template>
+
+  <xsl:template match="/">
+    <!-- ******** -->
+    <!-- ONTOLOGY -->
+    <!-- ******** -->
+
+    <xsl:text>(in-knowledge-base test x-test)&#10;&#10;</xsl:text>
+    <xsl:text>(signature :atomic-concepts (</xsl:text>
+    <xsl:for-each select="obo/term">
+    <xsl:text>&#10;            </xsl:text>
+      <xsl:apply-templates mode="id" select="id"/>
+      <xsl:text> </xsl:text>
+    </xsl:for-each>
+    <xsl:text>)&#10;   :roles (</xsl:text>
+    <xsl:for-each select="obo/typedef">
+      <xsl:text>&#10;            (</xsl:text>
+      <xsl:apply-templates mode="id" select="id"/>
+      <xsl:text>) </xsl:text>
+    </xsl:for-each>
+    <xsl:text>))&#10;</xsl:text>
+    <xsl:apply-templates select="obo/term"/>
+
+    <!-- ******* -->
+    <!-- QUERIES -->
+    <!-- ******* -->
+
+    <!-- check existing predictions -->
+    <xsl:for-each select="obo/term/is_a[@novel_inferred='true']">
+      <xsl:text>(concept-subsumes? </xsl:text>
+      <xsl:apply-templates mode="id" select="."/>
+      <xsl:text> </xsl:text>
+      <xsl:apply-templates mode="id" select="../id"/>
+      <xsl:text>)&#10;</xsl:text>
+    </xsl:for-each>
+
+    <!-- check for new subsumptions -->
+    <xsl:for-each select="obo/term">
+      <xsl:text>(concept-ancestors </xsl:text>
+      <xsl:apply-templates mode="id" select="id"/>
+      <xsl:text>)&#10;</xsl:text>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="term">
+    <xsl:apply-templates select="is_a"/>
+    <xsl:apply-templates select="relationship"/>
+    <xsl:if test="count(intersection_of)>0">
+      <xsl:text>(equivalent </xsl:text>
+      <xsl:apply-templates mode="id" select="id"/>
+      <xsl:text> (and </xsl:text>
+      <xsl:apply-templates select="intersection_of"/>
+      <xsl:text>))&#10;</xsl:text>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="is_a">
+    <xsl:if test="not(@novel_inferred) and not(@problematic_inferred)">
+      <xsl:text>(implies </xsl:text>
+      <xsl:apply-templates mode="id" select="../id"/>
+      <xsl:text> </xsl:text>
+      <xsl:apply-templates mode="id" select="."/>
+      <xsl:text>)&#10;</xsl:text>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="relationship">
+      <xsl:text>(implies </xsl:text>
+      <xsl:apply-templates mode="id" select="../id"/>
+      <xsl:text> (some </xsl:text>
+      <xsl:value-of select="type"/>
+      <xsl:text> </xsl:text>
+      <xsl:apply-templates mode="id" select="to"/>
+      <xsl:text>))&#10;</xsl:text>
+    
+  </xsl:template>
+    
+  <xsl:template match="intersection_of">
+    <xsl:text> </xsl:text>
+    <xsl:choose>
+      <xsl:when test="type='is_a'">
+        <xsl:apply-templates mode="id" select="to"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>(some </xsl:text>
+        <xsl:value-of select="type"/>
+        <xsl:text> </xsl:text>
+        <xsl:apply-templates mode="id" select="to"/>
+        <xsl:text>)</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  
+  <xsl:template match="text()|@*">
+  </xsl:template>
+
+</xsl:stylesheet>
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_simple_owl.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_simple_owl.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_simple_owl.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,162 @@
+<?xml version = "1.0"?>
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
+  xmlns:owl="http://www.w3.org/2002/07/owl#" 
+  xml:base="http://www.geneontology.org/owl">
+  
+  <xsl:output indent="yes" method="xml"/>
+
+  <xsl:key name="terms" match="term" use="id"/>
+
+  <xsl:template match="/">
+    <rdf:RDF
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
+  xmlns:owl="http://www.w3.org/2002/07/owl#" 
+  xmlns="http://www.geneontology.org/owl#" 
+  xml:base="http://www.geneontology.org/owl">
+      <owl:Ontology rdf:about=""/>
+      <xsl:apply-templates select="obo/term"/>
+      <xsl:apply-templates select="obo/typedef"/>
+    </rdf:RDF>
+  </xsl:template>
+
+  <xsl:template match="term">
+    <xsl:element name="owl:Class">
+      <xsl:apply-templates mode="rdf-id" select="id"/>
+      <rdfs:label xml:lang="en">
+        <xsl:value-of select="name"/>
+      </rdfs:label>
+      <xsl:apply-templates select="def/defstr"/>
+      <xsl:apply-templates select="is_a"/>
+      <xsl:apply-templates select="relationship"/>
+      <xsl:apply-templates mode="annotation" select="property_value"/>
+      <xsl:if test="count(intersection_of)>0">
+        <owl:equivalentClass>
+          <owl:Class>
+            <owl:intersectionOf>
+              <xsl:attribute name="rdf:parseType">Collection</xsl:attribute>
+              <xsl:apply-templates select="intersection_of"/>
+            </owl:intersectionOf>
+          </owl:Class>
+        </owl:equivalentClass>
+      </xsl:if>
+    </xsl:element>
+  </xsl:template>
+
+  <xsl:template match="typedef">
+    <xsl:choose>
+      <xsl:when test="is_metadata_tag=1">
+        <xsl:element name="owl:AnnotationProperty">
+          <xsl:apply-templates mode="detail" select="."/>
+        </xsl:element>
+      </xsl:when>
+      <xsl:when test="is_transitive=1">
+        <xsl:element name="owl:TransitiveProperty">
+          <xsl:apply-templates mode="detail" select="."/>
+        </xsl:element>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:element name="owl:ObjectProperty">
+          <xsl:apply-templates mode="detail" select="."/>
+        </xsl:element>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template mode="detail" match="typedef">
+      <xsl:apply-templates mode="rdf-id" select="id"/>
+      <rdfs:label>
+        <xsl:value-of select="name"/>
+      </rdfs:label>
+      <xsl:apply-templates select="def/defstr"/>
+      <xsl:for-each select="is_a">
+        <rdfs:subPropertyOf>
+          <xsl:apply-templates mode="rdf-resource" select="."/>
+        </rdfs:subPropertyOf>
+      </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="is_a">
+    <xsl:if test="not(@novel_inferred) and not(@problematic_inferred)">
+      <rdfs:subClassOf>
+        <xsl:apply-templates mode="rdf-resource" select="."/>
+      </rdfs:subClassOf>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="relationship">
+    <rdfs:subClassOf>
+      <xsl:apply-templates mode="restriction" select="."/>      
+    </rdfs:subClassOf>
+  </xsl:template>
+    
+  <xsl:template match="property_value" mode="annotation">
+    <xsl:element name="{type}">
+      <xsl:apply-templates mode="rdf-resource" select="to"/>
+    </xsl:element>
+  </xsl:template>
+    
+  <xsl:template match="intersection_of">
+    <xsl:choose>
+      <xsl:when test="type='is_a' or not(type)">
+        <owl:Class>
+          <xsl:apply-templates mode="rdf-about" select="to"/>
+        </owl:Class>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates mode="restriction" select="."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template mode="restriction" match="*">
+    <owl:Restriction>
+      <owl:onProperty>
+        <owl:ObjectProperty>
+          <xsl:apply-templates mode="rdf-about" select="type"/>
+        </owl:ObjectProperty>
+      </owl:onProperty>
+      <owl:someValuesFrom>
+        <xsl:apply-templates mode="rdf-resource" select="to"/>
+      </owl:someValuesFrom>
+    </owl:Restriction>
+  </xsl:template>
+  
+  <xsl:template match="text()|@*">
+  </xsl:template>
+
+<xsl:template match="defstr">
+	<rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
+      		<xsl:value-of select="."/>
+      </rdfs:comment>
+</xsl:template>
+
+  <!-- RDF stuff -->
+  <xsl:template mode="rdf-id" match="*">
+    <xsl:attribute name="rdf:ID">
+      <xsl:value-of select="translate(.,':','_')"/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template mode="rdf-about" match="*">
+    <xsl:attribute name="rdf:about">
+      <xsl:text>#</xsl:text>
+      <xsl:value-of select="translate(.,':','_')"/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template mode="rdf-resource" match="*">
+    <xsl:attribute name="rdf:resource">
+      <xsl:text>#</xsl:text>
+      <xsl:value-of select="translate(.,':','_')"/>
+    </xsl:attribute>
+  </xsl:template>
+
+</xsl:stylesheet>
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_summary_table.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_summary_table.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/oboxml_to_summary_table.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,81 @@
+<?xml version = "1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- transforms OBO XML format to a simple tabular summary
+
+       cjm 2004
+
+       -->
+
+  <xsl:output indent="yes" method="text"/>
+
+  <xsl:template match="/">
+    <xsl:text>#ID&#9;NAME&#9;NAMESPACE&#9;OBS&#9;IS_A&#9;REL&#9;DEF&#9;SYNS&#9;ALT-IDS&#9;XREFS&#10;</xsl:text>
+    <xsl:apply-templates select="*/term"/>
+  </xsl:template>
+
+  <xsl:template match="term">
+    <xsl:value-of select="id"/>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:value-of select="name"/>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:value-of select="namespace"/>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:choose>
+      <xsl:when test="is_obsolete">
+        <xsl:text>OBSOLETE</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>CURRENT</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:apply-templates select="is_a"/>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:apply-templates select="relationship"/>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:apply-templates select="def"/>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:apply-templates select="synonym"/>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:apply-templates select="alt_id"/>
+    <xsl:text>&#9;</xsl:text>
+    <xsl:apply-templates select="xref_analog"/>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="is_a|alt_id">
+    <xsl:value-of select="."/>
+    <xsl:text>;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="relationship">
+    <xsl:value-of select="type"/>
+    <xsl:text>=</xsl:text>
+    <xsl:value-of select="to"/>
+    <xsl:text>;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="synonym">
+    <xsl:value-of select="synonym_text"/>
+  </xsl:template>
+
+  <xsl:template match="def">
+    <xsl:value-of select="defstr"/>
+  </xsl:template>
+
+  <xsl:template match="xref_analog">
+    <xsl:value-of select="dbname"/>
+    <xsl:text>:</xsl:text>
+    <xsl:value-of select="acc"/>
+    <xsl:text>;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="text()|@*">
+  </xsl:template>
+
+
+</xsl:stylesheet>
+
+
+

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/owl_to_oboxml.xsl
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/owl_to_oboxml.xsl	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/GO/xsl/owl_to_oboxml.xsl	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
+  xmlns:owl="http://www.w3.org/2002/07/owl#" 
+  version="1.0"
+  >
+
+  <xsl:strip-space elements="*"/>
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:template match="/">
+    <obo>
+      <xsl:apply-templates select="rdf:RDF"/>
+    </obo>
+  </xsl:template>
+  <xsl:template match="rdf:RDF">
+    <xsl:apply-templates select="owl:Ontology"/>
+    <xsl:apply-templates select="owl:Class" mode="default"/>
+    <xsl:apply-templates select="owl:ObjectProperty|owl:TransitiveProperty"/>
+    <xsl:apply-templates select="owl:DatatypeProperty"/>
+    <xsl:apply-templates select="owl:FunctionalProperty"/>
+  </xsl:template>
+
+  <xsl:template match="owl:Ontology">
+    <header>
+      <remark>
+        <xsl:value-of select="rdfs:comment"/>
+      </remark>
+      <default_namespace>
+        <xsl:value-of select="rdfs:label"/>
+      </default_namespace>
+    </header>
+  </xsl:template>
+
+  <xsl:template match="owl:ObjectProperty|owl:DatatypeProperty|owl:FunctionalProperty|owl:TransitiveProperty">
+    <typedef>
+      <id>
+        <xsl:value-of select="substring-after(@rdf:about,'#')"/>
+        <xsl:value-of select="@rdf:ID"/>        
+      </id>
+      <name>
+        <xsl:choose>
+          <xsl:when test="rdfs:label">
+            <xsl:value-of select="rdfs:label"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="@rdf:ID"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </name>
+      <xsl:if test="name(..) = 'owl:TransitiveProperty'">
+        <is_transitive>true</is_transitive>
+      </xsl:if>
+      <xsl:apply-templates select="rdfs:subPropertyOf"/>
+      <xsl:apply-templates select="rdfs:domain"/>
+      <xsl:apply-templates select="rdfs:range"/>
+      <xsl:apply-templates mode="namespace" select="../owl:Ontology"/>
+    </typedef>
+  </xsl:template>
+
+  <xsl:template match="rdfs:comment">
+    <comment>
+      <xsl:value-of select="."/>
+    </comment>
+  </xsl:template>
+
+  <xsl:template match="rdfs:subPropertyOf">
+    <is_a>
+      <xsl:value-of select="substring-after(owl:Class/@rdf:about,'#')"/>
+      <xsl:value-of select="substring-after(@rdf:resource,'#')"/>
+      <xsl:value-of select="owl:Class/@rdf:ID"/>
+    </is_a>
+  </xsl:template>
+
+  <xsl:template match="rdfs:domain">
+    <domain>
+      <xsl:value-of select="substring-after(owl:Class/@rdf:about,'#')"/>
+      <xsl:value-of select="substring-after(@rdf:resource,'#')"/>
+      <xsl:value-of select="owl:Class/@rdf:ID"/>
+    </domain>
+  </xsl:template>
+
+  <xsl:template match="rdfs:range">
+    <range>
+      <xsl:value-of select="substring-after(owl:Class/@rdf:about,'#')"/>
+      <xsl:value-of select="substring-after(@rdf:resource,'#')"/>
+      <xsl:value-of select="owl:Class/@rdf:ID"/>
+    </range>
+  </xsl:template>
+
+  <!-- map owl:Class to term -->
+  <xsl:template match="owl:Class" mode="default">
+    <term>
+      <id>
+        <xsl:value-of select="substring-after(@rdf:about,'#')"/>
+        <xsl:value-of select="@rdf:ID"/>
+      </id>
+      <name>
+        <xsl:choose>
+          <xsl:when test="rdfs:label">
+            <xsl:value-of select="rdfs:label"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="@rdf:ID"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </name>
+      <!-- both normal subclasses and restrictions are under subclass -->
+      <xsl:apply-templates select="owl:equivalentClass"/>
+      <xsl:apply-templates select="owl:intersectionOf"/>
+      <xsl:apply-templates select="rdfs:subClassOf"/>
+      <xsl:apply-templates select="owl:disjointWith"/>
+      <xsl:apply-templates mode="namespace" select="../owl:Ontology"/>
+    </term>
+  </xsl:template>
+
+  <xsl:template match="*" mode="namespace">
+    <xsl:if test="rdfs:label">
+      <namespace>
+        <xsl:value-of select="rdfs:label"/>
+      </namespace>
+    </xsl:if>
+  </xsl:template>
+
+  <!-- embedded in equivalentClass -->
+  <xsl:template match="owl:Class" mode="in-equiv">
+    <xsl:apply-templates select="owl:intersectionOf"/>
+  </xsl:template>
+
+  <!-- equivalentClass -->
+  <xsl:template match="owl:equivalentClass">
+    <xsl:apply-templates select="owl:Class" mode="in-equiv"/>
+    
+    <!-- restrictions may be inside equivalentClass -->
+    <xsl:apply-templates select="owl:Restriction"/>
+  </xsl:template>
+
+
+
+  <!-- is_as and relationships -->
+  <xsl:template match="rdfs:subClassOf">
+    <xsl:choose>
+      <xsl:when test="not(owl:Restriction)">
+        <is_a>
+          <xsl:value-of select="substring-after(owl:Class/@rdf:about,'#')"/>
+          <xsl:value-of select="substring-after(@rdf:resource,'#')"/>
+          <xsl:value-of select="owl:Class/@rdf:ID"/>
+        </is_a>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="owl:Restriction"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- map owl:Restriction to relationships -->
+  <xsl:template match="owl:Restriction">
+
+    <!-- restrictions may be object, datatype or functional properties -->
+
+    <!-- ObjectProperty - normal obo relationship -->
+    <xsl:if test="owl:onProperty/owl:ObjectProperty">
+      <relationship>
+        <type>
+          <!-- rdf:about or rdf:ID can be used -->
+          <xsl:value-of select="owl:onProperty/owl:ObjectProperty/@rdf:ID"/>
+          <xsl:value-of select="substring-after(owl:onProperty/owl:ObjectProperty/@rdf:about,'#')"/>
+          <xsl:value-of select="substring-after(owl:onProperty/owl:ObjectProperty/@rdf:resource,'#')"/>
+        </type>
+        <xsl:apply-templates select="owl:allValuesFrom|owl:someValuesFrom|owl:hasValue"/>
+        <xsl:apply-templates select="owl:maxCardinality"/>
+      </relationship>
+    </xsl:if>
+
+    <!-- Functional Property -->
+    <xsl:if test="owl:onProperty/owl:FunctionalProperty">
+      <functional_property>
+        <type>
+          <!-- rdf:about or rdf:ID can be used -->
+          <xsl:value-of select="owl:onProperty/owl:FunctionalProperty/@rdf:ID"/>
+          <xsl:value-of select="substring-after(owl:onProperty/owl:FunctionalProperty/@rdf:about,'#')"/>
+          <xsl:value-of select="substring-after(owl:onProperty/owl:FunctionalProperty/@rdf:resource,'#')"/>
+        </type>
+        <xsl:apply-templates select="owl:allValuesFrom|owl:someValuesFrom|owl:hasValue"/>
+        <xsl:apply-templates select="owl:maxCardinality"/>
+      </functional_property>
+    </xsl:if>
+
+    <xsl:if test="owl:onProperty/owl:DatatypeProperty">
+      <xsl:comment>
+        ignoring datatype property
+        <xsl:value-of select="substring-after(owl:onProperty/owl:DatatypeProperty/@rdf:about,'#')"/>
+        <xsl:text>&#10;</xsl:text>
+      </xsl:comment>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="owl:allValuesFrom|owl:someValuesFrom">
+    <to>
+      <xsl:apply-templates mode="resolve-id" select="."/>
+    </to>
+  </xsl:template>
+
+  <xsl:template match="owl:hasValue">
+    <to>
+      <xsl:value-of select="*/@rdf:ID"/>
+      <xsl:value-of select="substring-after(*/@rdf:about,'#')"/>    
+      <xsl:value-of select="substring-after(@rdf:resource,'#')"/>    
+      <xsl:value-of select="@rdf:datatype"/>    
+    </to>
+  </xsl:template>
+
+  <xsl:template match="owl:maxCardinality">
+    <max_cardinality>
+      <xsl:value-of select="."/>
+    </max_cardinality>
+  </xsl:template>
+
+  <xsl:template match="owl:intersectionOf">
+    <xsl:for-each select="owl:Class">
+      <intersection_of>
+        <type>is_a</type>
+        <to>
+          <xsl:apply-templates mode="resolve-id" select="."/>
+        </to>
+      </intersection_of>            
+    </xsl:for-each>
+    <xsl:for-each select="owl:Restriction">
+      <intersection_of>
+        <type>
+          <xsl:choose>
+            <!-- todo: not exhaustive enough -->
+            <xsl:when test="owl:onProperty/owl:ObjectProperty">
+              <xsl:apply-templates mode="resolve-id" select="owl:onProperty/owl:ObjectProperty"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:apply-templates mode="resolve-id" select="owl:onProperty"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </type>
+        <to>
+          <!-- warning!! currently obo does not distinguish existential/universal -->
+          <xsl:choose>
+            <xsl:when test="owl:allValuesFrom|owl:someValuesFrom|owl:hasValue">
+              <xsl:apply-templates mode="resolve-id" 
+                select="owl:allValuesFrom|owl:someValuesFrom|owl:hasValue"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:message terminate="yes">
+                <xsl:text>relationship to unresolvable</xsl:text>
+                <xsl:copy-of select="."/>
+              </xsl:message>
+            </xsl:otherwise>
+          </xsl:choose>
+        </to>
+      </intersection_of>            
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="owl:disjointWith">
+    <disjoint_with>
+      <xsl:apply-templates mode="resolve-id" select="owl:Class"/>
+    </disjoint_with>
+  </xsl:template>
+
+  <xsl:template mode="resolve-id" match="*|@*">
+    <xsl:choose>
+      <!-- multiple ways of refering to something -->
+      <xsl:when test="owl:Class">
+        <!-- class object - recursively resolve -->
+        <xsl:apply-templates mode="resolve-id" select="owl:Class"/>
+      </xsl:when>
+      <xsl:when test="@rdf:ID">
+        <xsl:value-of select="@rdf:ID"/>
+      </xsl:when>
+      <xsl:when test="substring-after(@rdf:about,'#')">
+        <xsl:value-of select="substring-after(@rdf:about,'#')"/>
+      </xsl:when>
+      <xsl:when test="substring-after(@rdf:resource,'#')">    
+        <xsl:value-of select="substring-after(@rdf:resource,'#')"/>    
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:message>
+          <xsl:text>Cannot resolve ID: </xsl:text>
+          <xsl:copy-of select="."/>
+        </xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/go-perl.pod
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/go-perl.pod	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/libgo-perl/usr/share/perl5/go-perl.pod	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,302 @@
+# $Id: go-perl.pod,v 1.16 2007/02/05 20:14:08 cmungall Exp $
+#
+# see also - http://www.geneontology.org
+#          - http://www.godatabase.org/dev
+#
+# You may distribute this module under the same terms as perl itself
+
+=head1 NAME
+
+go-perl           - perl modules for GO and other OBO ontologies
+
+=head1 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", $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 -
+
+=head1 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:
+
+=over
+
+=item parsers
+
+Biological ontologies and associated data come in assorted formats. See:
+
+L<GO::Parser>
+
+=item 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
+
+=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:
+
+L<GO::Model::Term> -- a node/term within an ontology
+
+L<GO::Model::Graph> -- collection of terms and the relationships between them
+
+L<GO::Model::Relationship> -- a typed relationship between two terms
+
+L<GO::Model::Xref> -- a database xref, for a term or any other object
+
+L<GO::Model::Association> -- an association between a term and a gene product
+
+L<GO::Model::GeneProduct> -- a gene or product of a gene or similar annotated entity
+
+L<GO::Model::Evidence> -- supporting evidence for an association
+
+L<GO::Model::Seq> -- a biological sequence of residues for a gene product
+
+=begin html
+
+<img src="http://geneontology.cvs.sourceforge.net/*checkout*/geneontology/go-dev/go-perl/doc/gomodel.png"/>
+
+=end html
+
+=back
+
+=head2 SIMPLE PROGRAMMERS INTERFACE
+
+L<GO::Basic>
+
+simple procedural access to GO files
+
+=head1 SCRIPTS
+
+These scripts come as part of the go-perl distribution
+
+=over
+
+=item 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 L<map2slim>
+
+=item go-dag-summary.pl
+
+Generates a summary of the DAG structure of an ontology file
+
+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 L<go-dag-summary.pl>
+
+=item go-show-paths-to-root.pl
+
+Will show all possible paths from a term to the root/top in the
+ontology
+
+for full instructions, see L<go-show-paths-to-root.pl>
+
+=item go-apply-xslt
+
+Will apply a GO XSL transform (by name) on an OBO-XML file
+
+For a full list of XSLs available, see
+L<http://www.godatabase.org/xml/xsl>
+
+=item go-export-graph.pl
+
+Writes an obo file out as an ascii-tree, a graphviz PNG or other format
+
+for full instructions, see L<go-export-graph.pl>
+
+=item go-show-assocs-by-node.pl
+
+given a GO ontology file and an association file and a term ID, will
+list all products associated to that ID
+
+for full instructions, see L<go-show-assocs-by-node.pl>
+
+=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 "subset" filter in the ontology
+file (eg a GO "slim" or subset), or a user-defined filter.
+
+The subset can be exported in any format, including a graphical image
+
+for full instructions, see L<go-filter-subset.pl>
+
+=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.
+
+for full instructions, see L<go2fmt.pl>
+
+=item go2chadoxml
+
+converts a file in any valid go/obo format to chadoxml. See also L<go2fmt.pl>
+
+=item go2godb_prestore
+
+converts a file in any valid go/obo format to an xml format that is
+isomorphic to the GO MySQL Db schema, and can be loaded with
+L<DBIx::DBStag>. See also L<go2fmt.pl>
+
+=item go2error_report
+
+converts a file in any valid go/obo format to error_report. See also L<go2fmt.pl>
+
+=item go2obo_test (alias: go2obo)
+
+converts a file in any valid go/obo format to obo. See also L<go2fmt.pl>
+
+=item go2obo_html
+
+converts a file in any valid go/obo format to obo_html. See also L<go2fmt.pl>
+
+=item go2obo_xml  (alias: go2xml)
+
+converts a file in any valid go/obo format to obo_xml. See also L<go2fmt.pl>
+
+=item go2owl
+
+converts a file in any valid go/obo format to owl. See also L<go2fmt.pl>
+
+=item go2pathlist
+
+converts a file in any valid go/obo format to pathlist. See also L<go2fmt.pl>
+
+=item go2prolog
+
+converts a file in any valid go/obo format to prolog. See also L<go2fmt.pl>
+
+=item go2rdfxml
+
+converts a file in any valid go/obo format to rdfxml. See also L<go2fmt.pl>
+
+=item go2summary
+
+converts a file in any valid go/obo format to summary. See also L<go2fmt.pl>
+
+=item go2sxpr
+
+converts a file in any valid go/obo format to sxpr. See also L<go2fmt.pl>
+
+=item go2tbl
+
+converts a file in any valid go/obo format to tbl. See also L<go2fmt.pl>
+
+=item go2text_html
+
+converts a file in any valid go/obo format to text_html. See also L<go2fmt.pl>
+
+=back
+
+=head1 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:
+
+=over
+
+=item go-perl
+
+This package
+
+http://www.godatabase.org/dev/go-perl/doc/go-perl-doc.html
+
+=item 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
+
+L<GO::AppHandle>
+
+=item amigo
+
+Ontology browser, written in perl
+
+Requires installation of both go-perl and go-db-perl
+
+=item java
+
+The DAG-Edit curation tool
+
+http://www.godatabase.org/dev
+
+=item 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
+
+=item sql
+
+Schema and SQL code for the GO database
+
+http://www.godatabase.org/dev/sql/doc/godb-sql-doc.html
+
+=back
+
+=head1 AUTHORS
+
+(C) Chris Mungall 2000-2006
+
+This module is free software. You may distribute under the same terms
+as perl itself.
+
+=cut
+
+package go-perl;
+$VERSION='0.07';
+1;

Added: trunk/packages/libgo-perl/trunk/debian/rules
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/rules	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/rules	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,47 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+	# the VENDORARCHEXP and INSTALLVENDORARCH
+	# variables are set to avoid the creation
+	# of /usr/lib/perl5
+	perl Makefile.PL \
+		INSTALLDIRS=vendor \
+		VENDORARCHEXP=/usr/share/perl5 \
+		INSTALLVENDORARCH=/usr/share/perl5
+	$(MAKE)
+# Got to understand how to run the test
+#	$(MAKE) test
+	touch $@
+
+clean: distclean
+distclean:
+	dh_testdir
+	dh_testroot
+	dh_clean Makefile.old build-stamp
+	[ ! -f Makefile ] || $(MAKE) distclean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	$(MAKE) install PREFIX=$(CURDIR)/debian/libgo-perl/usr
+
+binary-arch: build install
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs Changes
+	dh_installdocs doc/*
+	dh_compress
+	dh_fixperms
+	dh_perl
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install


Property changes on: trunk/packages/libgo-perl/trunk/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/packages/libgo-perl/trunk/debian/watch
===================================================================
--- trunk/packages/libgo-perl/trunk/debian/watch	                        (rev 0)
+++ trunk/packages/libgo-perl/trunk/debian/watch	2008-03-14 08:27:59 UTC (rev 1589)
@@ -0,0 +1,2 @@
+version=3
+http://search.cpan.org/CPAN/authors/id/C/CM/CMUNGALL/go-perl-([\d\.]*)\.tar.gz




More information about the debian-med-commit mailing list