Package eu.isas.searchgui.gui
Class SearchGUI
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
eu.isas.searchgui.gui.SearchGUI
- All Implemented Interfaces:
com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent,ImageObserver,MenuContainer,Serializable,Accessible,RootPaneContainer,WindowConstants
public class SearchGUI
extends JFrame
implements com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
The main frame of SearchGUI.
- Author:
- Harald Barsnes, Marc Vaudel
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringReference for the separation of modifications.static final StringReference for the separation of modification and its frequency.static StringThe error message shown if there is an issue with the MS Amanda installation.static StringThe horizontal padding used before and after the text in the titled borders.Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields 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_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck for new version.voidOpens a dialog allowing the setting of paths.booleanOpens a dialog allowing the edition of the ProteoWizard installation folder.voidenableSearchEngines(boolean enableOmssa, boolean enbleXTandem, boolean enableMsgf, boolean enableMsAmanda, boolean enableMyriMatch, boolean enableComet, boolean enableTide, boolean enableAndromeda, boolean enableMetaMorpheus, boolean enableSage, boolean enableNovor, boolean enableDirecTag) Enable or disable the search engines.Returns the folder where the configuration files are stored.com.compomics.util.parameters.identification.IdentificationParametersReturns the identification parameters.Returns the path to the jar file.com.compomics.util.io.file.LastSelectedFolderReturns the last selected folder.Returns the spectra files selected.Returns the output folder.Returns a reference to the SearchGUI command line interface.getTips()Returns the tips of the day.com.compomics.util.parameters.UtilitiesUserParametersstatic voidThe main method used to start SearchGUI.voidrestart()voidsetConfigFolder(File configFolder) Set the config folder.voidsetIdentificationParameters(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters) Sets the search parameters.voidsetLastSelectedFolder(com.compomics.util.io.file.LastSelectedFolder lastSelectedFolder) Set the last selected folder.voidsetParametersDisplayed(boolean settingsDisplayed) Set if the settings have been displayed.voidSets the path configuration.booleanReturns true if the settings have been displayed.voidThis method is called whenever the 'Search' button is pressed.booleanvalidateParametersInput(boolean showMessage) Inspects the parameter validity.static booleanvalidateSearchEngineInstallation(com.compomics.util.experiment.identification.Advocate advocate, File searchEngineLocation, boolean feedBackInDialog) Tries to validate the search engine installation by running the executable.booleanvalidateSearchEngines(boolean showMessage) Validate that the search engines work.booleanVerifies that all spectrum files have different names and displays a warning with the first conflict encountered.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, updateMethods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedMethods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontMethods 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, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
TITLED_BORDER_HORIZONTAL_PADDING
The horizontal padding used before and after the text in the titled borders. (Needed to make it look as good in Java 7 as it did in Java 6...) -
MODIFICATION_SEPARATOR
Reference for the separation of modifications.- See Also:
-
MODIFICATION_USE_SEPARATOR
Reference for the separation of modification and its frequency.- See Also:
-
msAmandaErrorMessage
The error message shown if there is an issue with the MS Amanda installation.
-
-
Constructor Details
-
SearchGUI
public SearchGUI(ArrayList<File> spectrumFiles, File fastaFile, ArrayList<File> rawFiles, File identificationParametersFile, File outputFolder, File configFolder, String species, String speciesType, String projectName) Creates a SearchGUI dialog.- Parameters:
spectrumFiles- the spectrum files (can be null)fastaFile- the FASTA filerawFiles- the raw files (can be null)identificationParametersFile- the identification settings file (can be null)outputFolder- the output folder (can be null)configFolder- the config folder (can be null)species- the species (can be null)speciesType- the species type (can be null)projectName- the PeptideShaker project name
-
-
Method Details
-
editPathParameters
public void editPathParameters()Opens a dialog allowing the setting of paths. -
getOutputFolder
Returns the output folder.- Returns:
- the output folder
-
getMgfFiles
Returns the spectra files selected.- Returns:
- the spectra file selected
-
validateSearchEngines
public boolean validateSearchEngines(boolean showMessage) Validate that the search engines work.- Parameters:
showMessage- show massage to the user- Returns:
- true, if both search engines seem to work
-
validateParametersInput
public boolean validateParametersInput(boolean showMessage) Inspects the parameter validity.- Parameters:
showMessage- if true an error message is shown to the users- Returns:
- a boolean indicating if the parameters are valid
-
verifySpectrumFileNames
public boolean verifySpectrumFileNames()Verifies that all spectrum files have different names and displays a warning with the first conflict encountered.- Returns:
- true if all spectrum files have different names, false otherwise
-
settingsDisplayed
public boolean settingsDisplayed()Returns true if the settings have been displayed.- Returns:
- true if the settings have has been displayed
-
setParametersDisplayed
public void setParametersDisplayed(boolean settingsDisplayed) Set if the settings have been displayed.- Parameters:
settingsDisplayed- boolean indicating whether the settings have been displayed
-
main
The main method used to start SearchGUI.- Parameters:
args- the command line arguments
-
getLastSelectedFolder
public com.compomics.util.io.file.LastSelectedFolder getLastSelectedFolder()Returns the last selected folder.- Returns:
- the last selected folder
-
setLastSelectedFolder
public void setLastSelectedFolder(com.compomics.util.io.file.LastSelectedFolder lastSelectedFolder) Set the last selected folder.- Parameters:
lastSelectedFolder- the folder to set
-
startSearch
public void startSearch()This method is called whenever the 'Search' button is pressed. It starts the search. -
getSearchHandler
Returns a reference to the SearchGUI command line interface.- Returns:
- a reference to the SearchGUI command line interface
-
enableSearchEngines
public void enableSearchEngines(boolean enableOmssa, boolean enbleXTandem, boolean enableMsgf, boolean enableMsAmanda, boolean enableMyriMatch, boolean enableComet, boolean enableTide, boolean enableAndromeda, boolean enableMetaMorpheus, boolean enableSage, boolean enableNovor, boolean enableDirecTag) Enable or disable the search engines.- Parameters:
enableOmssa- enable OMSSA?enbleXTandem- enable X!Tandem?enableMsgf- enable MS-GF+?enableMsAmanda- enable MS AmandaenableMyriMatch- enable MyriMatchenableComet- enable CometenableTide- enable TideenableAndromeda- enable AndromedaenableMetaMorpheus- enable MetaMorpheusenableSage- enable SageenableNovor- enable NovorenableDirecTag- enable DirecTag
-
getIdentificationParameters
public com.compomics.util.parameters.identification.IdentificationParameters getIdentificationParameters()Returns the identification parameters.- Returns:
- the identification parameters
-
setIdentificationParameters
public void setIdentificationParameters(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters) Sets the search parameters.- Parameters:
identificationParameters- the identification parameters
-
getJarFilePath
Returns the path to the jar file.- Returns:
- the path to the jar file
-
getConfigFolder
Returns the folder where the configuration files are stored.- Returns:
- the folder where the configuration files are stored
-
setConfigFolder
Set the config folder.- Parameters:
configFolder- the config folder to set
-
setPathConfiguration
Sets the path configuration.- Throws:
IOException- exception thrown whenever an error occurs while reading or writing the paths configuration file
-
restart
public void restart()- Specified by:
restartin interfacecom.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
-
getUtilitiesUserParameters
public com.compomics.util.parameters.UtilitiesUserParameters getUtilitiesUserParameters()- Specified by:
getUtilitiesUserParametersin interfacecom.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
-
validateSearchEngineInstallation
public static boolean validateSearchEngineInstallation(com.compomics.util.experiment.identification.Advocate advocate, File searchEngineLocation, boolean feedBackInDialog) Tries to validate the search engine installation by running the executable.- Parameters:
advocate- the search engine advocatesearchEngineLocation- the folder where the search engine is installedfeedBackInDialog- shows feedback in dialog, otherwise the feedbackDialog will be used- Returns:
- true if the search engine seems to be correctly installed, false otherwise
-
getTips
Returns the tips of the day.- Returns:
- the tips of the day in an ArrayList
-
checkForNewVersion
public boolean checkForNewVersion()Check for new version.- Returns:
- true if a new version is to be downloaded
-
editProteoWizardInstallation
public boolean editProteoWizardInstallation()Opens a dialog allowing the edition of the ProteoWizard installation folder.- Returns:
- true of the installation is now set
-