biggests.gui
Class PanelExpressionChart

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.jfree.chart.ChartPanel
                      extended by biggests.gui.PanelExpressionChart
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, org.jfree.chart.event.ChartChangeListener, org.jfree.chart.event.ChartProgressListener

public class PanelExpressionChart
extends org.jfree.chart.ChartPanel

Title: Expression Chart Panel

Description: A panel which holds an expression chart. Allows one to construct specific charts for gene expression data.

Copyright: Copyright (C) 2007 Joana Gonçalves This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class org.jfree.chart.ChartPanel
DEFAULT_BUFFER_USED, DEFAULT_HEIGHT, DEFAULT_MAXIMUM_DRAW_HEIGHT, DEFAULT_MAXIMUM_DRAW_WIDTH, DEFAULT_MINIMUM_DRAW_HEIGHT, DEFAULT_MINIMUM_DRAW_WIDTH, DEFAULT_WIDTH, DEFAULT_ZOOM_TRIGGER_DISTANCE, localizationResources, PRINT_COMMAND, PROPERTIES_COMMAND, SAVE_COMMAND, ZOOM_IN_BOTH_COMMAND, ZOOM_IN_DOMAIN_COMMAND, ZOOM_IN_RANGE_COMMAND, ZOOM_OUT_BOTH_COMMAND, ZOOM_OUT_DOMAIN_COMMAND, ZOOM_OUT_RANGE_COMMAND, ZOOM_RESET_BOTH_COMMAND, ZOOM_RESET_DOMAIN_COMMAND, ZOOM_RESET_RANGE_COMMAND
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PanelExpressionChart(smadeira.biclustering.Bicluster bicluster, boolean pattern, int width, int height, java.lang.String title, int minimumDrawWidth, int minimumDrawHeight, int maximumDrawWidth, int maximumDrawHeight, boolean useBuffer, boolean properties, boolean save, boolean print, boolean zoom, boolean tooltips, boolean shapesVisible, boolean includeLegend, boolean normalize)
          Constructs a gene or pattern expression chart with the genes names, conditions names and gene expression data retrieved from the given bicluster.
PanelExpressionChart(char[] pattern, char[] alphabet, char missingValue, java.lang.String[] conditionsNames, int[] columnIndexes, int width, int height, java.lang.String title, int minimumDrawWidth, int minimumDrawHeight, int maximumDrawWidth, int maximumDrawHeight, boolean useBuffer, boolean properties, boolean save, boolean print, boolean zoom, boolean tooltips, boolean shapesVisible, boolean includeLegend)
          Constructs a pattern expression chart based on the given expression pattern (sequence of symbols) within the given alphabet (set of symbols that can appear in pattern).
PanelExpressionChart(java.lang.String[] genesNames, java.lang.String[] conditionsNames, float[][] expressionValues, float missingValue, int width, int height, java.lang.String title, int minimumDrawWidth, int minimumDrawHeight, int maximumDrawWidth, int maximumDrawHeight, boolean useBuffer, boolean properties, boolean save, boolean print, boolean zoom, boolean tooltips, boolean shapesVisible, boolean includeLegend, boolean normalize)
          Constructs a gene expression chart with the given genesNames, conditionsNames and respective expressionValues
 
Method Summary
static org.jfree.chart.JFreeChart createBiclusterChart(org.jfree.data.category.CategoryDataset dataset, java.lang.String title, boolean pattern, boolean shapesVisible, boolean includeLegend)
           
static org.jfree.data.category.CategoryDataset createBiclusterDataset(smadeira.biclustering.Bicluster bicluster, boolean pattern, boolean normalize)
          Creates an expression/pattern category dataset based on genes names, conditions names and expression values or pattern retrieved from the bicluster object.
static PanelExpressionChart createExpressionAllTimePointsChart(smadeira.biclustering.Bicluster bicluster, int width, int height, java.lang.String title, boolean normalize)
          Creates a new panel holding an all time points expression chart, with expression data retrieved from bicluster and biclustering objects.
static PanelExpressionChart createExpressionAllTimePointsChart(smadeira.biclustering.Bicluster bicluster, java.lang.String title, int width, int height, boolean normalize)
          Creates a new panel holding an all time points expression chart, with expression data retrieved from bicluster and biclustering objects.
static PanelExpressionChart createExpressionBiclusterPatternChart(smadeira.biclustering.CCC_Bicluster bicluster, int width, int height, java.lang.String title, boolean miniature)
          Creates a new bicluster expression pattern chart panel for a given bicluster.
