[Bioperl-l] Bio::AlignIO error

Jason Stajich jason.stajich at duke.edu
Tue Apr 12 11:10:07 EDT 2005


done. thanks alex.

--
Jason Stajich
jason.stajich at duke.edu
http://www.duke.edu/~jes12/

On Apr 12, 2005, at 4:53 AM, Alex Brown wrote:

> I believe I have found an error in Bio::AlignIO - I was getting 
> unrealistic results from $aln->no_residues. I traced this to the 
> no_residues subroutine in Bio::SimpleAlign:
>
> sub no_residues {
>     my $self = shift;
>     my $count = 0;
>
>     foreach my $seq ($self->each_seq) {
> 	my $str = $seq->seq();
>
> 	$count += ($str =~ s/[^A-Za-z]//g);
>     }
>
>     return $count;
> }
>
> I think line 8 of the subroutine should read:
>
> $count += ($str =~ s/[A-Za-z]//g);
>
> Cheers,
>
> Alex Brown.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list