# [Bioperl-l] Bio::Graphics off by one?

Lincoln Stein lstein at cshl.edu
Wed Feb 22 16:22:02 UTC 2006

```The base starts at the tickmark and extends to (but doesn't touch) the next
one. If you are down at the resolution at which you see residue letters, then
lines drawn underneath the letters will line up like this:

1  2  3  4  5  6  7  8  9 10    ticks
T  S  N  T  P  N  Q  E  P       residues
=========   ===========      domains

Right?

Lincoln

On Wednesday 22 February 2006 05:20, Dave Howorth wrote:
> Lincoln Stein wrote:
> > Hi Dave,
> >
> > Well, when you are using 1-based coordinates, an line that contains 44
> > intervals will have 45 ticks. If you move to 0-based coordinates, then
> > the first tick will be labeled 0 and the last tick will be labeled 44. An
> > alternative is to make each base dimensionless, but that becomes a
> > problem when dealing with single base features, such as SNPs.
> >
> > These issues are why I have long advocated for interbase coordinates
> > in which you number the positions between bases rather than the bases
> > themselves.
>
> I see your point but I need to work with the coordinates that the users
> expect and are familiar with. (Things get much worse with PDB residue
> numbering :)
>
> > Draw me the picture of what you expect to see. I think of it this way:
> >
> > 	1    2  3  4   5   6
> >          A>G>C>T>A>
>
> I guess something went wrong with your ASCII art :(
>
> OK, consider a 44-residue entry from SwissProt (P12239):
>
>    TSNTPNQEPVSYPIFTVRWVAVHTLAVPTIFFLGAIAAMQFIQR
>
> The first T is numbered 1 and the last R is numbered 44.
>
> So I expect to see a line with 44 positions indicated somehow (whether
> these are half-open intervals or points on the line), with the number 1
> at the left end and the number 44 at the right end.
>
> An important point is that if I then place other tracks below this one
> that start at say 27 and go to say 42, representing VPTIFFLGAIAAMQFI,
> they should align properly (according to whatever convention is used to
> represent a residue).
>
> For a short sequence like this it would be possible to use letters to
> represent the residue but I'd like to use the same convention for longer
> sequences as well and have everything be consistent.
>
> I'm hoping Bio:Graphics will make this easy.
>
> Thanks, Dave
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

--
Lincoln D. Stein
Cold Spring Harbor Laboratory