[Biococoa-dev] Sequence Structure
Koen van der Drift
kvddrift at earthlink.net
Mon Jul 11 15:42:53 EDT 2005
On Jul 11, 2005, at 11:57 AM, Alexander Griekspoor wrote:
> On 11-jul-2005, at 17:04, John Timmer wrote:
>> Well, it's not just that. Untyped sequences make the sequences stupid
>> they don't know what they are, they don't know what operations they
>> perform, and they have to have defined responses to cope with
>> requests for
>> operations they can't perform.
> They DO know who they are, their symbolset tells them, and they adapt
> their behaviour based on this.
Even better, the symbolsets specifiy what type of DNA you are dealing
with, ambiguous/unambiguous, or even a user-defined type of DNA.
>> Essential methods get scattered in a ton of other classes (mostly
>> tools, but there's going to be a lot of tools in the
>> end) - you need to call through to a separate class just to figure
>> out what
>> type of sequence you have, and something as simple as complementing
>> anucleotide sequence requires the creation of a new object and may
>> through about 4 different methods there (which is what I hate about
>> as we've discussed). And yes, I hate having to test the sequence type
>> time I think about doing anything with the sequence.
> Well, you don't have to because we do that inside the bcsequence
> object, you can call complement on a sequence and it will do the check
> if given the assigned symbolset it would make sense to return a value,
> nil or throw an exception. you don't have to do anything.
>> If I create a nucleotide sequence, I want it to act like one.
It will, because it is made up of nucleotides, which are specified in
the symbolset. Just naming the class BCSequenceNucleotide doesn't make
it a nucleotide sequence. It are the individual BCSymbols that make it
a nucleotide sequence.
More information about the Biococoa-dev