[Bioperl-l] blastall problem

DeeGee gdorjee at hotmail.com
Fri Apr 6 22:27:54 UTC 2007


I added the line: 
close(OUTPUT);
and now following error comes up, where 'out.blast' is supposed to be the
blast result file, but it not being created. 

Software error:
------------- EXCEPTION  -------------
MSG: Could not open /export/home/dorjee/result/out.blast: No such file or
directory
STACK Bio::Root::IO::_initialize_io /usr/perl5/5.6.1/lib/Bio/Root/IO.pm:273
STACK Bio::Root::IO::new /usr/perl5/5.6.1/lib/Bio/Root/IO.pm:213
STACK Bio::SearchIO::new /usr/perl5/5.6.1/lib/Bio/SearchIO.pm:135
STACK Bio::SearchIO::new /usr/perl5/5.6.1/lib/Bio/SearchIO.pm:167
STACK toplevel /usr/local/apache2/htdocs/remote_ncbi.pl:53

--------------------------------------



Jason Stajich-3 wrote:
> 
> Looks like you need to deal with buffering:
> 
> http://perl.plover.com/FAQs/Buffering.html
> 
> So you need to add this:
> close(OUTPUT);
> 
> Alternatively you can build a sequence object and pass that in to the  
> BLAST factory, then you don't have to mess around with creating  
> temporary files or run into this sort of problem.
> 
> -jason
> On Apr 6, 2007, at 10:39 AM, DeeGee wrote:
> 
>>
>> Following is the part of my script, which is in the 'htdocs'  
>> directory:
>>
>> ####### part of my script #############
>> #generate a new CGI object from the input to the CGI script
>> my $query=new CGI;
>>
>> open(OUTPUT,">/export/home/local/apache2/htdocs/result/fasta.faa");
>>
>> print STDOUT $query->header();
>> print STDOUT $query->start_html(-title=>"Response from blast",
>> -BGCOLOR=>"#FFFFFF");
>> print STDOUT "\n<h1><center>Results from the BLAST</center></h1>\n";
>>
>> #gets the sequence from the html textarea with “post” method
>> my $fasta_file=$query->param('sequence');
>> print OUTPUT $fasta_file;
>>
> close(OUTPUT);
>> #Local blast of the input sequence against nr database
>> my $Seq_in = Bio::SeqIO->new (-file => 'result/fasta.faa', -format =>
>> 'Fasta');
>> die "could not open fasta" if not defined $Seq_in;
>> my $queryin = $Seq_in->next_seq();
>> die "could not get seq" if not defined $queryin;
>> my $factory = Bio::Tools::Run::StandAloneBlast->new('program'  =>  
>> 'blastp',
>>                                                  'database' =>
>> '/export/home/dorjee/database/nr',
>>                                                  _READMETHOD =>  
>> 'Blast'
>>                                                    );
>> $factory->outfile("result/out.blast");
>> my $blastreport = $factory->blastall($queryin);
>> .....
>>
>> Thank you.
>>
>>
>>
>> Jason Stajich-3 wrote:
>>>
>>> When/How are are you writing your sequences to this file result.faa?
>>> are you using seqIO or bioperl to write the sequence  to a file?
>>> I'm wondering if this is I/O buffering problem.
>>>
>>> On Apr 5, 2007, at 8:26 PM, DeeGee wrote:
>>>
>>>>
>>>> hi Torsten,
>>>> blastall -p blastp -i result/fasta.faa -d /export/home/database/nr
>>>> works
>>>> perfectly fine on the command line, and the 'fasta.faa' is in fasta
>>>> format:
>>>>
>>>>> gi|18676474|dbj|BAB84889.1| FLJ00134 protein [Homo sapiens]
>>>> HLSAQKASVGPESVSGLGTRTWPRVSCEVTVQCWPGCHLKVGGFKMAPWQGVGRRPWFLTWGPLCGAA 
>>>> SV
>>>> SPSMTVASSQ
>>>> QGWDCTAGRRWLGEGEIEALAQVSEFKTVLSFQGPAASPDGSSATRVPQDVTQGPGATGGKEDSGMIP 
>>>> LA
>>>> GTAPGAEGPA
>>>> PGDSQAVRPYKQEPSSPPLAPGLPAFLAAPGTTSCPECGKTSLKPAHLLRHRQSHSGEKPHACPECGK 
>>>> AF
>>>> RRKEHLRRHR
>>>> DTHPGSPGSPGPALRPLPAREKPHACCECGKTFYWREHLVRHRKTHSGARPFACWECGKGFGRREHVL 
>>>> RH
>>>> QRIHGRAAAS
>>>> AQGAVAPGPDGGGPFPPWPLG
>>>>
>>>> it seems like i'm just one bloody step away from success. ^ ^*
>>>> can't figure
>>>> out the prob.
>>>> thanks for your help.
>>>>
>>>>
>>>> Torsten Seemann wrote:
>>>>>
>>>>> Dorjee,
>>>>>
>>>>>> thanks alot for your reply again. as per your suggestion (using  
>>>>>> 'die
>>>>>> "could
>>>>>> not get seq" if not defined $queryin;'), i now get the following
>>>>>> error
>>>>>> message:
>>>>>> Software error:
>>>>>> could not get seq at /usr/local/apache2/htdocs/remote_ncbi.pl
>>>>>> line 50.
>>>>>> i've attached the script. could you plz have a look at it and see
>>>>>> where
>>>>>> am i
>>>>>> going wrong.
>>>>>> cheers mate!
>>>>>
>>>>> This strongly suggests that your FASTA file is not actually in  
>>>>> FASTA
>>>>> format.
>>>>> http://en.wikipedia.org/wiki/Fasta_format
>>>>>
>>>>> Does it work if you pass it to blastall on the command line?
>>>>> eg. blastall -p blastp -i result/fasta.faa -d /export/home/
>>>>> database/nr
>>>>>
>>>>>> Saier Lab.
>>>>>> 858-534-2457
>>>>>
>>>>> Are you working at UCSD?
>>>>>
>>>>> --Torsten
>>>>> _______________________________________________
>>>>> Bioperl-l mailing list
>>>>> Bioperl-l at lists.open-bio.org
>>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> View this message in context: http://www.nabble.com/blastall-
>>>> problem-tf3527412.html#a9867402
>>>> Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
>>>>
>>>> _______________________________________________
>>>> Bioperl-l mailing list
>>>> Bioperl-l at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>
>>> --
>>> Jason Stajich
>>> Miller Research Fellow
>>> University of California, Berkeley
>>> lab: 510.642.8441
>>> http://pmb.berkeley.edu/~taylor/people/js.html
>>> http://fungalgenomes.org/
>>>
>>>
>>>
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/blastall- 
>> problem-tf3527412.html#a9875685
>> Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
>>
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> --
> Jason Stajich
> Miller Research Fellow
> University of California, Berkeley
> lab: 510.642.8441
> http://pmb.berkeley.edu/~taylor/people/js.html
> http://fungalgenomes.org/
> 
> 
>  
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 

-- 
View this message in context: http://www.nabble.com/blastall-problem-tf3527412.html#a9879110
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.





More information about the Bioperl-l mailing list