[Biojava-l] Biojava in Artemis

Thomas Down thomas at derkholm.net
Tue Aug 26 05:04:13 EDT 2003


Once upon a time, Derek Gatherer wrote:
> Hi
> 
> I have a couple of questions regarding codon bias measurements.
> 
> 1) Is there a codon usage object in Biojava?
> 2) How easy would it be to integrate it into Artemis (to add things to the 
> Graph menu)?
> 
> I've seen references to
> CrossProductAlphabet codonAlphabet = AlphabetManager
> 
> in the archive, so I think I can manage to generate a codon usage table, 
> and compute codon bias statistics from that, but I was wondering if 
> something more complete has already been written.
> 
> I have been using TreeMaps to make codon usage tables within Artemis 
> classes, but they seem to be very slow, eg:
> Collator co = Collator.getInstance();
> TreeMap codonUsageTable = new TreeMap(co);
> 
> and then accessing them using .put() and .get() TreeMap methods.  But the 
> performance is poor compared to the Artemis classes that just read single 
> chars, eg GCFrameAlgorithm.

BioJava applications generally represent codons as symbols over
the alphabet DNA * DNA * DNA (or RNA * RNA * RNA).  There are
Distribution objects (in the org.biojava.bio.dist package) that
are reasonably fast and could be used to calculate and store
a probability distribution over the codon alphabet.

I don't know of a single example program which does exactly
what you want, but most of the pieces are in the tutorial.
Take a look at:

    http://www.biojava.org/docs/bj_in_anger/index.htm

with particular reference to the sections headed `Alphabets
and Symbols' and `Counts and Distributions'.

Hope this helps,

   Thomas.


More information about the Biojava-l mailing list