OBO::Parser::OBOParser - An OBO (Open Biomedical Ontologies) file parser.
use OBO::Parser::OBOParser;
use strict;
my $my_parser = OBO::Parser::OBOParser->new;
my $ontology = $my_parser->work("cco.obo");
$ontology->has_term($ontology->get_term_by_id("CCO:B9999993"));
$ontology->has_term($ontology->get_term_by_name("small molecule"));
$ontology->get_relationship_by_id("CCO:B9999998_is_a_CCO:B0000000")->type() eq "is_a";
$ontology->get_relationship_by_id("CCO:B9999996_part_of_CCO:B9999992")->type() eq "part_of";
my $ontology2 = $my_parser->work("cco.obo");
$ontology2->has_term($ontology2->get_term_by_id("CCO:B9999993"));
$ontology2->has_term($ontology2->get_term_by_name("cell cycle"));
$ontology2->get_relationship_by_id("CCO:P0000274_is_a_CCO:P0000262")->type() eq "is_a";
$ontology2->get_relationship_by_id("CCO:P0000274_part_of_CCO:P0000271")->type() eq "part_of";
An OBOParser object works on parsing an OBO file.
Erick Antezana, <erant@psb.ugent.be>
Copyright (C) 2006, 2007, 2008 by Erick Antezana
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
Usage - $OBOParser->work($obo_file_path) Returns - the parsed OBO ontology Args - the OBO file to be parsed Function - parses an OBO file
To install OBO::Util::Set, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OBO::Util::Set
CPAN shell
perl -MCPAN -e shell install OBO::Util::Set
For more information on module installation, please visit the detailed CPAN module installation guide.