[Bioperl-l] Bio::Ontology - parsing GO files

Hilmar Lapp hlapp at gmx.net
Tue Feb 3 01:32:58 EST 2004

On Monday, February 2, 2004, at 01:45  PM, James Mitchell wrote:

> my $parser = Bio::Ontology::SimpleGOEngine->new

Is this still in the documentation? If so, I apologize. You parse 
ontologies analogous to other IO APIs in bioperl:

	$ont_stream = Bio::OntologyIO->new(-format => 'go',
                                         -files => [....],
                                         -defs_file => $deffile);

and then

	while(my $ont = $ont_stream->next_ontology()) {
		# do something with $ont (it's a Bio::Ontology::OntologyI)

Most ontology streams will only have one ontology ever. So, for GO you 
could as well say

	my $go_ont = $ont_stream->next_ontology();



Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757

More information about the Bioperl-l mailing list