[Biococoa-dev] Sequence factory

Koen van der Drift kvddrift at earthlink.net
Fri Dec 24 13:31:19 EST 2004


On Dec 24, 2004, at 12:28 PM, John Timmer wrote:

> Skipping non-bases just means whether or not to allow undefined 
> symbols in
> with your valid bases or not.  I don't know how symbol sets would 
> create the
> equivalent of that, and I can't remember whether that code allows gaps 
> or
> not.  I know it allows ambiguous bases - there's no "strict" version.

What I meant was, how do we pass the skippingNonBases value to the 
BCSequenceFactory and then back to initWithFoo. If we use symbolsets, 
then we could eg have a 'strict' symbol set, which only allows 
ambiguous and unambiguous symbols, and a non-strict symbol set which 
also allows gaps and undefined symbols.  Right now BCSymbolSet only 
supplies strict symbolsets, but it shouldn't be a problem to add one 
that also contains gap and undefined.

>
> Basically just wanted to be clear on what I was doing when I wrote the
> method, just in case it gets replaced.
>
> One little question on factories for my own edification - in other 
> code I
> wrote, I decided when to make a factory based on the number of objects 
> I had
> to create in order to get something to work.  If I needed a lot of 
> objects,
> it was best to create them only once, so I made a factory.

John, I am confused which 'factory' you are referring to. Do you mean 
BCSequenceFactory?

>  It seems that
> the main decision on when to use one here is based on modularity of 
> code,
> rather than practical time/memory issues.  Is this accurate?


The idea is to *always* use BCSequenceFactory, although it is hidden 
from the users, by the convenience methods that Alex proposed.


BTW, what is you guys opinion on adding a BCSymbolListFactory class as 
well?



- Koen.




More information about the Biococoa-dev mailing list