static PanelExpressionChart createExpressionBiclusterTimePointsChart(smadeira.biclustering.Bicluster bicluster, int width, int height, boolean normalize, boolean miniature)
          Creates a new time points expression chart panel for a given bicluster.
static PanelExpressionChart createExpressionBiclusterTimePointsChart(smadeira.biclustering.Bicluster bicluster, int width, int height, java.lang.String title, boolean normalize, boolean miniature)
          Creates a new time points expression chart panel for a given bicluster.
static org.jfree.chart.JFreeChart createExpressionChart(org.jfree.data.category.CategoryDataset expressionDataset, java.lang.String chartTitle, java.lang.String conditionsAxisName, java.lang.String expressionAxisName, boolean shapesVisible, boolean includeLegend)
          Creates a general expression chart from the given expressionDataset and with the given chartTitle, conditionsAxisName, expressionAxisName.
static org.jfree.data.category.CategoryDataset createExpressionDataset(smadeira.biclustering.Bicluster bicluster, boolean normalize)
          Creates an expression dataset for a bicluster.
static org.jfree.data.category.CategoryDataset createExpressionDataset(java.lang.String[] genesNames, java.lang.String[] conditionsNames, float[][] expressionValues, float missingValue, boolean normalize)
          Creates a new expression category dataset with the given genesNames, conditionsNames and expressionValues.
static org.jfree.chart.JFreeChart createExpressionPatternChart(org.jfree.data.category.CategoryDataset patternDataset, java.lang.String title, boolean shapesVisible, boolean includeLegend)
          Creates a new pattern expression chart from a given expression patternDataset.
static org.jfree.chart.JFreeChart createGeneExpressionChart(org.jfree.data.category.CategoryDataset expressionDataset, java.lang.String title, boolean shapesVisible, boolean includeLegend)
          Creates a new gene expression chart from a given expressionDataset.
static org.jfree.data.category.CategoryDataset createPatternExpressionDataset(smadeira.biclustering.CCC_Bicluster bicluster)
          Creates a pattern expression dataset for the given bicluster.
static org.jfree.data.category.CategoryDataset createPatternExpressionDataset(char[] pattern, char[] alphabet, char missingValue, java.lang.String[] conditionsNames, int[] columnIndexes)
          Creates an expression pattern dataset based on the given expression pattern (sequence of symbols) within the given alphabet (set of symbols that can appear in pattern).
 void doSaveAs()
           
 java.lang.String[] getConditionsNames()
          Returns the names of the conditions in the expression chart.
 float[][] getExpressionValues()
          Returns the expression values in the expression chart.
 java.lang.String[] getGenesNames()
          Returns the names of the genes in the expression chart.
 PanelExpressionChart repaintTimePointsChart(int width, int height, boolean normalize)
          Returns a new time points (bicluster or all time points) chart panel, repainted from the the current one.
 
Methods inherited from class org.jfree.chart.ChartPanel
actionPerformed, addChartMouseListener, chartChanged, chartProgress, createChartPrintJob, createPopupMenu, displayPopupMenu, doEditChartProperties, getAnchor, getChart, getChartRenderingInfo, getDismissDelay, getEntityForPoint, getFillZoomRectangle, getHorizontalAxisTrace, getHorizontalTraceLine, getInitialDelay, getListeners, getMaximumDrawHeight, getMaximumDrawWidth, getMinimumDrawHeight, getMinimumDrawWidth, getPopupMenu, getRefreshBuffer, getReshowDelay, getScaleX, getScaleY, getScreenDataArea, getScreenDataArea, getToolTipText, getVerticalAxisTrace, getVerticalTraceLine, getZoomInFactor, getZoomOutFactor, getZoomTriggerDistance, isDomainZoomable, isEnforceFileExtensions, isRangeZoomable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paintComponent, print, removeChartMouseListener, restoreAutoBounds, restoreAutoDomainBounds, restoreAutoRangeBounds, scale, setAnchor, setChart, setDismissDelay, setDisplayToolTips, setDomainZoomable, setEnforceFileExtensions, setFillZoomRectangle, setHorizontalAxisTrace, setHorizontalTraceLine, setInitialDelay, setMaximumDrawHeight, setMaximumDrawWidth, setMinimumDrawHeight, setMinimumDrawWidth, setMouseZoomable, setMouseZoomable, setPopupMenu, setRangeZoomable, setRefreshBuffer, setReshowDelay, setVerticalAxisTrace, setVerticalTraceLine, setZoomInFactor, setZoomOutFactor, setZoomTriggerDistance, translateJava2DToScreen, translateScreenToJava2D, zoom, zoomInBoth, zoomInDomain, zoomInRange, zoomOutBoth, zoomOutDomain, zoomOutRange
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PanelExpressionChart

