[Biojava-l] circular sequences

Thomas Down td2@sanger.ac.uk
Fri, 26 Jan 2001 11:47:12 +0000


On Fri, Jan 26, 2001 at 03:44:24PM +1300, Mark Schreiber wrote:
> Hi,
> 
> I am working on something that requires a circular seqeunce
> implementation, Has this been done??
> 
> If not I think I could probably subclass SimpleSequence and redefine the
> SubList and SubStr methods. Would others find this useful??

Well, there's no problem doing a CircularSymbolList which overrides
subList and subStr (I'd be tempted to write a class which gives
a circularized view onto any underlying SymbolList, rather than
subclassing a specific implementation).  Point to debate: should
symbolAt(1001) for a 1000-symbol circular sequence return the
value of symbolAt(1), or is this an error?

Circular Sequence objects are slightly more of a pain, since I
might want a Feature running from, say, 900 - 100.  Not sure
what the best way to handle this is -- it's not a case recognized
by out current Location objects.

I'm not sure what the best way round this would be...

Thomas.