[Bioperl-l] StandAloneBlast->blastall array of Bio::Seq objects

Jason Stajich jason at bioperl.org
Thu Dec 14 16:59:20 UTC 2006


So can you look at the tempfile that is created and see if it is sane?

Set -save_tempfiles => 1 whene you initialize the factory object or do
$factory->save_tempfiles(1)
before calling the blastall.

-jason
On Dec 14, 2006, at 11:34 AM, Andrew Stewart wrote:

> Thanks for the reply, Sendu.
>
> So I've tried passing a reference to an array of Seq objects with the
> following code...
> 	
> 	push @blast_run, $factory->blastall(\@query);  # where @query is an
> array of Bio::Seq objects
>
> (In case you're wondering, I'm pushing the report into an array of
> reports because I'm running several instances of blastall with
> different parameters each time.)
>
> ....and it throws me the following exception...
>
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: blastall call crashed: 11 /common/bin/blastall -p  blastp  -d  "/
> common/data/BACILLUS.pep"  -i  /tmp/Z69hzaqEbR  -o  /tmp/02Zja7AF3E
>
> STACK: Error::throw
> STACK: Bio::Root::Root::throw /sw/lib/perl5/5.8.6/Bio/Root/Root.pm:328
> STACK: Bio::Tools::Run::StandAloneBlast::_runblast /sw/lib/
> perl5/5.8.6/Bio/Tools/Run/StandAloneBlast.pm:759
> STACK: Bio::Tools::Run::StandAloneBlast::_generic_local_blast /sw/lib/
> perl5/5.8.6/Bio/Tools/Run/StandAloneBlast.pm:706
> STACK: Bio::Tools::Run::StandAloneBlast::blastall /sw/lib/perl5/5.8.6/
> Bio/Tools/Run/StandAloneBlast.pm:557
> STACK: main::run_blastall ./new_blast_script.pl:215
> STACK: ./new_blast_script.pl:115
> -----------------------------------------------------------
>
> And % more -Nl 759 /path/to/Bio/Tools/Run/StandAloneBlast.pm  
> returns...
> 757         my $status = system($commandstring);
> 758
> 759         $self->throw("$executable call crashed: $? $commandstring
> \n")
> 760           unless ($status==0) ;
>
> So it looks like the system call isn't returning a happy $status.  At
> this point I'm pretty much stuck, though.  Blastall works just fine
> if I only send it a single Seq object.  Looking at _setinput, it
> appears a reference to an array of Seq objects should end up creating
> a multi-fasta file.  The only possibilities I can think of to explain
> this is...
>
> - The -i file isn't be created for some reason when an (ref to) array
> of Seqs is passed
> - There is something wrong with the -i file that is created and sent
> to blastall.
> - Something else is wrong with the $commandstring being sent to the
> system call.
>
> Does anyone see something here that I don't?
>
>
> Thanks,
> Andrew
>
>
>
> On Dec 14, 2006, at 9:10 AM, Sendu Bala wrote:
>
>> Andrew Stewart wrote:
>>> I am trying to StandAloneBlast->blastall an array or Bio::Seq
>>> objects.  The documentation claims that blastall can be passed a
>>> file  name,
>>
>> You're referring to 'In addition, sequence input may be in the form
>> of either a Bio::Seq object or or an array of Bio::Seq objects'? I
>> agree its not clear, but supplying a reference to an array is still
>> supplying an array. Anyway, I'll clarify it.
>>
>>
>> In any case, the usage for the method is what you should pay
>> attention to:
>>
>>> Usage:
>>> 	$seq_array_ref = \@seq_array;  # where @seq_array is an array of
>>> Bio::Seq objects
>>> 	$blast_report = $factory->blastall(\@seq_array);
>>> Should this be...
>>> $report = $factory->blastall(@seq_array);
>>> or
>>> $report = $factory->blastall(\@seq_array);
>>> ???
>>
>> It should be exactly what it says. A reference to the array.
>>
>>
>>> And if you are blastall'ing an array of Seq objects, then does
>>> blastall just return one big blast report or should I be expecting
>>> an  array of blast reports?
>>
>> Returns : Reference to a Blast object or BPlite object
>>            containing the blast report.
>>
>> That means, just one big object, not an array.
>
>
>
> --
> Andrew Stewart
> Research Assistant, Genomics Team
> Navy Medical Research Center (NMRC)
> Biological Defense Research Directorate (BDRD)
> BDRD Annex
> 12300 Washington Avenue, 2nd Floor
> Rockville, MD 20852
>
> email: stewarta at nmrc.navy.mil
> phone: 301-231-6700 Ext 270
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list