Koen van der Drift
kvddrift at earthlink.net
Sun Aug 22 14:23:05 EDT 2004
On Aug 22, 2004, at 2:01 PM, John Timmer wrote:
> I'm looking over BCSequence in order to start implementing
> There's a couple of places where I'm not entirely sure what your long
> intentions are, so I thought I'd clarify things before digging in.
> I'm not entirely sure about the use of the following variables -
> startposition, endposition
> It looks like you use them to report back information generated by
> other methods, with a process that looks like:
> Call method, store information in these variables
> Call other methods to get information
> Reset information when 1st method is called again
I used them internally in my own app to indicate where a subsequence
begins and ends in a complete sequence, eg if the user selects a part
in a view. So whenever a sequence is created/edited these variables are
set. A view can use it through a controller to eg show these numbers.
> Is that correct? My big worry about this approach is what might
> happen with
> a threaded app, where the first method might be called from a different
> thread before the information could be retrieved.
But isn't that true for every variable, such as the NSArray of Symbols
> The "sequenceString" variable appears to be separate from the sequence
> itself - what is it used for? I know Alex asked, but I can't seem to
> the email.
It's a NSSting representation of the array of Symbols, using their
> If we're going to have a generic "initWithString" method, we're going
> have to define some order of preference for what type of sequence to
> generate. Maybe try DNA, if that doesn't work for all letters, try
> RNA, if
> that doesn't work, try protein? If we keep a BCSequenceType variable,
> something like:
> - (void)insertSymbolsFromString:(NSString *)s atIndex:(int)index;
> Can use that in order to decide what type of sequence to add.
Or, have a validation method in each initWithString method that checks
if it is really a DNA, protein, etc. So the user does something like:
mysequence = [[BCSequenceProtein] alloc] initWithString: @"ELVISLIVES"];
It will return nil, or an NSError if it is not a protein, eg when the
string @"KOENVANDERDRIFT" is passed.
> For a consistent naming convention:
> When setting/getting an array of symbols, use SymbolArray in the method
> When setting/getting a sequence object, use Sequence in the method
> It's probably worth creating both types of methods for all the methods
> "partialSequence", since we don't know what's going to be most useufl
> the users.
I'm not sure what you mean here.
More information about the Biococoa-dev