3 # Author: Jason Stajich <jason-at-bioperl-dot-org>
4 # Description: Turn SearchIO parseable report(s) into a GFF report
8 search2bsml - Turn SearchIO parseable reports(s) into a BSML report
13 search2bsml [-o outputfile] [-f reportformat] [-i inputfilename] OR file1 file2 ..
17 This script will turn a protein Search report (BLASTP, FASTP, SSEARCH,
18 AXT, WABA, SIM4) into a BSML File.
22 -i infilename - (optional) inputfilename, will read
23 either ARGV files or from STDIN
24 -o filename - the output filename [default STDOUT]
25 -f format - search result format (blast, fasta,waba,axt)
26 (ssearch is fasta format). default is blast.
29 Additionally specify the filenames you want to process on the
30 command-line. If no files are specified then STDIN input is assumed.
31 You specify this by doing: search2gff E<lt> file1 file2 file3
35 Jason Stajich, jason-at-bioperl-dot-org
43 my ($output,$input,$format,$type,$help,$cutoff);
44 $format = 'blast'; # by default
46 'i|input:s' => \$input,
47 'o|output:s' => \$output,
48 'f|format:s' => \$format,
49 'c|cutoff:s' => \$cutoff,
50 'h|help' => sub{ exec('perldoc',$0);
54 # if no input is provided STDIN will be used
55 my $parser = new Bio::SearchIO(-format => $format,
59 if( defined $output ) {
60 $out = new Bio::SearchIO(-file => ">$output",
61 -output_format => 'BSMLResultWriter');
63 $out = new Bio::SearchIO(-output_format => 'BSMLResultWriter'); # STDOUT
66 while( my $result = $parser->next_result ) {
67 $out->write_result($result);