NAME
Bio::OntologyIO::obo - parser for OBO flat-file format
SYNOPSIS
use Bio::OntologyIO;# do not use directly -- use via Bio::OntologyIOmy $parser = Bio::OntologyIO->new( -format => "obo",-file => "gene_ontology.obo");while(my $ont = $parser->next_ontology()) {print "read ontology ",$ont->name()," with ",scalar($ont->get_root_terms), " root terms, and ",scalar($ont->get_all_terms), " total terms, and ",scalar($ont->get_leaf_terms), " leaf terms\n";}
DESCRIPTION
Parser for OBO flat-file format. 'obo' example:
format-version: 1.2ontology: so/dev/externalDerivedproperty_value: owl:versionInfo "$Revision: 80 $" xsd:stringdefault-namespace: SO[Term]id: SO_0000343name: matchdef: "A region of sequence, aligned to another sequence." [][Term]id: SO_0000039name: match_partdef: "A part of a match." []is_a: SO_0000343
Specification: <http://www.geneontology.org/GO.format.obo-1_2.shtml>.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing lists Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR
Sohel Merchant
Email: [email protected]
Address:
Northwestern UniversityCenter for Genetic Medicine (CGM), dictyBaseSuite 1206,676 St. Clair stChicago IL 60611
CONTRIBUTOR
Hilmar Lapp, hlapp at gmx.netChris Mungall, cjm at fruitfly.orgBrian Osborne, [email protected]
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : $parser = Bio::OntologyIO->new(-format => "obo",-file => "gene_ontology.obo");Function: Creates a new dagflat parser.Returns : A new dagflat parser object, implementing Bio::OntologyIO.Args : -file => a single ontology flat file holding theterms, descriptions and relationships-ontology_name => the name of the ontology; if not specified theparser will assign the name of the ontology as thedefault-namespace header value from the OBO file.-engine => the Bio::Ontology::OntologyEngineI objectto be reused (will be created otherwise); notethat every Bio::Ontology::OntologyI willqualify as well since that one inherits from theformer.
See Bio::OntologyIO.
ontology_name
Title : ontology_nameUsage : $obj->ontology_name($newval)Function: Get/set the name of the ontology parsed by this module.Example :Returns : value of ontology_name (a scalar)Args : on set, new value (a scalar or undef, optional)
parse
Title : parse()Usage : $parser->parse();Function: Parses the files set with "new" or with methodsdefs_file and _flat_files.Normally you should not need to call this method as it willbe called automatically upon the first call tonext_ontology().Returns : Bio::Ontology::OntologyEngineIArgs :
next_ontology
Title : next_ontologyUsage :Function: Get the next available ontology from the parser. This is themethod prescribed by Bio::OntologyIO.Example :Returns : An object implementing Bio::Ontology::OntologyI, and nothing ifthere is no more ontology in the input.Args :
close
Title : closeUsage :Function: Closes this ontology stream and associated file handles.Clients should call this method especially when they writeontologies.We need to override this here in order to close the filehandle for the term definitions file.Example :Returns : noneArgs : none