File: go2error_report

package info (click to toggle)
libgo-perl 0.15-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,108 kB
  • sloc: perl: 13,147; sh: 21; makefile: 7
file content (44 lines) | stat: -rwxr-xr-x 734 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/local/bin/perl

use strict;
use Getopt::Long;
use Data::Stag;
use FileHandle;

my $opt = {};
GetOptions($opt,
           "format|p=s",
           "datatype|t=s",
	   "err|e=s",
           "handler_args|a=s%",
           "handler|h=s");

use GO::Parser;

my $errf = $opt->{err};
my $errhandler = Data::Stag->getformathandler('xml');
if ($errf) {
    $errhandler->file($errf);
}
else {
    $errhandler->fh(\*STDOUT);
}
foreach my $f (@ARGV) {
    my $parser = new GO::Parser($opt);
    $parser->errhandler($errhandler);
    $parser->parse($f);
}

__END__

=head1 NAME

go2error_report - converts go/obo to error_report

=head1 DESCRIPTION

Converts a file in any valid go/obo format to error_report.

=head1 SEE ALSO

L<go-perl>