[Biojava-dev] How to Use SixFrameRenderer and related classes?

David Huen smh1008 at cus.cam.ac.uk
Sat Aug 2 14:50:23 EDT 2003


On Sat, 2 Aug 2003, hywang wrote:

Could we have the whole stack trace please?  The top end seems missing so
I don't even know the Exception thrown.

> Hi, 
> 
> I had a test to view sequence feature in six frame mode.
> But I failed and got a big mass of error info which are
> not from my java code, so I couldn't even debug it.
> Could you please give me a hand to show me the right way
> to use SixFrameRenderer and related classes,please? 
> 
> Thanks ,
> Haiyan Wang 
> 
> below is my codes: 
> 
> try{
> six_panel = new SequencePanel();
> six_panel.setSequence(seq);
> MultiLineRenderer zml = new MultiLineRenderer();
> SixFrameRenderer sixFramePane = new SixFrameRenderer();
> SixFrameZiggyRenderer sixZig = new SixFrameZiggyRenderer   (sixFramePane);
> FeatureFilter cdsFilter = new FeatureFilter.ByType("CDS"); 
> 
> FeatureBlockSequenceRenderer featureBin = new 
> FeatureBlockSequenceRenderer(sixZig); 
> 
> zml.addRenderer(new OverlayRendererWrapper(new FilteringRenderer(featureBin, 
> cdsFilter, true)));
> zml.addRenderer(new OverlayRendererWrapper(new StopRenderer(sixFramePane, 0, 
> StrandedFeature.POSITIVE)));
> zml.addRenderer(new OverlayRendererWrapper(new StopRenderer(sixFramePane, 1, 
> StrandedFeature.POSITIVE)));
> zml.addRenderer(new OverlayRendererWrapper(new StopRenderer(sixFramePane, 2, 
> StrandedFeature.POSITIVE)));
> zml.addRenderer(new OverlayRendererWrapper(new StopRenderer(sixFramePane, 0, 
> StrandedFeature.NEGATIVE)));
> zml.addRenderer(new OverlayRendererWrapper(new StopRenderer(sixFramePane, 1, 
> StrandedFeature.NEGATIVE)));
> zml.addRenderer(new StopRenderer(sixFramePane, 2,StrandedFeature.NEGATIVE)); 
> 
> zml.addRenderer(new SymbolSequenceRenderer());
> zml.addRenderer(new RulerRenderer()); 
> 
> six_panel.setRange(new RangeLocation(1, seq.length()));
> six_panel.setRenderer(zml);
> six_panel.setScale(15);//400.0/seq.length());
> //System.out.println(seq.length());
> sixframe_view.getViewport().add(six_panel);
> }
> catch(ChangeVetoException e) {
>                e.printStackTrace();
> } 
> 
> /**************************************/ 
> 
> below are parts of the error info: 
> 
> 	at 
> org.biojava.bio.seq.io.SubArraySymbolList.symbolAt(SubArraySymbolList.java:7 
> 7)
> 	at 
> org.biojava.bio.seq.impl.SimpleSequence.symbolAt(SimpleSequence.java:101)
> 	at org.biojava.bio.gui.sequence.StopRenderer.isStop(StopRenderer.java:123)
> 	at 
> org.biojava.bio.gui.sequence.StopRenderer.renderOneFrame(StopRenderer.java:1 
> 61)
> 	at org.biojava.bio.gui.sequence.StopRenderer.paint(StopRenderer.java:197)
> 	at 
> org.biojava.bio.gui.sequence.LayeredRenderer.paint(LayeredRenderer.java:186)
> 	at 
> org.biojava.bio.gui.sequence.MultiLineRenderer.paint(MultiLineRenderer.java: 
> 186)
> 	at 
> org.biojava.bio.gui.sequence.SequencePanel.paintComponent(SequencePanel.java 
> :471)
> 	at javax.swing.JComponent.paint(JComponent.java:808)
> 	at javax.swing.JComponent.paintChildren(JComponent.java:647)
> ... 
> 
> /***********************************************/ 
> 
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev
> 

David Huen, Ph.D.              Email: smh1008 at cus.cam.ac.uk
Dept. of Genetics              Fax  : +44 1223 333992
University of Cambridge        Phone: +44 1223 766748/333982
Cambridge, CB2 3EH
U.K.



More information about the biojava-dev mailing list