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

Lincoln Stein lstein at cshl.edu
Tue Feb 21 18:25:59 UTC 2006


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.

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>

Lincoln

On Tuesday 21 February 2006 11:50, Dave Howorth wrote:
> Lincoln Stein wrote:
> > When you are looking at the resolution of individual bases, a base pair
> > at position one occupies the half-open interval from 1->2, meaning that
> > it comes up to, but doesn't quite touch, the 2. For the purposes of
> > display, Bio::Graphics draws the end of the half-open interval.
>
> I think I understand the description of what it's doing but I don't
> understand why. What is the purpose of labelling the [44,45) interval
> 45, when that interval is representing the 44th discrete mer?
>
> I'm working with proteins and domains, so I'm always at the level of
> individual residues and people frequently care about the exact residue
> boundaries, especially when the regions are short. So I need to make
> pictures that match the data.
>
> The displayed track seems more consistent with an interpretation that
> the residues are represented by the discrete integer points along the
> line but I don't know if I'm buying myself trouble later if I try to
> adopt that interpretation.
>
> Alternatively, is there some way to get a track with 44 intervals,
> labelled 1 to 44?
>
> Or will I need to patch my copy of bioperl to achieve that?
>
> Thanks, Dave

-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
FOR URGENT MESSAGES & SCHEDULING, 
PLEASE CONTACT MY ASSISTANT, 
SANDRA MICHELSEN, AT michelse at cshl.edu



More information about the Bioperl-l mailing list