[Bioperl-l] Difference between Bio::SimpleAlign Object and Bio::Align::AlignI Object

Warren Gallin wgallin at ualberta.ca
Sat Feb 21 17:59:00 EST 2009

The following code snippet returns a Bio::SimpleAlign Object

my $stream = Bio::AlignIO->new(-file => $infile, -format => "fasta");

my $prot_align = $stream -> next_aln;

However, later on I want to use $prot_align to align the codons from  
the nucleic acid sequence

my $dna_align = Bio::Align::Utilities -> aa_to_dna_aln($prot_align, \ 

gives me the following error message:

Must provide a valid Bio::Align::AlignI object as the first argument  
to aa_to_dna_aln, see the documentation for proper usage and the  
method signature at 090220Make_NA_Align_from_AA_Align.pl line 66

So my question is, how do I create a Bio::Align::AlignI object from  
the Bio::SimpleAlign object?

I suspect that I am missing some subtlety here, but I haven't been  
able to find any documentation that matches these two up.

Warren Gallin

More information about the Bioperl-l mailing list