## Exporting ontologies into different formats

1. Export a given ontology to OWL format (oboInOwl mapping).
2. Export a given ontology to GML format.
3. Export a given ontology to XML format.
4. Export a given ontology to DOT format.
5. Export a given ontology to OBO format (spec 1.2).
6. Export a given ontology to RDF format.

1. 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_apo.owl");
       			$o->export('owl', \*FH, \*STDERR, 'http://www.cellcycleontology.org/ontology/owl/', 'http://www.cellcycleontology.org/formats/oboInOwl#');
       			close FH;

2. 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_apo.gml");
       			$o->export('gml', \*FH);
       			close FH;

3. 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_apo.xml");
       			$o->export('xml', \*FH);
       			close FH;

4. 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_apo.dot");
       			$o->export('dot', \*FH);
       			close FH;

5. 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_apo.obo");
       			$o->export('obo', \*FH);
       			close FH;

6. 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_apo.rdf");
       			$o->export('rdf', \*FH, \*STDERR, 'http://www.cellcycleontology.org/ontology/rdf/');
       			close FH;

Copyright (c) 2006-2015 by Erick Antezana. All rights reserved.