[Biococoa-dev] BCSequenceFactory

Alexander Griekspoor mek at mekentosj.com
Thu Dec 2 01:49:22 EST 2004

Very nice John, also very compact! Although a possibility to use the 
loopcounter object, I wouldn't do it here as it spreads the code and 
makes t more complicated to understand. But perhaps if the loopcounter 
is a shared object and it would thus involve only one line of code (and 
no alloc inits), it could still me a nice idea. I leave that up to 
you... John, just from curiosity, how much faster is doing this the 
core foundation way instead of cocoa. One other remark, I understand 
the optimization to only create the sequence once, but I think we 
should in this case not replace the method, but add one. Thus,
- (BCSequenceType *) guessSequenceTypeFromString: (NSString *) string;
- (BCSequence *) guessSequenceFromString: (NSString *) string;
Sometimes, you just want to know the type instead of getting the 
sequence back. In the documentation we can point the reader to the fact 
that if he want to have the sequence, there's the other method (and 
thus prevent him to do double work). Now I'm in the nitpicking mode 
anyway, the method name guidelines suggest to do something like:

sequenceTypeForUntypedString: or sequenceTypeForUnknownString:
sequenceFromUntypedString: or sequenceFromUnknownString:

The originals don't suggest that something is returned...

Op 2-dec-04 om 4:13 heeft Koen van der Drift het volgende geschreven:

> On Dec 1, 2004, at 7:41 PM, John Timmer wrote:
>> I added the guess the type method implementation.  Since guessing the 
>> type
>> involved creating the sequence, I changed its return value to the 
>> actual
>> sequence, rather than the type.
> John,
> Works fine for a protein file, although I had to change the lines
>             if ( aSymbol = nullSymbol )
>                 altCount++;
> to:
>             if ( aSymbol == nullSymbol )
>                 altCount++;
> to get it to work ;-)
> BTW,  would it be an idea to use BCSymbolCounter for this?
> cheers,
> - Koen.
> _______________________________________________
> 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

                             iRNAi, do you?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2866 bytes
Desc: not available
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20041202/53b01bfe/attachment.bin>

More information about the Biococoa-dev mailing list