[Bioperl-l] questions on analysising clustalw alignment result files

Tao Zhu tzhu at mail.bnu.edu.cn
Tue Jul 5 10:50:11 UTC 2011


I've created an alignment file using clustalw 2.0.12. This file 
"test.aln" is attached in the mail.

I want to analysis it using Bio::AlignIO, so I write
###########################################
use Bio::AlignIO;

my $catch_obj = Bio::AlignIO->new(-file=>'test.aln',
                                   -format=>'clustalw');

while ( my $align_obj = $catch_obj->next_aln() )
{
     for $seq_obj ($align_obj->each_seq())
     {
         my $name=$seq_obj->display_id;
         my $seq=$seq_obj->seq;
         print "$name\t$seq\n";
     }
}
############################################

But the scrpit prints nothing.

I've tried to see the object $catch_obj and $align_obj using Data::Dumper.
The object $catch_obj reviews as
$VAR1 = bless( {
                  '_line_length' => 60,
                  '_root_cleanup_methods' => [
                                               sub { "DUMMY" }
                                             ],
                  '_flush_on_write' => 1,
                  '_filehandle' => \*Symbol::GEN0,
                  '_file' => 'test.aln',
                  '_root_verbose' => 0
                }, 'Bio::AlignIO::clustalw' );
Obviously we've read the file correctly!
However the object $align_obj prints nothing. So probably there's 
something wrong with the method next_aln() called by $catch_obj. Why?

-- 
Tao Zhu, College of Life Sciences, Beijing Normal University, Beijing
100875, China
Email: tzhu at mail.bnu.edu.cn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.aln
Type: application/x-wine-extension-aln
Size: 748 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20110705/ee680226/attachment-0004.bin>


More information about the Bioperl-l mailing list