public static class SeqLogoPlotter.SeqLogoPlotGenerator extends Object implements PlotGeneratorResult.PlotGenerator
PlotGeneratorResult.PlotGenerator
for plotting sequence logos.Constructor and Description |
---|
SeqLogoPlotGenerator(double[][] pwm,
int height)
Creates a new
SeqLogoPlotter.SeqLogoPlotGenerator for the given PWM using the specified height of the plot. |
SeqLogoPlotGenerator(StringBuffer xml)
Creates a
SeqLogoPlotter.SeqLogoPlotGenerator from its XML representation. |
Modifier and Type | Method and Description |
---|---|
void |
generatePlot(GraphicsAdaptor ga)
Generates the plot using the
Graphics2D device of the supplied GraphicsAdaptor . |
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
public SeqLogoPlotGenerator(double[][] pwm, int height)
SeqLogoPlotter.SeqLogoPlotGenerator
for the given PWM using the specified height of the plot.
The corresponding width is computed automatically using the SeqLogoPlotter.getWidth(int, double[][])
method.pwm
- the PWMheight
- the height of the plotpublic SeqLogoPlotGenerator(StringBuffer xml) throws NonParsableException
SeqLogoPlotter.SeqLogoPlotGenerator
from its XML representation.xml
- the XML representationNonParsableException
- if XML could not be parsedpublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.public void generatePlot(GraphicsAdaptor ga) throws Exception
PlotGeneratorResult.PlotGenerator
Graphics2D
device of the supplied GraphicsAdaptor
.generatePlot
in interface PlotGeneratorResult.PlotGenerator
ga
- the graphics adaptorException
- if the plot could not be generated