- Export a given ontology to OWL format (oboInOwl mapping):
use OBO::Parser::OBOParser;
use strict;
my $my_parser = OBO::Parser::OBOParser->new();
my $o = $my_parser->work("gene_ontology.obo");
# export to OWL: gene_ontology.owl
open (FH, ">gene_ontology_by_cco.owl");
$o->export(\*FH, 'owl');
close FH;
- Export a given ontology to GML format:
use OBO::Parser::OBOParser;
use strict;
my $my_parser = OBO::Parser::OBOParser->new();
my $o = $my_parser->work("gene_ontology.obo");
# export to GML: gene_ontology.gml
open (FH, ">gene_ontology_by_cco.gml");
$o->export(\*FH, 'gml');
close FH;
- Export a given ontology to XML format:
use OBO::Parser::OBOParser;
use strict;
my $my_parser = OBO::Parser::OBOParser->new();
my $o = $my_parser->work("gene_ontology.obo");
# export to XML: gene_ontology.xml
open (FH, ">gene_ontology_by_cco.xml");
$o->export(\*FH, 'xml');
close FH;
- Export a given ontology to DOT format:
use OBO::Parser::OBOParser;
use strict;
my $my_parser = OBO::Parser::OBOParser->new();
my $o = $my_parser->work("gene_ontology.obo");
# export to DOT: gene_ontology.dot
open (FH, ">gene_ontology_by_cco.dot");
$o->export(\*FH, 'dot');
close FH;
- Export a given ontology to OBO format (spec 1.2):
use OBO::Parser::OBOParser;
use strict;
my $my_parser = OBO::Parser::OBOParser->new();
my $o = $my_parser->work("gene_ontology.obo");
# export to OBO: gene_ontology.obo
open (FH, ">gene_ontology_by_cco.obo");
$o->export(\*FH, 'obo');
close FH;
- Export a given ontology to RDF format:
use OBO::Parser::OBOParser;
use strict;
my $my_parser = OBO::Parser::OBOParser->new();
my $o = $my_parser->work("gene_ontology.obo");
# export to RDF: gene_ontology.rdf
open (FH, ">gene_ontology_by_cco.rdf");
$o->export(\*FH, 'rdf');
close FH;