[Biococoa-dev] Annotation

Koen van der Drift kvddrift at earthlink.net
Tue Feb 22 19:58:25 EST 2005

On Feb 22, 2005, at 1:32 PM, Alexander Griekspoor wrote:

>>> - do we use 1 or 0 based ranges? For the first 10 bases, do I create 
>>> a range {0,10} or {1,10}. I think it would be nicest to use 
>>> NSRanges, we can compensate in the accessors if necessary I guess...
>> The issue of 0 vs 1 is  a problem with cDNAs and the transcription or 
>> translation starting point, or is it a more widely used convention? 
>> One problem with the +1 convention is the absence of 0, IIRC. The 
>> positions goes -2, -1, +1, +2, right?
> Yes, guess so, but those are relative positions, so 0 in that case is 
> the base itself.
>> Anyway, that's a tough question. IMO, we should use a 0 based range 
>> to stick to the Cocoa conventions. In the Cocoa NSRange convention, 
>> the first character of a string is anyway not at position 0 or 1, but 
>> in between the two!
> Yep, I would like to have it 0 based as well.... The ranges the 
> findSubsequence methods use are also 0-based right? Guess, that's 
> settled then... Correct me if I'm wrong but I believe BioJava's 
> sequences are 1-based, but Koen might know better.

Ha, I missed this in all the messages from today, and already replied 
on Alex's original question in a separate email. Yes, I think BioJava 
uses a 1-based sequence. But I don't think Java have nice build-in 
array's, so they had to write them theirselves. As I said, internally 
we can use the 0-based code. However, imagine a find sequence dialog 
window. That should accept and return values that are 1-based. Should 
that be the responsibility of the developer, or should it be 
BioCocoa's? I would say the latter, but if we decide on going 0-based 
all the way, then we have to document that very well.

>> Of course,  the BCSequenceView would have to display the correct 
>> numbers, Alex ;-)
> Yeah yeah, LOL I got the message ;-)
> I'll let you know when the BCAnnotation class is in the CVS, ready to 
> burn it down, haha

I can add something too, including symbols numbers. I probably have to 
add a view + nib and maybe a controller. Any ideas how we are going to 
organize the code within BCAppKit?

- Koen.

ps - great work everyone - it's good to see all the new code being 

More information about the Biococoa-dev mailing list