[Biojava-dev] DNATools.forSymbol
Rhett Sutphin
rhett-sutphin at uiowa.edu
Thu Mar 13 16:39:43 EST 2003
Hi Mark,
Is there any reason not to use the existing converters to do this? For
instance
return DNATools.createDNA(String.valueOf(token)).symbolAt(1)
could be the entire method body. That could be a little slower. But
on the other hand, it uses the AlphabetManager alphabet definitions so
it would enhance maintainability.
Rhett
On Thursday, March 13, 2003, at 04:22 PM, Schreiber, Mark wrote:
> Hi -
>
> This method works on a switch statement which doesn't have a case for n
> but I don't see any reason I cannot put one in. I may even put one in
> for all the IUB ambiguity codes.
>
> - Mark
>
>> -----Original Message-----
>> From: Rhett Sutphin [mailto:rhett-sutphin at uiowa.edu]
>> Sent: Friday, 14 March 2003 11:14 a.m.
>> To: Schreiber, Mark
>> Cc: biojava-dev at biojava.org
>> Subject: Re: [Biojava-dev] DNATools.forSymbol
>>
>>
>> Hi Mark,
>>
>> Thanks for the amazingly quick response. (With a patch, no less.)
>>
>> But I'm still wondering why DNATools.forSymbol('n') should throw an
>> exception while DNATools.createDNA("n") does not. Is there a reason?
>>
>> Rhett
>>
>> On Thursday, March 13, 2003, at 03:51 PM, Schreiber, Mark wrote:
>>
>>> Hi -
>>>
>>> There is no good reason other than it is a weakly observed
>> convention
>>> to
>>> use lower case letters for DNA and RNA and upper case for Protein. I
>>> have changed the methods in DNA and RNA tools to be case
>> insensitive. I
>>> have commited the changes to biojava-live.
>>>
>>> - Mark
>>>
>>>
>>>> -----Original Message-----
>>>> From: Rhett Sutphin [mailto:rhett-sutphin at uiowa.edu]
>>>> Sent: Friday, 14 March 2003 10:44 a.m.
>>>> To: biojava-dev at biojava.org
>>>> Subject: [Biojava-dev] DNATools.forSymbol
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I have what might be a stupid question: why isn't
>>>> DNATools.forSymbol(c) the same as
>>>> DNATools.createDNA(Character.toString(c)).symbolAt(1) for all c?
>>>> forSymbol only works for lowercase a, c, g, and t, while createDNA
>>>> handles uppercase and lowercase of the whole DNA alphabet,
>> plus gaps.
>>>> Is there a special meaning/use of forSymbol that warrants this
>>>> difference in behavior?
>>>>
>>>> Just curious,
>>>> Rhett
>>
>>
> =======================================================================
> Attention: The information contained in this message and/or attachments
> from AgResearch Limited is intended only for the persons or entities
> to which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipients is prohibited by AgResearch
> Limited. If you have received this message in error, please notify the
> sender immediately.
> =======================================================================
More information about the biojava-dev
mailing list