|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet net.sf.basedb.clients.web.servlet.PlotServlet
public final class PlotServlet
This servlet can plot spot data for a bioassay or bioassay set. It uses the JFreePlot package to generate the plots. It accepts the following parameters:
Parameter | Required | Default value | Description |
---|---|---|---|
ID | yes | The SessionControl ID. See Application.getSessionControl(String, String) . |
|
bioassayset_id | no | The ID of the bioassay set to plot. If no value is specified the bioassay_id is required. | |
bioassay_id | if a bioassay set hasn't been specified | The ID of the bioassay to plot. | |
type | no | scatter | The type of plot to create. Supported values are "scatter", "histogram" or "cfplot". |
download | no | false | A boolean value. If 1 or true, the browser will ask to save the image on the local disk. |
saveAs | no | If specified, the image is saved as a file in the BASE file structure. | |
overwrite | no | false | A boolean values, that is used with the "saveAs" parameter. If 1 or true, an existing file will be overwritten with the image. |
width | no | 600 | The width of the generated image in pixels. Must be between 100 and 1000 pixels. The default and max width can be configured in the web.xml file. |
height | no | 400 | The hieght of the generated image in pixels. Must be between 100 and 800. The default and max height can be configured in the web.xml file. |
format | no | png | The format of the image, "png" and "jpg" are the only supported values. |
xLog | no | false | A boolean parameter. If 1 or true the logarithm of the x values is calculated before plotting them. |
yLog | no | false | A boolean parameter. If 1 or true the logarithm of the y values is calculated before plotting them. |
x | yes, unless type is "cfplot" | The expression to plot on the x axis. Multiple x parameters may be specified to plot multiple series. | |
y | no, unless type is "scatter" | The expression to plot on the y axis. Multiple y parameters may be specified to plot multiple series. | |
filter | no | An optional filter expression that limits the result returned by the spot query. | |
title | no | The title of the plot. If not specified the plot is generated without title. | |
xLabel | no | The label on the x-axis. If not specified the plot is generated without label. | |
yLabel | no | The label on the y-axis. If not specified the plot is generated without label. | |
annotation | no | Can only be used when plotting a bioassay set. The only allowed value so far is "bioassay" which plots the spots for each bioassay in different series and color. | |
binSize | no | 1.0 | Only used for histogram plots. This is the range of values put into each bin in the histogram. Ie. if the size is 1, the first bin may have values from -5 to -4, the second bin from -4 to -3, and so on. |
yAggregate | no | count | Only used for histogram plots. Determines what to plot on the y axis. Allowed values are "count", "mean", "sum", "max", "min", "stdev". If a value other than "count" is used an expression for the y-axis must also be specified. |
hiloAggregate | no | Only used for histogram plots when the yAggregate parameter isn't "count". Allowed values are "hilomaxmin" and "hilostdev". This options adds a high-low bar to each bin that is either the max/min range or the plotted value +/- 1 standard deviation of the values in each bin. |
Nested Class Summary | |
---|---|
private static class |
PlotServlet.CFResultIterator
Special implementation of a SqlResultIterator
that combines the result from the parent and child into
one virtual iterator. |
private static class |
PlotServlet.CFSqlResult
A single result row that is combined from the parent and child results. 1 --> parent A, 2 --> parent M, 3 --> parent M - child M |
Field Summary | |
---|---|
private String |
cacheBase
|
private String |
defaultFormat
|
private int |
defaultHeight
|
private int |
defaultWidth
|
private int |
maxHeight
|
private int |
maxWidth
|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
PlotServlet()
|
Method Summary | |
---|---|
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
|
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Forwards requests to doGet(HttpServletRequest, HttpServletResponse) |
private JFreeChart |
generateCFPlot(BioAssay ba,
String xLabel,
String yLabel)
Generates a correction-factor plot, which is plotting the MA-data for the parent together with the difference in M between the parent and child. |
void |
init()
|
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private int maxWidth
private int maxHeight
private int defaultWidth
private int defaultHeight
private String defaultFormat
private String cacheBase
Constructor Detail |
---|
public PlotServlet()
Method Detail |
---|
public void init() throws ServletException
init
in class GenericServlet
ServletException
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
doGet
in class HttpServlet
IOException
ServletException
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
doGet(HttpServletRequest, HttpServletResponse)
doPost
in class HttpServlet
IOException
ServletException
private JFreeChart generateCFPlot(BioAssay ba, String xLabel, String yLabel) throws Exception
Exception
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |