[Bioperl-l] aligned sequence from hmmer output

Andrew Su asu at gnf.org
Wed Jun 15 15:32:35 EDT 2005


Hello,

Does anyone know of an easy way to get the sequence from an alignment in
hmmer output?  I think from blast output, it's something like
$hsp->seq('query') or $hsp->seq('target'), but when I try this for a
hmmer hsp, it throws an exception complaining about trying to create a
seq object with a sequence that has "." and "+" and such (pasted below).


for example, my program looks something like this:

$in = new Bio::SearchIO( -format => 'hmmer',  -file => $ARGV[0] ); 
while( my $result = $in->next_result ) {
	while( $hit = $result->next_hit ) {
		while( $hsp = $hit->next_domain ) {
			print
$hit->name,",",$hsp->evalue,",",$hsp->score, "\n";
		}
	}
}

... and I'd like to output the matched sequence as well.  Anyone have
any thoughts on how I would accomplish this?

(apologies if this has previously been addressed; couldn't find the
right combination of search strings to fish the answer out of the
archives...)

thanks,
-andrew


------------- EXCEPTION  -------------
MSG: Attempting to set the sequence to [aggttaa.a.cggtcaa.aa<-*] which
does not look healthy
STACK Bio::PrimarySeq::seq
/depts/CompDisc/lib/perl/Bio/PrimarySeq.pm:267
STACK Bio::PrimarySeq::new
/depts/CompDisc/lib/perl/Bio/PrimarySeq.pm:217
STACK Bio::LocatableSeq::new
/depts/CompDisc/lib/perl/Bio/LocatableSeq.pm:100
STACK Bio::Search::HSP::HSPI::seq
/depts/CompDisc/lib/perl/Bio/Search/HSP/HSPI.pm:572
STACK toplevel ./parse_hmmer.pl:17




More information about the Bioperl-l mailing list