edu.cmu.cs.sb.drem
Class DREM_IO

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by edu.cmu.cs.sb.drem.DREM_IO
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class DREM_IO
extends javax.swing.JFrame
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener

Class implementing the main input interface

See Also:
Serialized Form

Nested Class Summary
 class DREM_IO.Downloadfile
          A runnable class used for controlling the downloading of files
 class DREM_IO.Progressdownload
          Runnable class used to display the download progress and also starts the download of a file
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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 javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DREM_IO()
          Class constructor - builds the input interface calls parseDefaults to get the initial settings from a default settings file if specified
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Responds to buttons being pressed on the main input interface
static DREM_DataSet buildset(java.lang.String szorganismsourceval, java.lang.String szxrefsourceval, java.lang.String szxrefval, java.lang.String szexp1val, java.lang.String szgoval, java.lang.String szgocategoryval, int nmaxmissing, double dexpressedval, double dmincorrelation, int nsamplespval, int nmingo, int nmingolevel, java.lang.String szextraval, boolean balltime, java.util.Vector repeatnames, boolean btakelog, boolean bspotincluded, boolean badd0, java.lang.String szcategoryIDval, java.lang.String szevidenceval, java.lang.String sztaxonval, boolean bpontoval, boolean bcontoval, boolean bfontoval, boolean brandomgoval, boolean bmaxminval)
          Returns a DREM_DataSet based on the provided input parameters
 void clusterscript(java.lang.String szstaticFieldval, java.lang.String szxrefval, java.lang.String szexp1val, java.lang.String szgoval, java.lang.String szgocategoryval, java.lang.String szmaxmissingval, java.lang.String szexpressedval, java.lang.String szfilterthresholdval, java.lang.String szsamplepval, java.lang.String szmingoval, java.lang.String szmingolevelval, java.lang.String szextraval, boolean balltime, java.util.Vector repeatnames, boolean btakelog, boolean bgetxref, boolean bgetgoann, boolean bspotincluded, boolean badd0, java.lang.String szcategoryIDval, java.lang.String szinitfileval, java.lang.String szevidenceval, java.lang.String sztaxonval, boolean bpontoval, boolean bcontoval, boolean bfontoval, boolean brandomgoval, boolean bmaxminval)
          A control method that handles the response for when the execute button on the interface is pressed including building the data set, running the DREM modeling procedure, and displaying the results
static void errorcheck(DREM_DataSet theDataSet1, DREM_DataSet theOtherSet)
          Checks if the two data sets have the same number of rows, time points, and the gene name matches.
static void errorcheck(java.lang.String[] origgenes, java.lang.String[] repeatgenes, int norigcols, int nrepeatcols)
          Checks if origcols and nrepeat cols are the same value, the length of origgenes and repeatgenes is the same, and the gene names are the same
 boolean getFile(java.lang.String szURL, java.lang.String szoutfile, int ntype)
          Download the data at the location of szURL into a file szoutfile ntype is used for updating the download progress percentages
 void handlendbval()
          Updates the interface and internal values for the GO cross reference input
 void handlenxrefval()
          Updates the interface and internal values for the GO cross reference input
 void handlestaticsource()
          Updates the interface and internal values for the static TF-gene input
static void main(java.lang.String[] args)
          The main method which when executed will have the input interface created
protected  javax.swing.JComponent makeAdditionalSearchPanel()
          Makes the panel showing the model selection options
protected  javax.swing.JComponent makeAnnotationPanel()
          Makes the GO annotation options panel
protected  javax.swing.JComponent makeFilterPanel()
          Makes the option panel on the input interface controlling gene filtering.
protected  javax.swing.JComponent makeGOAnalysisPanel()
          Makes the GO analysis options panel
 void makeHelpDialog(java.awt.Component esource)
          Renders a help dialog based on the specific help button pressed
 void makeOptionsDialog()
          Renders the tabbed set of option window panes
protected  javax.swing.JComponent makeSearchPanel()
          Makes the option panel on the input interface controlling the search options
static void parseDefaults()
          Assigns the initial settings of the parameters based on the contents of szDefaultFile
static void renderDialog(javax.swing.JDialog thedialog, java.lang.String szMessage, int noffsetx, int noffsety)
          Places szMessage in thedialog window with the title 'Help'
static void renderDialog(javax.swing.JDialog thedialog, java.lang.String szMessage, int noffsetx, int noffsety, java.lang.String szTitle)
          Places szMessage in thedialog window with the title szTitle
 void stateChanged(javax.swing.event.ChangeEvent e)
          Responds to a change in the radio button selection specifying the model selection criteria
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

DREM_IO

public DREM_IO()
        throws java.io.FileNotFoundException,
               java.io.IOException
Class constructor - builds the input interface calls parseDefaults to get the initial settings from a default settings file if specified

Throws:
java.io.FileNotFoundException
java.io.IOException
Method Detail

parseDefaults

public static void parseDefaults()
                          throws java.io.FileNotFoundException,
                                 java.io.IOException
Assigns the initial settings of the parameters based on the contents of szDefaultFile

