Bio::Ontology::Ontology 1.4 review

Download
by rbytes.net on

Bio::Ontology::Ontology is a standard implementation of an Ontology. SYNOPSIS use Bio::Ontology::Ontology; # create

License: Perl Artistic License
File size: 4788K
Developer: Hilmar Lapp
0 stars award from rbytes.net

Bio::Ontology::Ontology is a standard implementation of an Ontology.

SYNOPSIS

use Bio::Ontology::Ontology;

# create ontology object
my $ont = Bio::Ontology::Ontology->new(-name => "OBF");

# add terms, relationships ...
my $bp = Bio::Ontology::Term->new(-name => "Bioperl");
my $obf = Bio::Ontology::Term->new(-name => "OBF");
my $partof = Bio::Ontology::RelationshipType->get_instance("PART_OF");
$ont->add_term($bp);
$ont->add_term($obf);
$ont->add_relationship($bp, $obf, $partof);

# then query
my @terms = $ont->get_root_terms(); # "OBF"
my @desc = $ont->get_descendant_terms($terms[0], $partof); # "Bioperl"
# ... see methods for other ways to query

# for advanced users, you can re-use the query engine outside of an
# ontology to let one instance manage multiple ontologies
my $ont2 = Bio::Ontology::Ontology->new(-name => "Foundations",
-engine => $ont->engine());

This is a no-frills implementation of Bio::Ontology::OntologyI.

The query functions are implemented by delegation to an OntologyEngineI implementation.

Requirements:
Perl

Bio::Ontology::Ontology 1.4 search tags