[Biojava-l] FrameStopRenderer.java version 0.1 (warning: contains source)

Dr S.M. Huen smh1008@cus.cam.ac.uk
Mon, 14 May 2001 23:02:26 +0100 (BST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-851401618-989877746=:11744
Content-Type: TEXT/PLAIN; charset=US-ASCII

I've just written the first version of a frame stop renderer which will
form the basis of my six-frame stop renderer later.  i thought I'd put it
out for inspection and comments.

There is a private variable scaleTreshold to prevent this class attempting
to trigger the download of the entire chromosome sequence!  Perhaps I
ought to allow it to be set at object creation time?

To use, for now add something like this to SequenceViewer:-
      zml.addRenderer(new FrameStopRenderer(0, true));
      zml.addRenderer(new FrameStopRenderer(1, true));
      zml.addRenderer(new FrameStopRenderer(2, true));
      zml.addRenderer(new FrameStopRenderer(0, false));
      zml.addRenderer(new FrameStopRenderer(1, false));
      zml.addRenderer(new FrameStopRenderer(2, false));

This class will eventually be wrapped in a single six-frame renderer
class when I eventually get started on the six-frame ziggy renderer.
 
The first integer parameter specifies the modulo of the frame, the second,
the strand to be examined (isTopStrand).

There's a optimisation so that at small scales, it only searches far
enough to determine if there's a stop within a pixel and skips on to the
next pixel when that's the case.  Makes a big difference at low
resolution!

Could I hold off learning how to do CVS commits for the time being and
have someone handle that for me?  I don't have much coding time right
now and it's doing one or the other. I promise to learn it later: the last
time I had a look at Cyclic's manual on it, it had me mystified.

Thanks,
David Huen, Dept. of Genetics, Univ. of Cambridge.




---559023410-851401618-989877746=:11744
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="FrameStopRenderer.java"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SOL.3.96.1010514230226.11744B@virgo.cus.cam.ac.uk>
Content-Description: Source for FrameStopRenderer

LyoNCiAqICAgICAgICAgICAgICAgICAgICBCaW9KYXZhIGRldmVsb3BtZW50
IGNvZGUNCiAqDQogKiBUaGlzIGNvZGUgbWF5IGJlIGZyZWVseSBk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