Remove manipulation of @INC and use of lib - require install for use.
[bioperl-live.git] / examples / searchio / waba2gff.pl
blob3cc079f8b366c775dc76c53cd2dd7594784a2806
1 #!/usr/bin/perl
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);