otherwise while(next_aln) loops forever.
to return undef when reaching file end
yschensandiego, could you please attach or paste or link a, preferably small, file where this situation actually happens to check it and make it a test case example?? Also for the bl2seq+ issue.
Reading an empty file can show the issue:
my $empty = Bio::AlignIO->new(
"-file" => "C:\\Temp\\Empty.phy",
"-format" => "phylip"
while(my $a = $empty->next_aln())
# infinite loop
Confirmed the issue, good catch!
I checked the behaviour of the other AlignIO formats and some just silently pass the "->next_aln" cycle and others die with an error, but none enter in infinite loop. I'm merging this request. Thanks!
Hi Francisco, thanks for the quick action.