Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,
I have been wrting a blast script which results in the following error:
the small rnas:CAGCGATGGGGATCAAGCTC the sequnce thats being worked is CAGCGATGGGGATCAAGCTC [blastall] WARNING: Unable to open TCV-jagger.fna.nin [blastall] WARNING: : Unable to open TCV-jagger.fna.nin ------------- EXCEPTION: Bio::Root::Exception ------------- MSG: blastall call crashed: 256 /usr/bin/blastall -p blastn -d "/va +r/common/CGI-BIN/TCV-jagger.fna" -i /tmp/Qs5Y9sAFLK -o /tmp/Rk2tt +OzUih STACK: Error::throw STACK: Bio::Root::Root::throw /usr/local/share/perl/5.8.8/Bio/Root/Roo +t.pm:328 STACK: Bio::Tools::Run::StandAloneBlast::_runblast /usr/local/share/pe +rl/5.8.8/Bio/Tools/Run/StandAloneBlast.pm:759 STACK: Bio::Tools::Run::StandAloneBlast::_generic_local_blast /usr/loc +al/share/perl/5.8.8/Bio/Tools/Run/StandAloneBlast.pm:706 STACK: Bio::Tools::Run::StandAloneBlast::blastall /usr/local/share/per +l/5.8.8/Bio/Tools/Run/StandAloneBlast.pm:557 STACK: aligning.pl:34
I have attached my code along with this: I couldn.t really get what the problem is as far as I understand there should be 'something wrong ' with the line, my $blast_report = $blast->blastall($input); but may be the $blast could n't get the file s?????
#!/usr/bin/perl -w use strict; use Bio::SeqIO; use Bio::Tools::Run::StandAloneBlast; my %srna; my %genome; my $seqio_srna = Bio::SeqIO->new(-file=>'/home/jayakuma/script/graphic +s/model2.fasta', -format=>'fasta') or die "cannot open file\n"; my $seqio_large = Bio::SeqIO->new(-file => '/home/jayakuma/script/grap +hics/TCV-jagger.fna', -format =>'fasta') or die " cannot opne the file\n"; while (my $large_seq = $seqio_large->next_seq()){ my $id = $large_seq->display_id; my $seq = $large_seq->seq; $genome{$id} = $seq; } while (my $seq_srna = $seqio_srna->next_seq()){ my $display_id = $seq_srna->display_id; my $seq = $seq_srna->seq; $srna{$display_id} = $seq; } foreach my $seq_id (keys %srna){ my $srnas = $srna{$seq_id}; #print "srnas: $srnas\n"; foreach($srnas){ print "the small rnas:$srnas", "\n"; my $blast = Bio::Tools::Run::StandAloneBlast->new(program => 'blas +tn', database => 'var/common/CGI-BIN/TCV-jagger.fna'); my $input = Bio::Seq->new(-seq=> $srnas); print "the sequnce thats being worked is ", $input->seq, "\n"; my $blast_report = $blast->blastall($input); while (my $result = $blast_report->next_result()){ my $query_length = $result->query_length(); while (my $hit = $result->next_hit()){ my $id = $hit->accession(); while (my $hsp = $hit->next_hsp()){ if($hsp->frac_identical ==1 && $hsp ->length ==$query_leng +th){ print "srna:$srnas\t$id\n"; } } } } } }
If any one could give a suggestion for this, that would be very helpful.
thanks

Replies are listed 'Best First'.
Re: blast crashed
by samtregar (Abbot) on Mar 25, 2008 at 17:03 UTC
    Looks to me like /usr/bin/blastall crashed. The key line is this one:

    MSG: blastall call crashed: 256 /usr/bin/blastall -p  blastn  -d  "/var/common/CGI-BIN/TCV-jagger.fna"  -i  /tmp/Qs5Y9sAFLK  -o  /tmp/Rk2ttOzUih

    Most likely that "256" is the return code from blastall - that might give you a clue to why it crashed. If the blastall code is Perl we might be able to help you debug further, but I'm guessing that it's probably not.

    -sam

Re: blast crashed
by bobf (Monsignor) on Mar 26, 2008 at 02:12 UTC

    [blastall] WARNING: Unable to open TCV-jagger.fna.nin
    This error seems to indicate that there is a problem with the nin file, which is one of the index files required by the blastall program. Try recreating the index files using the formatdb command (if you didn't create them in the first place, that would be the problem).

    You should have some local documentation with the program. In addition, here are a couple of links that might help.

      oh thanks very much for your help.
      I thas been sorted. Now, while working on to get the result of Blast I would like to get the start and end position of the query sequence along the databas(large sequence)
      For example
      let the query sequence be
      ATG
      GTC
      and the large sequence be
      ATGCCCCGTC
      The hit position of the first sequence will be start :1 and end: 3
      And the second sequence will be start:3 and end: 6
      Again the second sequence matches at start8: and end 11 I looked at Hsp but the start and end in it gives just the start and end of the query
      Any suggestions
      Thanks