NAME
OWL::Simple::Parser
SYNOPSIS
use OWL::Simple::Parser;
# load Experimental Factor Ontology
my $parser = OWL::Simple::Parser->new( owlfile => 'efo.owl',
synonym_tag => 'alternative_term' );
# parse file
$parser->parse();
# iterate through all the classes
for my $id (keys %{ $parser->class }){
my $OWLClass = $parser->class->{$id};
print $id . ' ' . $OWLClass->label . "\n";
# list synonyms
for my $syn (@{ $OWLClass->synonyms }){
print "\tsynonym - $syn\n";
}
# list definitions
for my $def (@{ $OWLClass->definitions }){
print "\tdef - $def\n";
}
# list parents
for my $parent (@{ $OWLClass->subClassOf }){
print "\tsubClassOf - $parent\n";
}
}
DESCRIPTION
A simple OWL parser loading accessions, labels and synonyms and exposes them as a collection of OWL::Simple::Class objects.
In the constructor specify the owlfile to be loaded and an optional synonym_tag used in the ontology (example FULL_SYN for NCI Thesaurus).
METHODS
- class_count()
-
Number of classes loaded by the parser.
- synonyms_count()
-
Number of synonyms loaded by the parser.
- class
-
Hash collection of all the OWL::Simple::Class objects
AUTHOR
Tomasz Adamusiak 2010
COPYRIGHT AND LICENSE
Copyright (c) 2010 European Bioinformatics Institute. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under GPLv3.
This software is provided "as is" without warranty of any kind.