[Bioperl-l] blastall problem

DeeGee gdorjee at hotmail.com
Fri Apr 6 17:39:38 UTC 2007


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;

#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]
>> HLSAQKASVGPESVSGLGTRTWPRVSCEVTVQCWPGCHLKVGGFKMAPWQGVGRRPWFLTWGPLCGAASV 
>> SPSMTVASSQ
>> QGWDCTAGRRWLGEGEIEALAQVSEFKTVLSFQGPAASPDGSSATRVPQDVTQGPGATGGKEDSGMIPLA 
>> GTAPGAEGPA
>> PGDSQAVRPYKQEPSSPPLAPGLPAFLAAPGTTSCPECGKTSLKPAHLLRHRQSHSGEKPHACPECGKAF 
>> RRKEHLRRHR
>> DTHPGSPGSPGPALRPLPAREKPHACCECGKTFYWREHLVRHRKTHSGARPFACWECGKGFGRREHVLRH 
>> 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.





More information about the Bioperl-l mailing list