[Biojava-l] DNATools lower case?

George Waldon gwaldon at geneinfinity.org
Fri May 27 17:12:01 UTC 2011


Hi Shirley,

I am not really familiar with this code but I think  
AlternateTokenization was introduced after the Logo code and that is  
why you do not find it there. Can you fill a bug report? Also I'll be  
happy to add any patch you submit.

Thank you.

George

Quoting Shirley Hui <shirleyh at gmail.com>:

> Thanks George.  It looks like using alternate tokenization works if you are
> "stringifying" a Sequence explicitly using the alphabet.getTokenization()
> method.
>
> But presumably this gets done within the DistributionLogo class or some
> other class down the line and I don't want to modify any Biojava classes
> unless I really have to.
>
> The way I am constructing the DNA sequences is like this:
>
> Sequences seq =DNATools.createDNASequence(sequence, name);
>
> The list sequences is used to make a SimpleWeightMatrix wm.
> Then the call to DistributionLogo is like this:
>
> Distribution dist = wm.getColumn(columnNumber);
> DistributionLogo dl = new DistributionLogo();
> dl.setRenderingHints(hints);
> dl.setOpaque(false);
> dl.setDistribution(dist);
> dl.setPreferredSize(new Dimension((int) columnWidth, (int) columnHeight));
> dl.setLogoPainter(new TextLogoPainter());
> dl.setStyle(symbolColorStyle);
>
> There no way that I can tell right now in the DNATools API to make the
> DNATools use the alternate string tokenization via the call to
> createDNASequence()
> or another type of set method?
>
> shirley
>
>
> On Fri, May 27, 2011 at 12:15 PM, George Waldon  
> <gwaldon at geneinfinity.org>wrote:
>
>> Hello Shirley,
>>
>> I think you need to use AlternateTokenisation at some point; check BJ1.8.1
>> Cookbook at http://www.biojava.org/wiki/BioJava:Cookbook:Sequence
>>
>> regards,
>>
>> George
>>
>>
>> Quoting Shirley Hui <shirleyh at gmail.com>:
>>
>>  Hi,
>>> I am using DNATools to generate dna Sequences.
>>> I noticed that the static methods in DNATools a(),c(),t(),g() map to lower
>>> case characters.
>>> I am using using DistributionLogo class to draw sequences logos for a set
>>> of
>>> dna Sequences.
>>> I think DistributionLogo is calling the static methods to map the
>>> nucleotides which is lower case.
>>> But I want the logo output the nucleotides in uppercase.  How can I do
>>> this?
>>> Thanks for your help
>>> shirley
>>> _______________________________________________
>>> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/biojava-l
>>>
>>>
>>
>>
>>
>






More information about the Biojava-l mailing list