[Bioperl-l] the most weird thing I've seen, help please

De-Jian,ZHAO zhaodj at ioz.ac.cn
Wed Aug 15 04:05:36 EDT 2007


Hi Guojun Yang,

I tested your code,modifying part of them. However,I did not
encounter the error.The modified code follows (see below and the
attachment). The codes run without any error on my Windows XP and
generates a file named lclblastResult.txt

In the codes I use the NCBI ecoli.nt database instead. Some
parameters change without affecting its function.

I think errors may happen in other part of your codes and more
details are needed.

-------code starts-------
#sub search {
use Bio::Tools::Run::StandAloneBlast;
use Bio::SearchIO::blast;

#my $query = Bio::Seq -> new ( -seq=>"$_[0]",
#                              -id=>"query");
my $query=Bio::Seq->new(-seq=>"ctgtattctgggatgca");
my $len=$query->length();

#@db=('nt.nal');
#foreach my $db (@db) {
    my $factory = Bio::Tools::Run::StandAloneBlast->new( -program
=>"blastn",
                                                         -database
=>'D:/blast/bin/ecoli.nt',
                                                         -e =>1,
														 -o=>'lclblastResult.txt');
my $rc = $factory->blastall($query);
-----code ends--------


On Wed, Aug 15, 2007 03:01, Guojun Yang wrote:
> Hi, all,
> I have two subroutines in my code. One is remoteblast and the
other
> local blast. It works well.
> When I decided to change the remoteblast to local blast, I always
get the following error. I downloaded nt database from NCBI as
> preformatted, but it works ok for both subroutines when I use
> command line blastall -p blastn.... I changed the db name to 'nt',
'nt.00', the same error message was returned. The error says:
> "program name was not given an argument", but I apparently gave it
there.  Can anybody help me? The code for the two subrountines are
very similar:
>
> sub search {
>     use Bio::Tools::Run::StandAloneBlast;
>     use Bio::SearchIO::blast;
> my $query = Bio::Seq -> new ( -seq=>"$_[0]",
>                               -id=>"query");
> my $len=$query->length();
> @db=('nt.nal');
> foreach my $db (@db) {
>     my $factory = Bio::Tools::Run::StandAloneBlast->new( -program
> =>"blastn",
>                                                          -database
> =>"$db",
>                                                          -e
> =>"$_[1]");
>     my $rc = $factory->blastall($query);
> ......
>
>
> sub ancestor {
>     use Bio::Tools::Run::StandAloneBlast;
>     use Bio::SearchIO::blast;
> my $query = Bio::Seq -> new ( -seq=>"$_[0]",
>                               -id=>"test");
> my $len=$query->length();
> my $long_name=$_[1];
> my $long_start=$_[2];
> my $long_end=$_[3];
> @db=('TNDB');
> foreach my $db (@db) {
>     my $factory = Bio::Tools::Run::StandAloneBlast->new(-program
=>
> "blastx",
>                                                         -database
=>
> "$db",
>                                                         -e =>
1e-3,
>                                                         );
>     my $blast_report = $factory->blastall($query);
>
>
> Thanks a lot!
> Guojun Yang
> Department of Plant Biology
> University of Georgia
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>


-- 
De-Jian Zhao
Institute of Zoology,Chinese Academy of Sciences
+86-10-64807217
zhaodj at ioz.ac.cn







-------------- next part --------------
A non-text attachment was scrubbed...
Name: lclblast.pl
Type: application/octet-stream
Size: 644 bytes
Desc: not available
Url : http://lists.open-bio.org/pipermail/bioperl-l/attachments/20070815/f40b2950/attachment.obj 


More information about the Bioperl-l mailing list