reduce warning message, was overly verbose and gave warnings when nodes didn't have...
[bioperl-live.git] / examples / searchio / waba2gff.pl
blob04a51551769c4205cf90e0a1c451afb77049691b
1 #!/usr/bin/perl -w
2 use strict;
3 use Bio::SearchIO;
4 use Getopt::Long;
5 use Benchmark;
7 my ($infile,$outfile,$verbose);
9 GetOptions(
10 'i|input:s' => \$infile,
11 'o|output:s' => \$outfile,
12 'v|verbose' => \$verbose,
14 $infile = shift unless $infile;
16 my $in = new Bio::SearchIO(-format => 'waba',
17 -file => $infile, #comment out to read from STDIN
18 #-fh => \*ARGV, # uncomment to read from STDIN
19 -verbose => $verbose);
21 my $out;
22 if( defined $outfile) {
23 $out = new Bio::Tools::GFF(-file => ">$outfile");
24 } else {
25 $out = new Bio::Tools::GFF(-verbose => $verbose);
28 while( my $r = $in->next_result ) {
29 while( my $hit = $r->next_hit ) {
30 while( my $hsp = $hit->next_hsp ) {
31 $out->write_feature($hsp);