Subject: | Inconsistent return values in Bio::DB::Sam->features method |
The Bio::DB::Sam->features call returns a list of AlignWrapper objects,
but if used to create an Iterator, the Iterator returns Alignment
objects. See the following;
my $sam = Bio::DB::Sam->new(-bam =>"/path/to/my.bam");
foreach my $a( $sam->features() ){
# $a is a Bio::DB::Bam::AlignWrapper
}
my $iterator = $sam->features(-iterator=>1);
while (my $a = $iterator->next_seq){
# $a is a Bio::DB::Bam::Alignment
}