[Biococoa-dev] mass calculator bug
Alexander Griekspoor
mek at mekentosj.com
Mon Aug 30 02:25:54 EDT 2004
> I need some help from you DNA dudes here.
>
> Looking at the methods, they are all very similar, until the lines:
>
> if ( [selfSymbol isRepresentedByBase: entrySymbol] ||
> [entrySymbol isRepresentedByBase: selfSymbol] ) {
>
> or variants thereof. After that I really don't follow the flow of the
> code, too many counters and symbols ;-)
>
> Here's my question: isRepresentedByBase a specific test that is only
> needed for bases, or should amino acids be tested the same way using a
> similar method?
Yes, it is because of the whole ambiguity problem of DNA, for example,
if you have the sequence ATWG then TWG is a subsequence, but so is TAG
and TTG.
> What I am trying to get at is to see if it is possible to have a
> separate method to test the entrySymbol and selfSymbol that goes in
> BCNucleotideDNA and BCAminoAcid (or BCSequenceDNA and
> BCSequenceProtein). Then we can keep all the rangeOfSubsequence in
> BCSequence.
Perhaps it's indeed a good plan to let BCSymbol have the
isRepresentedBySymbol method that BCNucleotideDNA overrides to check
for ambiguous bases as well, that way BCSequence could have the general
methods.
Furthermore, I as wondering if it's nice to have two complemented
methods here:
- isRepresentedBySymbol A isRepresentedBySymbol W but not vice versa
- representsSymbol W representsSymbol A but not vice versa
It's also nice to add this particular example to the headerdoc.
the line would then become:
if ( [selfSymbol isRepresentedBySymbol: entrySymbol] ||
[selfSymbol representsSymbol: entrySymbol] ) {
But John knows more on this, so perhaps it's already there.
> BTW, just saw that there is also a method subSequenceInRange which
> doesn't do all the checking - I guess I wrote that one ;D
Well, if the modus is 'strict' and want to check if a a sequence is
exactly the same symbolwise (ATWG == ATWG but not ATAG), you don't need
the checking, so it's nice to have anyway!
Alex
*********************************************************
** 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
iRNAi, do you?
http://www.mekentosj.com/irnai
*********************************************************
More information about the Biococoa-dev
mailing list