[Bioperl-l] Problems of parse emboss water result by Bio::AlignIO

Jay Hannah jay at jays.net
Tue Aug 28 07:14:37 EDT 2007


On Aug 27, 2007, at 6:49 AM, zeroliu wrote:
> I'm trying to parse water (EMBOSS 5.0.0) result by Bio::AlignIO
> (Bioperl-1.4) and encountered some problems.
> 1. What does the Bio::AlignIO->next_aln() return?
> Does it return a Bio::Align::AlignI or Bio::SimpleAlign object?
> Or it depends on the alignment file format?

http://doc.bioperl.org/bioperl-live/Bio/AlignIO.html
  Title   : next_aln
  Usage   : $aln = stream->next_aln
  Function: reads the next $aln object from the stream
  Returns : a Bio::Align::AlignI compliant object

> 2. How can I get the "score" properity in a water alignment result?
> There is a score method in Bio::SimpleAlign but not in Bio::AlignIO.
> In 2004, Jason mentioned:
> Scores are set by the Alignment parser - we separate the 'running'  
> from
> the 'parsing'.
> Bio::AlignIO::emboss had to be updated.
> (http://article.gmane.org/gmane.comp.lang.perl.bio.general/7156/ 
> match=alignio+water)
> How could I know it?

Line 480 of t/AlignIO.t seems to walk you through? Here's the block,  
with the test overhead removed.

# EMBOSS water
$str = Bio::AlignIO->new('-format' => 'emboss',
                          '-file' => 'cysprot.water');
$aln = $str->next_aln();
# $aln is now a Bio::Align::AlignI object
print $aln->score;    # '501.50'

HTH,

Jay Hannah
http://clab.ist.unomaha.edu/CLAB/index.php/User:Jhannah




More information about the Bioperl-l mailing list