My problem was adding codon bias and other sliding wndow codon usage plots to the graph menu. I considered 3 solutions:
1) Write my own object based on TreeMap, to store the codon usage in a Perl-hash-like structure. This was straightforward to code, but the refresh rate on changing window size or zooming in or out, was too slow.
2) Adapt a BioJava object. There is no prewritten codon bias object in BioJava. I reckoned in any case that if a simple TreeMap object was too slow, it was unlikely that an adapted BioJava object would be any quicker.
3) Adapt the existing diana/plot/KarlinSigAlgorithm, which holds dimers in a 2-D int array, to become a 4-D array holding triplets and frame, and outputting values[] at 3 instead of 1. This is much faster than using any TreeMap or HashMap associative array.
Cheers Derek
