[Bioperl-l] get sequences from HMMER::Results ?

Jason Stajich jason@cgt.mc.duke.edu
Tue, 30 Jul 2002 11:45:17 -0400 (EDT)


Not sure it is possible with Bio::Tools::HMMER::Results but latest code
that I wrote does this.  It is only in CVS at the moment but developer
release will be available shortly.

The best example code is in the test t/hmmer.t for the time being.


use Bio::SearchIO;

my $searchio = new Bio::SearchIO(-format => 'hmmer',
                                 -file   => Bio::Root::IO->catfile
                                 ("t","data","hmmpfam.out"));


while( my $result = $searchio->next_result ) {
	while( my $hit = $result->next_hit ){
	    while( my $hsp = $hit->next_hsp ) {
		print $hsp->query_string, "\n";
		print $hsp->homology_string, "\n";
		print $hsp->hit_string, "\n";
	    }
	}
}


I'm not sure that $hsp->get_aln() [build a Bio::SimpleAlign for this HSP]
works for this implmentation yet, I've not had a chance to test that.

On Tue, 30 Jul 2002, Steven Cannon wrote:

> Is there a way to use Bio::Tools::HMMER::Results (or another module) to
> return the sequences (not just the bit score or domain start and end
> etc.) from the alignments in a hmmsearch output file?
>
> - Steve Cannon
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

-- 
Jason Stajich
Duke University
jason at cgt.mc.duke.edu