Throws:
java.io.FileNotFoundException
java.io.IOException

errorcheck

public static void errorcheck(DREM_DataSet theDataSet1,
                              DREM_DataSet theOtherSet)
Checks if the two data sets have the same number of rows, time points, and the gene name matches.


errorcheck

public static void errorcheck(java.lang.String[] origgenes,
                              java.lang.String[] repeatgenes,
                              int norigcols,
                              int nrepeatcols)
Checks if origcols and nrepeat cols are the same value, the length of origgenes and repeatgenes is the same, and the gene names are the same


buildset

public static DREM_DataSet buildset(java.lang.String szorganismsourceval,
                                    java.lang.String szxrefsourceval,
                                    java.lang.String szxrefval,
                                    java.lang.String szexp1val,
                                    java.lang.String szgoval,
                                    java.lang.String szgocategoryval,
                                    int nmaxmissing,
                                    double dexpressedval,
                                    double dmincorrelation,
                                    int nsamplespval,
                                    int nmingo,
                                    int nmingolevel,
                                    java.lang.String szextraval,
                                    boolean balltime,
                                    java.util.Vector repeatnames,
                                    boolean btakelog,
                                    boolean bspotincluded,
                                    boolean badd0,
                                    java.lang.String szcategoryIDval,
                                    java.lang.String szevidenceval,
                                    java.lang.String sztaxonval,
                                    boolean bpontoval,
                                    boolean bcontoval,
                                    boolean bfontoval,
                                    boolean brandomgoval,
                                    boolean bmaxminval)
                             throws java.lang.Exception
Returns a DREM_DataSet based on the provided input parameters

Throws:
java.lang.Exception

clusterscript

public void clusterscript(java.lang.String szstaticFieldval,
                          java.lang.String szxrefval,
                          java.lang.String szexp1val,
                          java.lang.String szgoval,
                          java.lang.String szgocategoryval,
                          java.lang.String szmaxmissingval,
                          java.lang.String szexpressedval,
                          java.lang.String szfilterthresholdval,
                          java.lang.String szsamplepval,
                          java.lang.String szmingoval,
                          java.lang.String szmingolevelval,
                          java.lang.String szextraval,
                          boolean balltime,
                          java.util.Vector repeatnames,
                          boolean btakelog,
                          boolean bgetxref,
                          boolean bgetgoann,
                          boolean bspotincluded,
                          boolean badd0,
                          java.lang.String szcategoryIDval,
                          java.lang.String szinitfileval,
                          java.lang.String szevidenceval,
                          java.lang.String sztaxonval,
                          boolean bpontoval,
                          boolean bcontoval,
                          boolean bfontoval,
                          boolean brandomgoval,
                          boolean bmaxminval)
                   throws java.lang.Exception
A control method that handles the response for when the execute button on the interface is pressed including building the data set, running the DREM modeling procedure, and displaying the results

Throws:
java.lang.Exception

handlestaticsource

public void handlestaticsource()
Updates the interface and internal values for the static TF-gene input


handlenxrefval

public void handlenxrefval()
Updates the interface and internal values for the GO cross reference input


handlendbval

public void handlendbval()
Updates the interface and internal values for the GO cross reference input


stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Responds to a change in the radio button selection specifying the model selection criteria

Specified by:
stateChanged in interface javax.swing.event.ChangeListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Responds to buttons being pressed on the main input interface

Specified by:
actionPerformed in interface java.awt.event.ActionListener

getFile

public boolean getFile(java.lang.String szURL,
                       java.lang.String szoutfile,
                       int ntype)
Download the data at the location of szURL into a file szoutfile ntype is used for updating the download progress percentages


makeHelpDialog

public void makeHelpDialog(java.awt.Component esource)
Renders a help dialog based on the specific help button pressed


renderDialog

public static void renderDialog(javax.swing.JDialog thedialog,
                                java.lang.String szMessage,
                                int noffsetx,
                                int noffsety)
Places szMessage in thedialog window with the title 'Help'


renderDialog

public static void renderDialog(javax.swing.JDialog thedialog,
                                java.lang.String szMessage,
                                int noffsetx,
                                int noffsety,
                                java.lang.String szTitle)
Places szMessage in thedialog window with the title szTitle


makeOptionsDialog

public void makeOptionsDialog()
Renders the tabbed set of option window panes


makeAnnotationPanel

protected javax.swing.JComponent makeAnnotationPanel()
Makes the GO annotation options panel


makeGOAnalysisPanel

protected javax.swing.JComponent makeGOAnalysisPanel()
Makes the GO analysis options panel


makeAdditionalSearchPanel

protected javax.swing.JComponent makeAdditionalSearchPanel()
Makes the panel showing the model selection options


makeSearchPanel

protected javax.swing.JComponent makeSearchPanel()
Makes the option panel on the input interface controlling the search options


makeFilterPanel

protected javax.swing.JComponent makeFilterPanel()
Makes the option panel on the input interface controlling gene filtering.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
The main method which when executed will have the input interface created

Throws:
java.lang.Exception