in reply to Re^3: Converting Filehandle to Array call in Object Creation
in thread Converting Filehandle to Array call in Object Creation
The handle used by Bio::AlignIO (when 'fasta' is specified) must return ">Seq1\n", "AAAAAAAAAAAAAAA\n", ">Seq2\n", "AAAAAAAGGAAACCA\n" on subsequent calls to a read line, but yours returns "AAAAAAAAAAAAAAA" and "AAAAAAAGGAAACCA".
I suppose you could change:
my $fh = Tie::Handle::FromArray->new(\@array);
to
my $fh = Tie::Handle::FromArray->new([ map { ">Seq".$seq_id++."\n", "$_\n" } @array ]);
but it would be nice if the tied class did that for you instead of creating a new array twice the size of the original one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Converting Filehandle to Array call in Object Creation
by holli (Abbot) on Apr 27, 2005 at 19:03 UTC |