[Bioperl-l] Bio::Graphics off by one?
dhoworth at mrc-lmb.cam.ac.uk
Wed Feb 22 05:20:10 EST 2006
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
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
> Draw me the picture of what you expect to see. I think of it this way:
> 1 2 3 4 5 6
I guess something went wrong with your ASCII art :(
OK, consider a 44-residue entry from SwissProt (P12239):
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.
More information about the Bioperl-l