[Biococoa-dev] Sequence factory
Koen van der Drift
kvddrift at earthlink.net
Fri Dec 24 11:10:38 EST 2004
On Dec 23, 2004, at 7:49 PM, Alexander Griekspoor wrote:
> Now, coming back to your remark about the code. My proposal was (and
> still is) to add these kind of (standard apple-like) methods to the
> BCSequence class as convenience methods. You would simply call:
> mySeq=[BCSequence sequenceWithString:@"AGTAGATTTGAGGT"];
> and behind the scene this (in this case class) method would invoke:
> factory=[BCSequenceFactory sharedSequenceFactory];
> mySeq=[factory sequenceWithString:@"AGTAGATTTGAGGT"];
>
I thought a little bit more about how to implement this. Which class
should actually contain this code? Right now the code
+ (BCSequenceDNA *) dnaSequenceWithString: (NSString *)entry
skippingNonBases: (BOOL)skip {
BCSequenceDNA *theReturn = [[BCSequenceDNA alloc] initWithString:
entry skippingNonBases: skip];
return [theReturn autorelease];
}
is already in place in BCSequenceDNA (and similar ones in other
subclasses of BCSequence). Alex, are you proposing to replace this with
somthing like:
+ (BCSequenceDNA *) dnaSequenceWithString: (NSString *)entry
skippingNonBases: (BOOL)skip
{
BCSequenceFactory *factory = [BCSequenceFactory sharedSequenceFactory];
BCSequenceDNA *theReturn = [factory
sequenceWithString:@"AGTAGATTTGAGGT"];
return [theReturn autorelease];
}
Sound fine with me, just checking if that is what you had in mind :)
Although I am not sure how to deal with the skippingNonBases part.
Probably that should be replaced by passing the right symbol set
instead?
- Koen.
More information about the Biococoa-dev
mailing list