[Bioperl-l] Bug or special design of the 'length' method for Bio::Seq ?

Peter Cock p.j.a.cock at googlemail.com
Sun Jul 17 13:40:40 UTC 2011


This is deliberately giving the length of the string (Biopython does the same).

Have you considered what would you expect for this example sequence?
i.e. Where you translate a whole sequence including all the stop
codons?

>Translation
MAASEHRCVGCGFRVKSLF*AMKLMNO*P

It is a practical decision to give the length including the stop
symbols, so that the sequence behaves like a Perl string.

Peter

On 7/17/11, Tao Zhu <tzhu at mail.bnu.edu.cn> wrote:
> Hi,everyone
> Suppose a protein sequence like:
>
>  >Protein
> MAASEHRCVGCGFRVKSLF*
>
> Do you think the length of such sequence is 19 or 20? In my opinion, the
> star "*" is only a terminal symbol of a protein sequence, so it
> shouldn't be counted into protein length. But in fact the "length"
> method of Bio::Seq results in length of 20.
>
> --
> Tao Zhu, College of Life Sciences, Beijing Normal University, Beijing
> 100875, China
> Email: tzhu at mail.bnu.edu.cn
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list