I am new to Perl and have never used a CPAN module before, I need to convert an OWL file to OBO format. I successfully installed the “ONTO-PERL-1.37” module. I want to use the following script:
use Carp;
use strict;
use warnings;
use OBO::Parser::OWLParser;
my $my_parser = OBO::Parser::OWLParser->new();
my $ontology = $my_parser->work(shift(@ARGV));
$ontology->export('obo');
exit 0;
END
My question is do i need to declare the input OWL file, if yes how can that be done for the above script?
This script takes the argument from the command line. This is what the
shift(@ARGV)is for.shiftremoves the first element from a list and@ARGVis a list filled with the filename given as a command line argument, when running the script withperl owl2obo.pl my-ontology.owl.If it easier, you can modify the script with
or
.