[Biococoa-dev] starting BCAlignment

Philipp Seibel biococoa at bioworxx.com
Thu Mar 10 03:46:23 EST 2005


Am 10.03.2005 um 00:31 schrieb John Timmer:

>
>>>>
>>>> If all of this is correct, then I think I know enough to actually
>>>> help ;).
>>>
>>> you are completly right !!! :-)
>>
>
> Good to know.  So, coding efficiently, how do matrix lookups normally 
> work?
> It's easy to see how a dictionary of dictionaries would work (ie - get
> dictionary with the key "Cys", look up value for "Tyr" in it), but I'd
> imagine they're normally implemented in much faster C code

There is no need for a dictionary, i would suggest to have a NSArray of 
BCSymbols.
That would allow to access the substitution score with the indices of 
the Symbols in a int* matrix.
It's perhaps not the fastest, but it works well and is a clean 
interface.

So internally we have a int* matrix for the scores. Just look at the 
small interface i just submittet.

> The reason I ask is that I'm expecting the lookup to work with char
> variables, but I'd imagine the code could be adapted to use pointers 
> instead
> of a char.  If it is, since all our individual bases/amino acids are 
> single
> instance pointers, it'd be very easy to get this to work, and I'd be 
> happy
> to help you populate the matrix, as well as helping set up a .plist 
> file
> format to store it.

Yes, i also thought of storing the matrix in a .plist file. I also 
think we should provide the most common matrices with our framework.

Phil




More information about the Biococoa-dev mailing list