biggests.gui
Class PanelFunctionAnalysis

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 biggests.gui.PanelFunctionAnalysis
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class PanelFunctionAnalysis
extends javax.swing.JPanel

Title: Function Analysis Panel

Description: This panel displays function analysis options to apply to a given bicluster or group of biclusters.

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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String OBO_FILE_NAME
           
static java.lang.String[] organisms
          Set of organisms to display in organism combo box.
 
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.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PanelFunctionAnalysis(BiggestsFrame frame)
          Creates a new PanelFunctionAnalysis.
 
Method Summary
 void browseGeneAssociationFilesPathButton_actionPerformed(java.awt.event.ActionEvent e)
          Handles event fired when the user clicks on browse gene association file path button.
 void browseGOFilesPathButton_actionPerformed(java.awt.event.ActionEvent e)
          Handles event fired when the user clicks browse gene ontology file path button.
 de.schlichtherle.io.File[] checkGOFiles(boolean biclustering_function)
          Checks the existence of the required gene ontology files (the gene ontology file and the specific gene association file for the specified organism) in the GO Files directory.
 float checkPValue()
          Checks the input of the p-value on pvalueTextField
 void clear()
          Clears this panel.
 void downloadGeneAssociationFileButton_actionPerformed(java.awt.event.ActionEvent e)
          Handles a mouse click event on download gene association file button.
 void downloadGeneOntologyFileButton_actionPerformed(java.awt.event.ActionEvent e)
          Handles a mouse click event on download gene ontology file button.
static java.lang.String findAnnotationFileExtensionForOrganism(java.lang.String organism)
          Finds and returns the corresponding annotation file extension for a given organism.
static java.lang.String findGeneAssociationFileName(java.lang.String organism, boolean filename_extension)
          Finds a specific filename or extension for a given organism.
 javax.swing.JButton getBrowseGeneAssociationFilePathButton()
          Returns browse gene association file path button.
 javax.swing.JButton getBrowseGeneOntologyFilePathButton()
          Returns browse gene ontology file path button.
 javax.swing.JLabel getFilesFunctionAnalysisLabel()
          Returns label of files to use on function analysis.
 javax.swing.JLabel getFunctionAnalysisLabel()
          Returns function analysis label.
 javax.swing.JLabel getGeneAssociationFilePathLabel()
          Returns gene association file path label.
 javax.swing.JTextField getGeneAssociationFilePathTextField()
          Returns gene association file path text field.
 javax.swing.JLabel getGeneOntologyFilePathLabel()
          Returns gene ontology file path label.
 javax.swing.JTextField getGeneOntologyFilePathTextField()
          Returns gene ontology file path text field.
 BiggestsFrame getMainFrame()
          Returns the application's main frame.
 java.lang.String getOrganism()
          Returns the organism related with this function analysis.
 javax.swing.JLabel getOrganismLabel()
          Returns the organism label.
 javax.swing.JLabel getPvalueLabel()
          Returns p-value label.
 javax.swing.JTextField getPvalueTextField()
          Returns text field for the input of a p-value.
 javax.swing.tree.TreePath getSelectionPath()
          Returns the dataset tree selected path which corresponds to the path of the dataset which in turn leads to the node with the matrix on which biclustering algorithm will be performed.
 void goFrontEndCheckBox_itemStateChanged(java.awt.event.ItemEvent e)
           
 void paint(javax.swing.tree.TreePath selectionPath)
          Paints the panel with information from the given selectionPath.
 javax.swing.SpringLayout springLayout()
          Returns the layout for this panel.
 GOFrontEnd useGOFrontEnd()
          Check if GO frontend can be used for function analysis.
 
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, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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
 

Field Detail

OBO_FILE_NAME

public static final java.lang.String OBO_FILE_NAME
See Also:
Constant Field Values

organisms

public static final java.lang.String[] organisms
Set of organisms to display in organism combo box.

Constructor Detail

PanelFunctionAnalysis

public PanelFunctionAnalysis(BiggestsFrame frame)
Creates a new PanelFunctionAnalysis.

Parameters:
frame - the main BiggestsFrame
Method Detail

clear

public void clear()
Clears this panel. Removes components that are not needed and sets others to default values.


paint

public void paint(javax.swing.tree.TreePath selectionPath)
Paints the panel with information from the given selectionPath.

Parameters:
selectionPath - the TreePath selected in a dataset tree

findGeneAssociationFileName

public static java.lang.String findGeneAssociationFileName(java.lang.String organism,
                                                           boolean filename_extension)
Finds a specific filename or extension for a given organism.

Parameters:
organism - String with the organism to find a gene association file for
filename_extension - boolean true if the String to return is the filename of the corresponding organism gene association file; false if the String to return is the file extension of the corresponding organism gene association file
Returns:
String the filename/extension of the corresponding organism gene association file

findAnnotationFileExtensionForOrganism

public static java.lang.String findAnnotationFileExtensionForOrganism(java.lang.String organism)
Finds and returns the corresponding annotation file extension for a given organism.

Parameters:
organism - String the name of the organism to find the annotation file extension for
Returns:
String the annotation file extension for the given organism

