[Biococoa-dev] Demo App

Alexander Griekspoor mek at mekentosj.com
Fri Aug 27 13:38:24 EDT 2004

> Thanks - I found the mistakes in the .plist, and things should work 
> fine
> now. Incidentally, a 2.4 Mb BAC took about 46 seconds to reverse
> complement.
Great! That's pretty rapid! What system are you on John?

> I should probably do some typical use profiling to figure out
> at what point someone using this should notify the user that it's busy.
Yep, as said we could always decide to go for non-blocking methods 
(with delegate messages) in addition to the current ones.

> You're right on the nomenclature - the "of" implies that you're 
> handing the
> sequence to it.
You don't, because you call the method ON the sequence, you're not 
handing any sequences.

> I'll change the names and add the "reverse" as well.

> Internally, there is no case to the sequence since it's all objects, 
> so the
> remaining two methods should return NSStrings.
> The first one already exists (as "description"), but I could add the 
> second if it's useful.
Ah, you're right... Still if we provide the uppercase method, implement 
the lowercase one as well as a convenience one.

> Switching gears, has anyone given any thought to a translation 
> machinery?
John, here's a snippet from previous discussions about this:

>> 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.. [clipped]
> 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?

> BioJava does it by having a translator object that you send the 
> sequence and
> a translation dictionary to, which seems to make some sense.  It will 
> be a
> bit tricky to code, though, as different things will take different 
> numbers
> of tokens to translate (ie - DNA -> RNA vs. RNA -> protein).  I've got 
> an
> idea on this, but I thought I'd ask if anyone had one before poisoning 
> your
> mind with my thoughts.

We could have two different methods for translation to either RNA or 
protein. We should also take species specific translation into account, 
that's the reason for geneticcode objects. We can have a number of 
codes already predefined like [BCGeneticCode standardCode] as a 
I was thinking a bit about this as well yesterday, and came of with the 
following problem; how do we return multiple frames?
I you do a translateDNASequence: usingCode: (BCGeneticCode *)code 
inFrame: you just return a BCSequenceProtein
But what if you want all frames, or all forward frames, do we return a 
dictionary of BCSequenceProteins with the frame as key?
Finally, let's define how we call each frame: -3, -2, -1, +1, +2, +3?
Anyway, don't hesitate to poison us with your thoughts John, it's nice 
to brain storm a bit and think about different options...

> Cheers,
> John
>> Hi John,
>> Wow, the conversion is really fast, this is really promising! I tested
>> it with 67kb, no problem, conversion within half a second on my 1Ghz
>> G4.... I got one exception now. If you try to convert the string (easy
>> to use in debugging): ACGTNWMYRKHVDB-?
>> You get two exceptions:
>> 2004-08-27 09:07:20.075 demo_app[1121] *** +[BCNucleotideDNA Y]:
>> selector not recognized
>> 2004-08-27 09:07:43.000 demo_app[1121] *** +[BCNucleotideDNA R]:
>> selector not recognized
>> Guess, you will know immediately where something is lacking (plist?).
>> Finally, I guess it's easy to add the following methods in addition to
>> complement and reverse complement:
>> - (BCSequenceDNA *) reverseOfSequence;
>> - (BCSequenceDNA *) uppercaseSequence;
>> - (BCSequenceDNA *) lowercaseSequence;
>> I'm not sure if the "Of" in the method name is necessary here, because
>> it doesn't take a parameter right?
>> [theSequence reverseSequence] sounds more logical than [theSequence
>> reverseOfSequence], in the latter case I question myself: wchich
>> sequence? It would even be fine to call [theSequence reverse] but that
>> would suggest that you change the current sequence, while
>> reverseSequence describes the method better as we return a new 
>> sequence
>> object.
>> Cheers,
>> Alex
> _______________________________________________
> This mind intentionally left blank
> _______________________________________________
> 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

	Claiming that the Macintosh is inferior to Windows
	because most people use Windows, is like saying
	that all other restaurants serve food that is
	inferior to McDonalds


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

               4Peaks - For Peaks, Four Peaks.
        2004 Winner of the Apple Design Awards
                Best Mac OS X Student Product


More information about the Biococoa-dev mailing list