[Bioperl-l] Strangeness in parsing blast file
Nabil Hafez
nabil at broad.mit.edu
Sun Jul 30 14:11:03 UTC 2006
I had modified the variables a bit to try and make them more readable
than what is in my code, in my code -o $blastoutput is
what it is, like I said, the blast portion works absolutely fine - i.e.
the do_blast sub routine is fully functional.
here's a cut and paste from my actual code
my $MBLAST = "/prodinfo/prod3pty/blast/blast-2.2.10/bin/megablast";
my $blastdb = "/prodinfo/proddata_ntblastdb/nt";
my $e_val = "1e-50"; #Default e-value Getopt_long
my $percent_id = "99"; #Default percentage identity
my $per_to_sample ="10"; #Default for percentage of reads to sample
sub do_blast {
my $bf = shift;
my $blastoutput = $bf . ".blastout";
print "Blasting against $db ...\n";
`$MBLAST -d $blastdb -e $e_val -p $percent_id -D 2 -i $bf -o
$blastoutput`;
return $blastoutput;
}
I will try your suggestion to use the Bio::Tools::Run::StandaloneBlast,
is megablast supported by this module?
Thanks
Nabil
Torsten Seemann wrote:
>
>> sub do_blast {
>> my $bf = shift;
>> my $blastoutput = $bf . ".blastout";
>> print "Blasting against $db ...\n";
>> `blast/blast-2.2.10/bin/megablast -d
>> /prodinfo/proddata_ntblastdb/nt -e 1e-50 -p 99 -D 2 -i test -o
>> test.blastout`;
>
> > return $blastoutput;
> > }#end do_blast
>
> Should "-o test.blastoutput" be "-o $blastoutput" ?
>
> Otherwise you are returning the name of a non-existent file, which
> naturally Bio::SearchIO will not be able to find a blast result in.
>
> Alternatively use Bio::Tools::Run::StandaloneBlast to invoke megablast
> rather than back-ticks - that way you avoid any intermediate file and
> get a Bio::SearchIO object back directly.
>
> --Torsten
>
More information about the Bioperl-l
mailing list