[Bioperl-l] Query sequence length <= 0

Yanfeng Shi yanfeng at csit.fsu.edu
Mon Apr 4 16:52:29 EDT 2005


 I have a mitochondrial genome sequence and one short sequence of other species
mitochondrial genome. I want to find the relative positon of my mitochondrial
genome which is similar to that cds sequence.
 
I run the code below.But I got "
***[/usr/local/bin/fasta34] Query sequence length <= 0:
/home/yanfeng/BioInf/Project/qu.fasta***

-------------------- WARNING ---------------------
MSG: unable to find and set query length

Why does this happen?

  $|=1;
  my $fasta   = "/usr/local/bin/fasta34";
  my $library = "/home/yanfeng/BioInf/Project/mun_lab.fasta";
  my $query   = "/home/yanfeng/BioInf/Project/qu.fasta";
   
   my $options = "-E 0.01 -m 9 -d 0 ";
  my $command = "$fasta $options $query $library";
  print "Start running\n$command\n"; 
  open($fh,"$command |");

my $searchio  = Bio::SearchIO->new(-format => 'fasta', -fh => $fh); 
if( my $r = $searchio->next_result ) {
  if ( my $hit = $r->next_hit ) { # only want the BEST hit in this SIMPLE
example
    if( my $hsp = $hit->next_hsp ) { # only one HSP per hit for FASTA,change for
BLAST
     print "location is ",   $hsp->hit->location->to_FTstring(), " ",
                 $hsp->hit->length, " nt long\n";
    }
  }
}
--  




More information about the Bioperl-l mailing list