[Biococoa-dev] Design question

John Timmer jtimmer at bellatlantic.net
Thu Aug 5 10:45:46 EDT 2004

I'm going to be writing two methods:  One gives a list of all ORFs over a
certain size given the size and a DNA sequence, the second will list all
sites in a sequence, given a site and the sequence.

The question is:  how to return the list?

I could see three options:
The sites could be handled as an NSIndexSet, but that won't work for the
ORFs and is 10.3 only.
Another option would be to store Ranges as NSValues and return an array of
them.  This would be very convenient internally, but wouldn't allow
convenient saving of the information, since NSValues would need to be
encoded before saving.
The final thing would be to add a category to NSDictionary that would add
the methods "storeRangeInDictionary" and "retrieveRangeFromDictionary" that
would just make length and location keys in a dictionary.

Does anyone have a preference about how to handle it?



This mind intentionally left blank

More information about the Biococoa-dev mailing list