public PanelExpressionChart(smadeira.biclustering.Bicluster bicluster,
                            boolean pattern,
                            int width,
                            int height,
                            java.lang.String title,
                            int minimumDrawWidth,
                            int minimumDrawHeight,
                            int maximumDrawWidth,
                            int maximumDrawHeight,
                            boolean useBuffer,
                            boolean properties,
                            boolean save,
                            boolean print,
                            boolean zoom,
                            boolean tooltips,
                            boolean shapesVisible,
                            boolean includeLegend,
                            boolean normalize)
                     throws InvalidNodeObjectTypeException
Constructs a gene or pattern expression chart with the genes names, conditions names and gene expression data retrieved from the given bicluster.

Parameters:
bicluster - the Bicluster which contains the matrix object with the data to represent on the expression chart
pattern - the boolean value that indicates if this chart is meant to be a pattern expression chart ( true)or a gene expression chart ( false)
width - the int width of the expression chart
height - the int height of the expression chart
minimumDrawWidth - the int minimum draw width of the expression chart
minimumDrawHeight - the int minimum draw height of the expression chart
maximumDrawWidth - the int maximum draw width of the expression chart
maximumDrawHeight - the int maximum draw height of the expression chart
useBuffer - boolean true if a buffer should be used; false if not
properties - boolean true if properties should be accessible via context menu; false if otherwise
save - boolean true if save option should be available via context menu; false if otherwise
print - boolean true if print option should be available via context menu; false if otherwise
zoom - boolean true if zoom option should be available via context menu; false if otherwise
tooltips - boolean true if tooltips should be displayed; false otherwise
shapesVisible - boolean true if the shapes of the expression points should be displayed in the chart
includeLegend - boolean true if a legend with the genes names should be displayed; false othwerwise
normalize - boolean true if expression values should be normalized before creating the expression chart; false otherwise
Throws:
InvalidNodeObjectTypeException - if nodeInfo does not contain a valid node object

PanelExpressionChart

public PanelExpressionChart(java.lang.String[] genesNames,
                            java.lang.String[] conditionsNames,
                            float[][] expressionValues,
                            float missingValue,
                            int width,
                            int height,
                            java.lang.String title,
                            int minimumDrawWidth,
                            int minimumDrawHeight,
                            int maximumDrawWidth,
                            int maximumDrawHeight,
                            boolean useBuffer,
                            boolean properties,
                            boolean save,
                            boolean print,
                            boolean zoom,
                            boolean tooltips,
                            boolean shapesVisible,
                            boolean includeLegend,
                            boolean normalize)
                     throws InvalidNodeObjectTypeException
Constructs a gene expression chart with the given genesNames, conditionsNames and respective expressionValues

Parameters:
genesNames - the String[] set of genes names
conditionsNames - the String[] set of conditions names
expressionValues - the float[][] set of expression values
missingValue - the value which marks missings
width - the int width of the expression chart
height - the int height of the expression chart
minimumDrawWidth - the int minimum draw width of the expression chart
minimumDrawHeight - the int minimum draw height of the expression chart
maximumDrawWidth - the int maximum draw width of the expression chart
maximumDrawHeight - the int maximum draw height of the expression chart
useBuffer - boolean true if a buffer should be used; false if not
properties - boolean true if properties should be accessible via context menu; false if otherwise
save - boolean true if save option should be available via context menu; false if otherwise
print - boolean true if print option should be available via context menu; false if otherwise
zoom - boolean true if zoom option should be available via context menu; false if otherwise
tooltips - boolean true if tooltips should be displayed; false otherwise
shapesVisible - boolean true if the shapes of the expression points should be displayed in the chart
includeLegend - boolean true if a legend with the genes names should be displayed; false othwerwise
normalize - boolean true if expression values should be normalized before creating the expression chart; false otherwise
Throws:
InvalidNodeObjectTypeException - if nodeInfo does not contain a valid node object

PanelExpressionChart

