in reply to Converting Filehandle to Array call in Object Creation

From looking at the source, I think this is equivalent:

use Bio::LocatableSeq (); use Bio::SimpleAlign (); my $aln = Bio::SimpleAlign->new(); foreach (qw/ AAAAAAAAAAAAAAA AAAAAAAGGAAACCA /) { $aln->add_seq( Bio::LocatableSeq->new( '-seq' => $_, '-start' => 1, '-end' => length($_), ) ); } print("IDENTITY : ", $aln->percentage_identity, "\n"); print("CONSENSUS: ", $aln->consensus_string(28), "\n");

You can optionally add
'-display_id'  => 'Seq'.++$seq_id,
as an argument to the Bio::LocatableSeq constructor.

Warning: This is untested code written using unfamiliar modules.