[Bioperl-l] help:HMM parsing error

boyang zhe zheboyang at gmail.com
Tue Sep 9 11:05:15 UTC 2008


  I write a script to parse the HMMER report ,it is as follows:
   #!/usr/bin/perl -w
   #TODO: Parse the HMMER report
   use strict;
   use Bio::SearchIO;
   my $directory="./HMM/";
   opendir(HMMDIR, $directory), or die "Can't open the directory!";
   my @filelist=readdir(HMMDIR);
   foreach my $filename(@filelist)
   {
   if ($filename !~/^\./)
   {
   my $infile="$directory"."$filename";
   my $outfile="$infile"."HMMParse";
   my $in = new Bio::SearchIO(-format => 'hmmer',-file =>"$infile");

- Ignored:
   while (my  $result= $in->next_result )
   {
   # get a Bio::Search::Result::HMMERResult object
   # get hits numbers
   my $hitnumber=$result->num_hits;
   if ($hitnumber != 0)
   {
   open(OUT, ">$outfile"), or die "can't open the output file!!!!";
   while (my $hits= $result->next_hit )
   {
   my $value=$hits->significance;
   if ($value <=0.01)
   {
         print OUT
   $hits->name,"\t",$hits->description,"\t",$hits->significance,"\n";
   }
   }
   close OUT;
   }
   }
   }
   }
   closedir(HMMDIR);
   ##############################################################

   When it run, you will see that:

   -------------------- WARNING ---------------------
   MSG: unrecognized line:                      +E +L i T eek+ e+  ++ +l++H
   Y+   I+ +

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

   why? I hope to get your help, hanks very much!

- Done.



More information about the Bioperl-l mailing list