[Biococoa-dev] Base test

Alexander Griekspoor mek at mekentosj.com
Mon Aug 16 06:43:56 EDT 2004

>> Also, would it be wise to make some further organisation using 
>> folders. We
>> have a Utils folder already. Perhaps both the sequence stuff and IO 
>> part could
>> be placed in separate folders.
> Speaking of Utils, I'm going to rename that DNA item to 
> "DNAStringUtils or
> something such like.  I'll keep it there, because it's easy to use if 
> all
> you're doing is converting a sequence in string form and using it as a
> string immediately, but I'll focus on making things work with our 
> base/amino
> acid tokens.
Great ides!
See BCToken isn't such a bad idea ;-)
>> A few remarks that I had after my first quick look at the added code:
>> - John shouldn't there be singleton objects for the "W, S, V, B, R" 
>> bases as
>> well? I now only found ACGTN
>> - I think it's impossible because of the needed statics, but would 
>> there be a
>> way to COMPLETELY initialize all bases on the basis of the plist?
> The static values and methods for the rest of the bases are on the way.
> I'll also make a gap and non-base item, for alignments and such.  I 
> can't do
> anything with them until I fill out the .plist file.  When that's 
> done, I'll
> make the methods.
I though so already, sorry for that..
> A short summary of how things work:
> The first time a base is called for, the class reads the .plist file.  
> All
> the predefined base objects are created, but their
> complements/representations are kept as strings in the dictionary, and 
> held
> on to within the base.  Any additional bases are kept in a static
> dictionary, which is retained.
> The first time a base has one of the complement/representation methods 
> are
> called, the string-based references there are converted into 
> references to
> the appropriate singleton reference, thanks to the work of Jim and 
> Alex.
> Any custom bases added to the .plist file have to be accessed with
> + (BCSequenceDNABase *) customBase: (NSString *)baseName
> When that's called, the dictionary within is also converted to a base
> object.  I still need to make a method for adding a base 
> programmatically,
> but that's just going to be 90% format validation code, so it 
> shouldn't be
> hard.

But how do you create the statics for these dynamically at run time? 
Because if you can, one could do the ideal "instantiate the whole thing 
from a plist setup" I dreamed out loud about in one of my last 

>> - Then we encounter another problem. BCSequence should be a ancestor 
>> class
>> that devides in aminoacid, dna or rna  sequence subclasses. Now you 
>> have
>> something mixed, do we incorporate translations into the sequence? I 
>> guess
>> not, these sequences should be mixed, either pure dna or pure 
>> protein. If we
>> do, RNA translation must be there as well. So the aminoacid methods 
>> are
>> strange here. The idea I would propose is that there is a shared 
>> translation
>> util object that you could feed a dna sequence and get (in the 
>> requested
>> frames) the translated sequences back as protein sequence objects. 
>> It's the
>> app task to control/organize these. Likewise, one could argue this for
>> complements as well -> a shared dna utils object returns you the 
>> complement
>> sequence if you hand it a sequence. Alternatively these translations 
>> could be
>> added as features, but in all cases there's again the "how to keep 
>> things in
>> sync upon editing" problem. I think we should keep things as separate 
>> and
>> clean entities as much as possible.
> I was actually thinking we could have a BCGeneticCode, consisting of
> BCCodons, again, extensible through .plists, to let us define the code 
> for
> different species.  Create a genetic code, hand it a dictionary, then 
> submit
> your sequence to it, and get the amino acid sequence back.
Great! The BCGeneticCode would be an argument you pass to the 
translation object along with the sequence:
(BCSequenceProtein *)translateDNASequence: (BCSequenceDNA *)sequence 
usingCode: (BCGeneticCode *)code inFrames:(NSArray *)frames; with a 
number of convenience methods like inFrame: (int)frame that all call 
this method
or something like that...
I already did the very nice and exiting work (ahum) of creating such a 
plist for EnzymeX, so we have this one already ;-)
BCCodons express their sequence in the BCTokens right?

> And finally, I think the CVS problem is with my login in general, 
> rather
> than CVS in particular.  I was hoping to get it sorted out, but I'm 
> probably
> going to create a new account on Monday if I don't hear something by 
> then.

OK, well it seems indeed a problem with XCode not able to handle the 
keys/agent stuff SSH requires that prevents it from working directly. I 
don't know if you Peter can add my public key to the cvs directory 
access list as suggested by the snippet I send you, but I guess not. 
Maybe I'd better contact the people at BioInformatics about this....

                     ** 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

Windows is a 32-bit patch to a 16-bit shell for an 8-bit
operating system, written for a 4-bit processor by a 2-
bit company without 1 bit of sense.


More information about the Biococoa-dev mailing list