[Bioperl-l] blastall problem

Bernd Web bernd.web at gmail.com
Fri Apr 6 18:00:18 UTC 2007


Hi Dorjee,

Do you now use complete file paths everywhere (instead of some
relative paths that were in your script).  Did you check all read and
execute permission (turn r, x on for group and others)? And regarding
the fasta file I'd suggest closing the filehandle after you printed
the fasta sequence to the file.

open(OUTPUT,">result/fasta.faa"); #don't use this relative path and
use the "die" as was suggested earlier.
.... your other code lines
print OUTPUT
"$desc\n$seqo\n";
close(OUTPUT); #close the file.

Also check if your complete script runs from the command-line as to be
sure your problems are not related to the webserver enviroment.


BTW I do think you do not want to parse your fasta file like you do:
if ($fasta_file =~ /^(\>.+)\s+/){$desc=$1;}
$fasta_file=~s/[\n\r]//g;
if ($fasta_file =~ /([A-Z]{10}.+)/){$seqo=$1;}

$seqo will contain the description as well, so your sequence starts
with the description.
BioPerl provides code for fasta file parsing too ;-) If you really
want to stick to your code you can catch the $desc and $seqo in one
RegExp, or replace this line:
if ($fasta_file =~ /^(\>.+)\s+/){$desc=$1;}
with
if ($fasta_file =~ s/^(\>.+)\s+//){$desc=$1;}


I hope you will get your script working now.

Regards,
Bernd

On 4/6/07, Jason Stajich <jason at bioperl.org> 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]
> HLSAQKASVGPESVSGLGTRTWPRVSCEVTVQCWPGCHLKVGGFKMAPWQGVGRRPWFLTWGPLCGAASVSPSMTVASSQ
> QGWDCTAGRRWLGEGEIEALAQVSEFKTVLSFQGPAASPDGSSATRVPQDVTQGPGATGGKEDSGMIPLAGTAPGAEGPA
> PGDSQAVRPYKQEPSSPPLAPGLPAFLAAPGTTSCPECGKTSLKPAHLLRHRQSHSGEKPHACPECGKAFRRKEHLRRHR
> DTHPGSPGSPGPALRPLPAREKPHACCECGKTFYWREHLVRHRKTHSGARPFACWECGKGFGRREHVLRHQRIHGRAAAS
> 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.htmlhttp://fungalgenomes.org/
>
>
> _______________________________________________
> 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