[Biojava-l] Sensible Circularity

Schreiber, Mark mark.schreiber@agresearch.co.nz
Wed, 14 Aug 2002 15:15:37 +1200

Hi -

Following discussions at BOSC I have changed the circular coordinates
system such that a 0 coordinate is sensibly handled.

Previously the base 1 was the first base of the sequence and base -1 was
the equivalent of the last base of the sequence. Trying to get at 0
would throw an exception. Eg:

Linear		 1  2  3  4  5  6  7  8
Circular		 1  2  3 ....       -2 -1

Now the base zero can be thought of as the base immediately before the
first base (in the case of a circular sequence the last base of the
seqeunce) base -1 is the penultimate base and 1 is still the first base.

Linear		 1  2  3  4  5  6  7  8
Circular		 1  2  3 ....       -1  0

Now that 0 has a home, for loops work properly and all the math gets a
whole lot simpler. I hope it doesn't interfere with genbank, I'm pretty
sure genbank doesn't use negative coordinates. Anyhow this also nicely
sidesteps the whole number from one vs number from zero argument. Zero
now refers to the base before the first base which in a circular
sequence is the last base. Sort of a number to zero?

Anyhow I hope this doesn't break too much code (other than my own).

Mark Schreiber
AgResearch Invermay
PO Box 50034
New Zealand
PH:   +64 3 489 9175
FAX:  +64 3 489 3739

Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.