[Biococoa-dev] Sequence Structure

Alexander Griekspoor mek at mekentosj.com
Mon Jul 11 04:58:23 EDT 2005


> And if we are going to choose, we should listen to those people  
> asking for typed classes.

Well, now I heard Koen (of course ;-) and Phil, but also Charles, and  
myself already say that we like the idea of a single sequence. I'm in  
the camp of Charles, mainly the simpler interface and to circumvent  
the double inheritance problem.

I'm strongly in favor of a "typing" the sequence by symbolsets to  
check for errors and having tests based on this property to return  
proper values for each method...  Maybe wrong, but it must be  
possible to do all check we need during runtime based on the  
sequenceset associated with a sequence: in pseudocode given  
BCSequence *seq;

Say you want a translation but you only want to call it on a protein,  
then in the code you could:
- first ask the [seq symbolset]
- and only if it is equal to a protein, call the method, otherwise  
don't. You can even do menu item validation based on the symbolset of  
the current sequence, easily!

Now return values, say you have the complement method, which only  
makes sense on DNA. then the method would be in pseudocode:
- (BCSequence *) complement {

     symbolset = [self symbolset]

     if symbolset == dnasymbolset {

         // do the work
         return a fresh BCSequence;
     }
     else
     {
         return nil;
     }
}

> Phil, I am also more in favor of a single public class, but not for  
> the same reason: for a simpler interface.
and
> So the bottom line is: let's go with the typed classes :-)
Now, that is some serious form of schizophrenia ;-)
I would say, unless John can't find himself in the "typing by  
symbolset" idea, the bottom line should be: let's go with a single  
bcsequence (or two actually, a mutable and immutable form).
Switching to the single sequence system will require a more radical  
rewrite though I guess...

Finally the FAQ:

> And I can already see the first FAQ if we did not have typed sequence:
> "Q1: Where is the DNA sequence class?
> A: Eu... There ain't any.
Wrong, a DNA sequence class is a BCSequence with the BCSymbolSetDNA  
associated to it.

Cheers,
Alex

On 11-jul-2005, at 2:35, Charles Parnot wrote:

>
> On Jul 10, 2005, at 4:53 PM, Koen van der Drift wrote:
>
>
>>
>> On Jul 10, 2005, at 7:42 PM, Philipp Seibel wrote:
>>
>>
>>
>>> I suggest to use one single class to represent a sequence ->  
>>> BCSequence. (BCAbstractSequence and others are really not  
>>> present :-)).
>>> But it seems everybody except from me likes the oversized ( just  
>>> my opinion ;-) ) inheritance model.
>>>
>>>
>>
>> I am not in favor of them too, just check the archives for some  
>> nice discussions :)
>>
>
> Phil, I am also more in favor of a single public class, but not for  
> the same reason: for a simpler interface. However, I would not mind  
> some subclasses hidden behind a class cluster design (I don't know  
> if people knew about that idea? ;-)... which means I am OK with the  
> inheritance model.
>
> In any case, there will and there is already a strong request for  
> typed sequences, mostly for compile-time checking. And also, there  
> is a strong willingness to choose between the two structures:  
> either one-class-do-it-all or a tree of typed classes. Up until  
> now, we had both structures in parallel, which was a way of not  
> choosing. The consensus is now to choose, as everybody seem  
> confused by the current design... well, except me ;-)
>
> And if we are going to choose, we should listen to those people  
> asking for typed classes. And I can already see the first FAQ if we  
> did not have typed sequence:
> "Q1: Where is the DNA sequence class?
> A: Eu... There ain't any.
> Q2: WTF?"
>
> So the bottom line is: let's go with the typed classes :-)
>
> charles
>
>
> --
> Xgrid-at-Stanford
> Help science move fast forward:
> http://cmgm.stanford.edu/~cparnot/xgrid-stanford
>
> Charles Parnot
> charles.parnot at gmail.com
>
>
>
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>
>

*********************************************************
                     ** Alexander Griekspoor **
*********************************************************
              The Netherlands Cancer Institute
              Department of Tumorbiology (H4)
         Plesmanlaan 121, 1066 CX, Amsterdam
                    Tel:  + 31 20 - 512 2023
                    Fax:  + 31 20 - 512 2029
                    AIM: mekentosj at mac.com
                    E-mail: a.griekspoor at nki.nl
                Web: http://www.mekentosj.com

       Microsoft is not the answer,
       Microsoft is the question,
       NO is the answer

*********************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20050711/c64064c8/attachment.html>


More information about the Biococoa-dev mailing list