checkPValue

public float checkPValue()
Checks the input of the p-value on pvalueTextField

Returns:
a valid p-value float entered by the user

checkGOFiles

public de.schlichtherle.io.File[] checkGOFiles(boolean biclustering_function)
Checks the existence of the required gene ontology files (the gene ontology file and the specific gene association file for the specified organism) in the GO Files directory. In case there is some error displays a message to user and asks if he/she wants to correct it.

In case the gene ontology files are correct, returns:
File[0] - containing the gene ontology file.
File[1] - containing the gene association file.

Returns null if there was some error on the input (p-value or file paths are not valid) and the user wants to ignore it.

Returns File[0] if there was some error on the input (p-value or file paths are not valid) and the user wants to correct it.

Parameters:
biclustering_function - boolean that indicates if this panel is being used in biclustering (true) or in function panel (false)
Returns:
the File[] list of files

useGOFrontEnd

public GOFrontEnd useGOFrontEnd()
Check if GO frontend can be used for function analysis. Returns null if GO frontend does not exist for this dataset or if GO frontend is not selected by the user. Returns the correct GOFrontEnd object if GO frontend should be used.

Returns:
GOFrontEnd

browseGOFilesPathButton_actionPerformed

public void browseGOFilesPathButton_actionPerformed(java.awt.event.ActionEvent e)
Handles event fired when the user clicks browse gene ontology file path button.

Parameters:
e - ActionEvent fired when the user clicks browse gene ontology file path button

browseGeneAssociationFilesPathButton_actionPerformed

public void browseGeneAssociationFilesPathButton_actionPerformed(java.awt.event.ActionEvent e)
Handles event fired when the user clicks on browse gene association file path button.

Parameters:
e - ActionEvent fired when the user clicks on browse gene association file path button

getMainFrame

public BiggestsFrame getMainFrame()
Returns the application's main frame.

Returns:
the main BiggestsFrame

getSelectionPath

public javax.swing.tree.TreePath getSelectionPath()
Returns the dataset tree selected path which corresponds to the path of the dataset which in turn leads to the node with the matrix on which biclustering algorithm will be performed.

Returns:
the TreePath selected in the dataset tree

getOrganism

public java.lang.String getOrganism()
Returns the organism related with this function analysis.

Returns:
String organism

getFunctionAnalysisLabel

public javax.swing.JLabel getFunctionAnalysisLabel()
Returns function analysis label.

Returns:
function analysis JLabel

getPvalueLabel

public javax.swing.JLabel getPvalueLabel()
Returns p-value label.

Returns:
p-value JLabel

getPvalueTextField

public javax.swing.JTextField getPvalueTextField()
Returns text field for the input of a p-value.

Returns:
JTextField for the input of a p-value

getOrganismLabel

public javax.swing.JLabel getOrganismLabel()
Returns the organism label.

Returns:
organism JLabel

getFilesFunctionAnalysisLabel

public javax.swing.JLabel getFilesFunctionAnalysisLabel()
Returns label of files to use on function analysis.

Returns:
code>JLabel of files to use on function analysis

getGeneOntologyFilePathLabel

public javax.swing.JLabel getGeneOntologyFilePathLabel()
Returns gene ontology file path label.

Returns:
gene ontology file path JLabel

getGeneOntologyFilePathTextField

public javax.swing.JTextField getGeneOntologyFilePathTextField()
Returns gene ontology file path text field.

Returns:
gene ontology file path JTextField

getBrowseGeneOntologyFilePathButton

public javax.swing.JButton getBrowseGeneOntologyFilePathButton()
Returns browse gene ontology file path button.

Returns:
browse gene ontology file path JButton

getGeneAssociationFilePathLabel

public javax.swing.JLabel getGeneAssociationFilePathLabel()
Returns gene association file path label.

Returns:
gene association file path JLabel

getGeneAssociationFilePathTextField

public javax.swing.JTextField getGeneAssociationFilePathTextField()
Returns gene association file path text field.

Returns:
gene association file path JTextField

getBrowseGeneAssociationFilePathButton

public javax.swing.JButton getBrowseGeneAssociationFilePathButton()
Returns browse gene association file path button.

Returns:
browse gene association file path JButton

springLayout

public javax.swing.SpringLayout springLayout()
Returns the layout for this panel.

Returns:
SpringLayout

downloadGeneOntologyFileButton_actionPerformed

public void downloadGeneOntologyFileButton_actionPerformed(java.awt.event.ActionEvent e)
Handles a mouse click event on download gene ontology file button. Downloads the gene ontology file to GO_Files folder.

Parameters:
e - ActionEvent

downloadGeneAssociationFileButton_actionPerformed

public void downloadGeneAssociationFileButton_actionPerformed(java.awt.event.ActionEvent e)
Handles a mouse click event on download gene association file button. Downloads the gene association file to GO_Files folder.

Parameters:
e - ActionEvent

goFrontEndCheckBox_itemStateChanged

public void goFrontEndCheckBox_itemStateChanged(java.awt.event.ItemEvent e)