public PanelExpressionChart(char[] pattern,
                            char[] alphabet,
                            char missingValue,
                            java.lang.String[] conditionsNames,
                            int[] columnIndexes,
                            int width,
                            int height,
                            java.lang.String title,
                            int minimumDrawWidth,
                            int minimumDrawHeight,
                            int maximumDrawWidth,
                            int maximumDrawHeight,
                            boolean useBuffer,
                            boolean properties,
                            boolean save,
                            boolean print,
                            boolean zoom,
                            boolean tooltips,
                            boolean shapesVisible,
                            boolean includeLegend)
                     throws java.lang.Exception
Constructs a pattern expression chart based on the given expression pattern (sequence of symbols) within the given alphabet (set of symbols that can appear in pattern).

Parameters:
pattern - the char[] expression pattern
alphabet - the char[] expression alphabet
missingValue - the value which marks missings
conditionsNames - the String[] names of the conditions
columnIndexes - the int[] indexes of the columns from which the conditions were taken (exclusively for charts of expression patterns originated from matrices discretized by variations between time points techniques
width - the int width of the expression chart
height - the int height of the expression chart
minimumDrawWidth - the int minimum draw width of the expression chart
minimumDrawHeight - the int minimum draw height of the expression chart
maximumDrawWidth - the int maximum draw width of the expression chart
maximumDrawHeight - the int maximum draw height of the expression chart
useBuffer - boolean true if a buffer should be used; false if not
properties - boolean true if properties should be accessible via context menu; false if otherwise
save - boolean true if save option should be available via context menu; false if otherwise
print - boolean true if print option should be available via context menu; false if otherwise
zoom - boolean true if zoom option should be available via context menu; false if otherwise
tooltips - boolean true if tooltips should be displayed; false otherwise
shapesVisible - boolean true if the shapes of the expression points should be displayed in the chart
includeLegend - boolean true if a legend with the genes names should be displayed; false othwerwise
Throws:
java.lang.Exception
Method Detail

createPatternExpressionDataset

public static org.jfree.data.category.CategoryDataset createPatternExpressionDataset(char[] pattern,
                                                                                     char[] alphabet,
                                                                                     char missingValue,
                                                                                     java.lang.String[] conditionsNames,
                                                                                     int[] columnIndexes)
                                                                              throws java.lang.Exception
Creates an expression pattern dataset based on the given expression pattern (sequence of symbols) within the given alphabet (set of symbols that can appear in pattern).

Parameters:
pattern - the char[] expression pattern
alphabet - the char[] expression alphabet
missingValue - the value which marks missings
conditionsNames - the String[] names of the conditions
columnIndexes - the int[] indexes of the columns from which the conditions were taken (exclusively for charts of expression patterns originated from matrices discretized by variations between time points techniques
Returns:
the CategoryDataset representing the given expression pattern
Throws:
java.lang.Exception

createPatternExpressionDataset

public static org.jfree.data.category.CategoryDataset createPatternExpressionDataset(smadeira.biclustering.CCC_Bicluster bicluster)
Creates a pattern expression dataset for the given bicluster. Handles all kinds of biclusters obtained from discrete data and also biclusters from VBTP matrices (discretized with variations between time points technique), as well as biclusters with gene shifts and/or restricted errors, sign changes and/or time lags.

Parameters:
bicluster - the CCC_Bicluster or one of its subclasses object with data to create the pattern expression dataset
Returns:
CategoryDataset the pattern expression dataset

createBiclusterDataset

public static org.jfree.data.category.CategoryDataset createBiclusterDataset(smadeira.biclustering.Bicluster bicluster,
                                                                             boolean pattern,
                                                                             boolean normalize)
                                                                      throws InvalidNodeObjectTypeException
Creates an expression/pattern category dataset based on genes names, conditions names and expression values or pattern retrieved from the bicluster object.

Parameters:
bicluster - the Bicluster from which the expression data will be retrieved
pattern - the boolean value that indicates if this chart is meant to be a pattern expression chart ( true)or a gene expression chart ( false)
normalize - the boolean true if the original expression values should be normalized before creating the expression chart; false otherwise
Returns:
the CategoryDataset containing the necessary data to construct an expression chart
Throws:
InvalidNodeObjectTypeException

createExpressionDataset

public static org.jfree.data.category.CategoryDataset createExpressionDataset(smadeira.biclustering.Bicluster bicluster,
                                                                              boolean normalize)
Creates an expression dataset for a bicluster.

Parameters:
bicluster - the Bicluster from which the expression dataset will be constructed.
normalize - boolean true if expression data in the dataset should be normalized by gene
Returns:
CategoryDataset the bicluster expression dataset

createExpressionDataset

public static org.jfree.data.category.CategoryDataset createExpressionDataset(java.lang.String[] genesNames,
                                                                              java.lang.String[] conditionsNames,
                                                                              float[][] expressionValues,
                                                                              float missingValue,
                                                                              boolean normalize)
Creates a new expression category dataset with the given genesNames, conditionsNames and expressionValues.

Parameters:
genesNames - the String[] set of genes names
conditionsNames - the String[] set of conditions names
expressionValues - the float[][] set of expression values
missingValue - the value which marks missings
normalize - the boolean true if the original expression values should be normalized before creating the expression chart; false otherwise
Returns:
the CategoryDataset containing the necessary data to construct an expression chart

createGeneExpressionChart

public static org.jfree.chart.JFreeChart createGeneExpressionChart(org.jfree.data.category.CategoryDataset expressionDataset,
                                                                   java.lang.String title,
                                                                   boolean shapesVisible,
                                                                   boolean includeLegend)
Creates a new gene expression chart from a given expressionDataset.

Parameters:
expressionDataset - the expression CategoryDataset
shapesVisible - the boolean true if the shapes in the charts time points should be displayed; false if otherwise
includeLegend - the boolean true if a legend of the chart should be included; false otherwise
Returns:
the newly constructed gene expression JFreeChart

createExpressionPatternChart

public static org.jfree.chart.JFreeChart createExpressionPatternChart(org.jfree.data.category.CategoryDataset patternDataset,
                                                                      java.lang.String title,
                                                                      boolean shapesVisible,
                                                                      boolean includeLegend)
Creates a new pattern expression chart from a given expression patternDataset.

Parameters:
patternDataset - the expression pattern CategoryDataset
shapesVisible - the boolean true if the shapes in the charts time points should be displayed; false if otherwise
includeLegend - the boolean true if a legend of the chart should be included; false otherwise
Returns:
the newly constructed expression pattern JFreeChart

createBiclusterChart

public static org.jfree.chart.JFreeChart createBiclusterChart(org.jfree.data.category.CategoryDataset dataset,
                                                              java.lang.String title,
                                                              boolean pattern,
                                                              boolean shapesVisible,
                                                              boolean includeLegend)

createExpressionChart

public static org.jfree.chart.JFreeChart createExpressionChart(org.jfree.data.category.CategoryDataset expressionDataset,
                                                               java.lang.String chartTitle,
                                                               java.lang.String conditionsAxisName,
                                                               java.lang.String expressionAxisName,
                                                               boolean shapesVisible,
                                                               boolean includeLegend)
Creates a general expression chart from the given expressionDataset and with the given chartTitle, conditionsAxisName, expressionAxisName.

Parameters:
expressionDataset - the expression CategoryDataset
chartTitle - the chart title String
conditionsAxisName - the name of the conditions axis String
expressionAxisName - the name of the expression values axis String
shapesVisible - the boolean true if the shapes in the charts time points should be displayed; false if otherwise
includeLegend - the boolean true if a legend of the chart should be included; false otherwise
Returns:
the newly constructed expression JFreeChart

createExpressionBiclusterTimePointsChart

public static PanelExpressionChart createExpressionBiclusterTimePointsChart(smadeira.biclustering.Bicluster bicluster,
                                                                            int width,
                                                                            int height,
                                                                            java.lang.String title,
                                                                            boolean normalize,
                                                                            boolean miniature)
                                                                     throws InvalidNodeObjectTypeException
Creates a new time points expression chart panel for a given bicluster.

Parameters:
bicluster - a Bicluster from which the expression data will be retrieved
width - the int fixed draw width of the expression chart
height - the int fixed draw height of the expression chart
title - the String title for the chart panel
normalize - the boolean true if the original expression values should be normalized before creating the expression chart; false otherwise
miniature - the boolean true if the chart to create is a miniature (it will then contain no legend, no normalized data and other specific characteristics)
Returns:
the new PanelExpressionChart
Throws:
InvalidNodeObjectTypeException

createExpressionBiclusterTimePointsChart

public static PanelExpressionChart createExpressionBiclusterTimePointsChart(smadeira.biclustering.Bicluster bicluster,
                                                                            int width,
                                                                            int height,
                                                                            boolean normalize,
                                                                            boolean miniature)
                                                                     throws InvalidNodeObjectTypeException
Creates a new time points expression chart panel for a given bicluster.

Parameters:
bicluster - a Bicluster from which the expression data will be retrieved
width - the int fixed draw width of the expression chart
height - the int fixed draw height of the expression chart
normalize - the boolean true if the original expression values should be normalized before creating the expression chart; false otherwise
miniature - the boolean true if the chart to create is a miniature (it will then contain no legend, no normalized data and other specific characteristics)
Returns:
the new PanelExpressionChart
Throws:
InvalidNodeObjectTypeException
See Also:
#createExpressionBiclusterTimePointsChart(CCC_Bicluster bicluster, int width, int height, String title, boolean normalize, boolean miniature)

createExpressionBiclusterPatternChart

public static PanelExpressionChart createExpressionBiclusterPatternChart(smadeira.biclustering.CCC_Bicluster bicluster,
                                                                         int width,
                                                                         int height,
                                                                         java.lang.String title,
                                                                         boolean miniature)
                                                                  throws java.lang.Exception
Creates a new bicluster expression pattern chart panel for a given bicluster.

Parameters:
bicluster - a CCC_Bicluster from which the expression data will be retrieved
width - the int fixed draw width of the expression chart
height - the int fixed draw height of the expression chart
title - the String title for the chart panel
miniature - the boolean true if the chart to create is a miniature (it will then contain no legend, no normalized data and other specific characteristics)
Returns:
the new pattern PanelExpressionChart
Throws:
java.lang.Exception

createExpressionAllTimePointsChart

public static PanelExpressionChart createExpressionAllTimePointsChart(smadeira.biclustering.Bicluster bicluster,
                                                                      int width,
                                                                      int height,
                                                                      java.lang.String title,
                                                                      boolean normalize)
                                                               throws InvalidNodeObjectTypeException
Creates a new panel holding an all time points expression chart, with expression data retrieved from bicluster and biclustering objects.

Parameters:
bicluster - a Bicluster from which the names of the genes will be retrieved
width - the int fixed draw width of the expression chart
height - the int fixed draw height of the expression chart
normalize - the boolean true if the original expression values should be normalized before creating the expression chart; false otherwise
Returns:
the new all time points PanelExpressionChart
Throws:
InvalidNodeObjectTypeException

createExpressionAllTimePointsChart

public static PanelExpressionChart createExpressionAllTimePointsChart(smadeira.biclustering.Bicluster bicluster,
                                                                      java.lang.String title,
                                                                      int width,
                                                                      int height,
                                                                      boolean normalize)
                                                               throws InvalidNodeObjectTypeException
Creates a new panel holding an all time points expression chart, with expression data retrieved from bicluster and biclustering objects.

Parameters:
bicluster - a Bicluster from which the names of the genes will be retrieved
width - the int fixed draw width of the expression chart
height - the int fixed draw height of the expression chart
normalize - the boolean true if the original expression values should be normalized before creating the expression chart; false otherwise
Returns:
the new all time points PanelExpressionChart
Throws:
InvalidNodeObjectTypeException

repaintTimePointsChart

public PanelExpressionChart repaintTimePointsChart(int width,
                                                   int height,
                                                   boolean normalize)
                                            throws InvalidNodeObjectTypeException,
                                                   java.lang.Exception
Returns a new time points (bicluster or all time points) chart panel, repainted from the the current one.

Parameters:
width - the int fixed draw width of the expression chart
height - the int fixed draw height of the expression chart
normalize - the boolean true if the original expression values should be normalized before creating the expression chart; false otherwise
Returns:
the repainted time points PanelExpressionChart
Throws:
InvalidNodeObjectTypeException
java.lang.Exception

getGenesNames

public java.lang.String[] getGenesNames()
Returns the names of the genes in the expression chart.

Returns:
the String[] set of genes names

getConditionsNames

public java.lang.String[] getConditionsNames()
Returns the names of the conditions in the expression chart.

Returns:
the String[] set of conditions names

getExpressionValues

public float[][] getExpressionValues()
Returns the expression values in the expression chart.

Returns:
the float[][] set of expression values

doSaveAs

public void doSaveAs()
              throws java.io.IOException
Overrides:
doSaveAs in class org.jfree.chart.ChartPanel
Throws:
java.io.IOException