[Bioperl-l] using HMMER

fayroz fayroz_farouk at yahoo.com
Sun Aug 8 08:24:31 UTC 2010


i need your help, i am a new perl user and want to use bioperl modules to run 
HMMER program ( HMMsearch) i have" model.hmm" and a "fasta file" to see which of 
them are similar with the model
i write this code but there is a problems

#!/usr/local/bin/perl W
use Bio::AlignIO;
use Bio::SearchIO;
use Bio::SeqIO ;
use Bio::Tools::Run::Hmmer;

# run hmmsearch (similar for hmmpfam)
my $factory = Bio::Tools::Run::Hmmer->new(-hmm => 'h6_avian.hmm',-informat => 
'fasta');
my $seq = Bio::SeqIO->new('-file'=> "one_seq.fa", '-format'=>'Fasta');

# Pass the factory a Bio::Seq object or a file name, returns a Bio::SearchIO
my $searchio = $factory->hmmsearch($seq);

while (my $result = $searchio->next_result){
while(my $hit = $result->next_hit){
while (my $hsp = $hit->next_hsp){
print join("\t", ( $result->query_name,
$hsp->query->start,
$hsp->query->end,
$hit->name,
$hsp->hit->start,
$hsp->hit->end,
$hsp->score,
$hsp->evalue,
$hsp->seq_str,
)), "\n";
}
}
}


exceptions:
MSG: Unknown kind of input 'Bio::SeqIO::fasta=HASH(0x329a504)'
STACK Bio::Tools::Run::Hmmer::_setinput 
D:/Perl/site/lib/Bio/Tools/Run/Hmmer.pm:381
STACK Bio::Tools::Run::Hmmer::hmmsearch 
D:/Perl/site/lib/Bio/Tools/Run/Hmmer.pm:352
 STACK toplevel test_bioperl.pl:12
thank you

fayroz 


      




More information about the Bioperl-l mailing list