Package eu.isas.peptideshaker.gui
Class PeptideShakerGUI
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
eu.isas.peptideshaker.gui.PeptideShakerGUI
- All Implemented Interfaces:
com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent,com.compomics.util.gui.error_handlers.notification.NotificationDialogParent,ClipboardOwner,ImageObserver,MenuContainer,Serializable,Accessible,RootPaneContainer,WindowConstants
public class PeptideShakerGUI
extends JFrame
implements ClipboardOwner, com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent, com.compomics.util.gui.error_handlers.notification.NotificationDialogParent
The main PeptideShaker frame.
- 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 intThe Annotation tab index.static final ColorThe dark theme background color.static final intThe GO Analysis tab index.static final intThe Modifications tab index.static final intThe Overview tab index.static final intThe Protein Fractions tab index.static final intThe QC Plots tab index.static final intThe SpectrumID tab index.static final intThe Structures tab index.static StringThe horizontal padding used before and after the text in the titled borders.static StringThe horizontal padding used before and after the text in the titled borders.static final intThe Validation tab index.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
ConstructorsConstructorDescriptionCreates a new PeptideShaker frame.PeptideShakerGUI(File psdbFile, String zipURL, String zipUrlDownloadFolder, String pxAccession, boolean pxAccessionPrivate, boolean showWelcomeDialog) Creates a new PeptideShaker frame. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a note to the current list of notes.voidAdd a tip to the current list of tips.voidMethod called whenever an exception is caught.booleanCheck for new version.voidDisplays a news feed at the bottom of the GUI.voidclearData(boolean clearDatabaseFolder, boolean updateGuiComponents) Clear the data from the previous experiment.voidClear the gene mappings.voidClears the project parameters.voidclose()Closes the frame by first checking if the project ought to be saved.voidMethod called to disable the spectrum display.voidThis method will display results in all panels.voideditPathSettings(WelcomeDialog welcomeDialog) Opens a dialog allowing the setting of paths.voidenableSpectrumExport(boolean enable) Enable or disable the spectrum export in the overview panel.voidExport the current spectrum annotation.voidExport the current bubble plot as a figure.voidExport the current intensity histogram as a figure.voidExport the current mass error plot as a figure.voidExport the project as a zip file.voidExport the current spectrum as an mgf.voidExport the current sequence fragmentation as a figure.voidExport the current spectrum as a figure.Returns the annotation menu bar.doubleReturns the bubble plot scale value.Get the current delta masses for use when annotating the spectra.longgetDefaultPeptideSelection(long proteinKey) Returns the default peptide, i.e., the "best" peptide for the given protein.longgetDefaultPsmSelection(long peptideKey) Returns the default PSM, i.e., the "best" PSM for the given peptide.long[]Returns a list of keys of the currently displayed assumptions.long[]Returns a list of keys of the currently displayed peptides.long[]Returns a list of keys of the currently displayed proteins.long[]Returns a list of keys of the currently displayed spectrum matches.Returns the display features generator.Return the display parameters to use.com.compomics.util.exceptions.exception_handlers.FrameExceptionHandlerReturns the exception handler.Returns an extended HTML project report.com.compomics.util.gui.filtering.FilterParametersReturn the filter parameters to use.com.compomics.util.experiment.biology.genes.GeneMapsReturns the gene maps.Returns the GO Panel.com.compomics.util.experiment.identification.IdentificationReturns the identification displayed.com.compomics.util.experiment.identification.features.IdentificationFeaturesGeneratorReturns the identification features generator.com.compomics.util.parameters.identification.IdentificationParametersReturns the identification parameters.com.compomics.util.io.file.LastSelectedFolderReturns the last selected folder.com.compomics.util.experiment.identification.peptide_shaker.MetricsReturns the metrics saved while loading the files.Returns the modification panel.Returns the normal icon.Returns the OverviewPanel.intgetPreferredColumnWidth(JTable table, int colIndex, int margin) Gets the preferred width of the column specified by colIndex.com.compomics.util.parameters.tools.ProcessingParametersReturns the initial processing preferences.Returns the project details.com.compomics.util.experiment.ProjectParametersReturns the project parameters.com.compomics.util.parameters.peptide_shaker.ProjectTypeReturns the project type.com.compomics.util.experiment.io.biology.protein.ProteinDetailsProviderReturns the protein details provider.Returns the fractions panel.Returns the ProteinStructurePanel.Returns the decimal format used for the score and confidence columns.longReturns the key of the selected peptide.longReturns the key of the selected protein.Returns the currently selected spectrum file.Returns the currently selected spectrum title.intReturns the selected tab as indexed by the static fields.com.compomics.util.experiment.io.biology.protein.SequenceProviderReturns the sequence provider.Get the sparklines color.Get the non-validated sparklines color.Get the not found sparklines color.Get the possible sparklines color.com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParametersgetSpecificAnnotationParameters(String spectrumFile, String spectrumTitle, com.compomics.util.experiment.identification.SpectrumIdentificationAssumption spectrumIdentificationAssumption) Returns the specific annotation parameters corresponding to the given spectrum, hit, and the menu selections.com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParametersReturns the spectrum counting parameters.Returns the SpectrumIdentificationPanel.com.compomics.util.experiment.mass_spectrometry.SpectrumProviderReturns the spectrum provider.Returns the object responsible for starring/hiding matches.Returns the user parameters.getUserSelectedFile(String aSuggestedFileName, String aFileEnding, String aFileFormatDescription, String aDialogTitle, boolean openDialog) Returns the file selected by the user, or null if no file was selected.com.compomics.util.parameters.UtilitiesUserParametersReturns the validation panel.Returns the waiting icon.voidimportPeptideShakerFile(File psFile, boolean importFromZip) Imports information from a PeptideShaker file.voidimportPeptideShakerZipFile(File zipFile) Imports information from a PeptideShaker zip file.voidimportPeptideShakerZipFromURL(String zipURL, String destinationFolder) Imports a PeptideShaker zip file from a URL.voidInitiate the display by displaying the data in the currently selected tab.voidjumpToTab(int tabIndex) Jumps to the desired tabvoidloadRecentProjectsList(JPopupMenu menu, WelcomeDialog welcomeDialog) Add the list of recently used files to the file menu.voidLoads the user parameters.voidlostOwnership(Clipboard clipboard, Transferable contents) static voidThe main method used to start PeptideShaker.voidnotificationClicked(String notificationType) voidOpen the PeptideShaker example dataset.voidopenProteinLinks(String links) Opens one or more protein links in the default web browser.voidResets the display features generator.voidReset the frame title.voidResets the feature generator.voidResets the modification factory.voidResets the items selection.voidrestart()Closes and restarts PeptideShaker.voidsaveProject(boolean aCloseWhenDone, boolean aExportToZipWhenDone) Saves the modifications made to the project.voidsaveProjectAs(boolean closeWhenDone, boolean aExportToZipWhenDone) Save the project to a new location.voidsetCurentNotes(ArrayList<String> currentNotes) Set the list of current notes.voidsetCurentTips(ArrayList<String> currentTips) Set the list of current tips.voidsetDataSaved(boolean dataSaved) Set whether the current data has been saved to a psdb file or not.voidSet the default parameters.voidsetDisplayOptions(boolean displayProteins, boolean displayPeptidesAndPsms, boolean displayCoverage, boolean displaySpectrum) Update the display options for the overview tab.voidsetDisplayParameters(DisplayParameters displayParameters) Sets the display parameters to use.voidsetFilterParameters(com.compomics.util.gui.filtering.FilterParameters filterParameters) Sets the filter parameters to use.voidsetGeneMaps(com.compomics.util.experiment.biology.genes.GeneMaps geneMaps) Sets the gene maps.voidsetIdentification(com.compomics.util.experiment.identification.Identification identification) Sets the identification.voidsetIdentificationFeaturesGenerator(com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator) Sets the feature generator.voidsetIdentificationParameters(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters) Sets the identification parameters.voidsetLastSelectedFolder(com.compomics.util.io.file.LastSelectedFolder lastSelectedFolder) Set the last selected folder.voidsetMetrics(com.compomics.util.experiment.identification.peptide_shaker.Metrics metrics) Sets the metrics saved while loading the files.voidsetMsFileHandler(com.compomics.util.experiment.io.mass_spectrometry.MsFileHandler msFileHandler) Sets the mass spectrometry file handler.voidsetProcessingParameters(com.compomics.util.parameters.tools.ProcessingParameters processingParameters) Sets the initial processing preferences.voidsetProject(com.compomics.util.experiment.ProjectParameters projectParameters) Sets the project.voidsetProjectDetails(ProjectDetails projectDetails) Sets the project details.voidsetProjectType(com.compomics.util.parameters.peptide_shaker.ProjectType projectType) Sets the project type.voidsetProteinDetailsProvider(com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider) Sets the protein details provider.voidSets the selected item based on the selected tab.voidsetSelectedItems(long proteinKey, long peptideKey, String spectrumFile, String spectrumTitle) Sets the keys of the selected protein, peptide and PSM.voidsetSequenceProvider(com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider) Sets the sequence provider.voidsetSparklineColor(Color sparklineColor) Set the sparklines color.voidsetSparklineColorNonValidated(Color sparklineColorNonValidated) Set the non-validated sparklines color.voidsetSparklineColorPossible(Color sparklineColorPossible) Set the possible sparklines color.voidsetSpectrumCountingParameters(com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters spectrumCountingParameters) Sets new spectrum counting parameters.voidsetUpdated(int tabIndex, boolean updated) Sets that the tab was updated.voidsetUpLogFile(boolean redirectOutputStream) Set up the log file.voidsetUtilitiesUserParameters(com.compomics.util.parameters.UtilitiesUserParameters utilitiesUserParameters) Set the utilities user parameters.voidShow a note notification pop up.booleanReturns true if the sparklines are to be shown.voidShow a tip notification pop up.voidspectrumFileSelectionChanged(String spectrumFile) Sets the new spectrum file selected.voidUpdates the ions used for fragment annotation.voidupdateAnnotationMenuBarVisableOptions(boolean showSpectrumOptions, boolean showBubblePlotOptions, boolean showIonTableOptions, boolean showPtmPlotOptions, boolean showSingleSpectrumExportOptions) Updates the visible menu items on the settings menu of the annotation menu bar.voidupdateAnnotationMenus(com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParameters specificAnnotationParameters, int precursorCharge, HashSet<String> modNames) Update the annotation menu bar with the current annotation preferences.voidUpdate the filter settings field.voidAdd the experiment title to the frame title.voidupdateMainMatch(String mainMatch, int proteinInferenceType) Update the protein match in the different tabs.voidUpdate the modification color coding in all tabs.voidUpdate the notification counter for the notes.voidAdd the list of recently used files to the file menu.voidUpdates the selected items in the currently opened tab.voidUpdates the annotations in the selected tab.voidUpdate the number of surrounding amino acids displayed.voidUpdate the tabbed panes.voidUpdate the notification counter for the tips.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
-
OVER_VIEW_TAB_INDEX
public static final int OVER_VIEW_TAB_INDEXThe Overview tab index.- See Also:
-
SPECTRUM_ID_TAB_INDEX
public static final int SPECTRUM_ID_TAB_INDEXThe SpectrumID tab index.- See Also:
-
PROTEIN_FRACTIONS_TAB_INDEX
public static final int PROTEIN_FRACTIONS_TAB_INDEXThe Protein Fractions tab index.- See Also:
-
MODIFICATIONS_TAB_INDEX
public static final int MODIFICATIONS_TAB_INDEXThe Modifications tab index.- See Also:
-
STRUCTURES_TAB_INDEX
public static final int STRUCTURES_TAB_INDEXThe Structures tab index.- See Also:
-
ANNOTATION_TAB_INDEX
public static final int ANNOTATION_TAB_INDEXThe Annotation tab index.- See Also:
-
GO_ANALYSIS_TAB_INDEX
public static final int GO_ANALYSIS_TAB_INDEXThe GO Analysis tab index.- See Also:
-
VALIDATION_TAB_INDEX
public static final int VALIDATION_TAB_INDEXThe Validation tab index.- See Also:
-
QC_PLOTS_TAB_INDEX
public static final int QC_PLOTS_TAB_INDEXThe QC Plots tab index.- See Also:
-
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...) -
TITLED_BORDER_HORIZONTAL_PADDING_HTML
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...) -
DARK_THEME_BACKGROUND_COLOR
The dark theme background color.
-
-
Constructor Details
-
PeptideShakerGUI
public PeptideShakerGUI()Creates a new PeptideShaker frame. -
PeptideShakerGUI
public PeptideShakerGUI(File psdbFile, String zipURL, String zipUrlDownloadFolder, String pxAccession, boolean pxAccessionPrivate, boolean showWelcomeDialog) Creates a new PeptideShaker frame.- Parameters:
psdbFile- the psdb file to loadzipURL- the URL to a zipped psdb file to download and load, can be nullzipUrlDownloadFolder- the folder to download the URL to, can be nullpxAccession- a PX accession to open in the PRIDE Reshake, can be nullpxAccessionPrivate- if true, the PX accession is privateshowWelcomeDialog- boolean indicating if the Welcome Dialog is to be shown
-
-
Method Details
-
main
The main method used to start PeptideShaker.- Parameters:
args- the arguments
-
loadUserParameters
public void loadUserParameters()Loads the user parameters. -
setProject
public void setProject(com.compomics.util.experiment.ProjectParameters projectParameters) Sets the project.- Parameters:
projectParameters- the experiment
-
updateFrameTitle
public void updateFrameTitle()Add the experiment title to the frame title. -
resetFrameTitle
public void resetFrameTitle()Reset the frame title. -
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
-
editPathSettings
Opens a dialog allowing the setting of paths.- Parameters:
welcomeDialog- reference to the Welcome dialog, can be null
-
initiateDisplay
public void initiateDisplay()Initiate the display by displaying the data in the currently selected tab. Was previously a part of the displayResults methods, but had to be split into a separate method due to threading issues. -
displayResults
public void displayResults()This method will display results in all panels. -
disableSpectrumDisplay
public void disableSpectrumDisplay()Method called to disable the spectrum display. -
setUpLogFile
public void setUpLogFile(boolean redirectOutputStream) Set up the log file. Redirects the error and output streams to the log file.- Parameters:
redirectOutputStream- if true, redirects the output stream
-
getUserParameters
Returns the user parameters.- Returns:
- the user parameters
-
getUtilitiesUserParameters
public com.compomics.util.parameters.UtilitiesUserParameters getUtilitiesUserParameters()- Specified by:
getUtilitiesUserParametersin interfacecom.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
-
setUtilitiesUserParameters
public void setUtilitiesUserParameters(com.compomics.util.parameters.UtilitiesUserParameters utilitiesUserParameters) Set the utilities user parameters.- Parameters:
utilitiesUserParameters- the utilities user parameters
-
setDefaultParameters
public void setDefaultParameters()Set the default parameters. -
updateAnnotationMenu
public void updateAnnotationMenu()Updates the ions used for fragment annotation. -
updateSpectrumAnnotations
public void updateSpectrumAnnotations()Updates the annotations in the selected tab. -
updateModificationColorCoding
public void updateModificationColorCoding()Update the modification color coding in all tabs. -
getProjectParameters
public com.compomics.util.experiment.ProjectParameters getProjectParameters()Returns the project parameters.- Returns:
- the project parameters
-
getIdentification
public com.compomics.util.experiment.identification.Identification getIdentification()Returns the identification displayed.- Returns:
- the identification displayed
-
getSequenceProvider
public com.compomics.util.experiment.io.biology.protein.SequenceProvider getSequenceProvider()Returns the sequence provider.- Returns:
- the sequence provider
-
getSpectrumProvider
public com.compomics.util.experiment.mass_spectrometry.SpectrumProvider getSpectrumProvider()Returns the spectrum provider.- Returns:
- the spectrum provider
-
setSequenceProvider
public void setSequenceProvider(com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider) Sets the sequence provider.- Parameters:
sequenceProvider- the sequence provider
-
getProteinDetailsProvider
public com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider getProteinDetailsProvider()Returns the protein details provider.- Returns:
- the protein details provider
-
setProteinDetailsProvider
public void setProteinDetailsProvider(com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider) Sets the protein details provider.- Parameters:
proteinDetailsProvider- the protein details provider
-
setMsFileHandler
public void setMsFileHandler(com.compomics.util.experiment.io.mass_spectrometry.MsFileHandler msFileHandler) Sets the mass spectrometry file handler.- Parameters:
msFileHandler- The mass spectrometry file handler.
-
setIdentification
public void setIdentification(com.compomics.util.experiment.identification.Identification identification) Sets the identification.- Parameters:
identification- the identification
-
getFilterParameters
public com.compomics.util.gui.filtering.FilterParameters getFilterParameters()Return the filter parameters to use.- Returns:
- the filter parameters to use
-
getDisplayParameters
Return the display parameters to use.- Returns:
- the display parameters to use
-
setFilterParameters
public void setFilterParameters(com.compomics.util.gui.filtering.FilterParameters filterParameters) Sets the filter parameters to use.- Parameters:
filterParameters- the filter parameters to use
-
setDisplayParameters
Sets the display parameters to use.- Parameters:
displayParameters- the display parameters to use
-
getSpectrumCountingParameters
public com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters getSpectrumCountingParameters()Returns the spectrum counting parameters.- Returns:
- the spectrum counting parameters
-
setSpectrumCountingParameters
public void setSpectrumCountingParameters(com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters spectrumCountingParameters) Sets new spectrum counting parameters.- Parameters:
spectrumCountingParameters- new spectrum counting parameters
-
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 identification parameters.- Parameters:
identificationParameters- the identification parameters
-
getProcessingParameters
public com.compomics.util.parameters.tools.ProcessingParameters getProcessingParameters()Returns the initial processing preferences.- Returns:
- the initial processing preferences
-
setProcessingParameters
public void setProcessingParameters(com.compomics.util.parameters.tools.ProcessingParameters processingParameters) Sets the initial processing preferences.- Parameters:
processingParameters- the initial processing preferences
-
resetModificationFactory
public void resetModificationFactory()Resets the modification factory. -
getSparklineColor
Get the sparklines color.- Returns:
- the sparklineColor
-
setSparklineColor
Set the sparklines color.- Parameters:
sparklineColor- the sparklineColor to set
-
getSparklineColorNonValidated
Get the non-validated sparklines color.- Returns:
- the non-validated sparklineColor
-
setSparklineColorNonValidated
Set the non-validated sparklines color.- Parameters:
sparklineColorNonValidated- the non-validated sparklineColor to set
-
getSparklineColorNotFound
Get the not found sparklines color.- Returns:
- the not found sparklineColor
-
getSparklineColorPossible
Get the possible sparklines color.- Returns:
- the possible sparklineColor
-
setSparklineColorPossible
Set the possible sparklines color.- Parameters:
sparklineColorPossible- the possible sparklineColor to set
-
getBubbleScale
public double getBubbleScale()Returns the bubble plot scale value.- Returns:
- the bubble plot scale value
-
setSelectedItems
public void setSelectedItems(long proteinKey, long peptideKey, String spectrumFile, String spectrumTitle) Sets the keys of the selected protein, peptide and PSM.- Parameters:
proteinKey- the key of the selected proteinpeptideKey- the key of the selected peptidespectrumFile- the file of the selected spectrumspectrumTitle- the title of the selected spectrum
-
updateSelectionInCurrentTab
public void updateSelectionInCurrentTab()Updates the selected items in the currently opened tab. -
resetSelectedItems
public void resetSelectedItems()Resets the items selection. -
setSelectedItems
public void setSelectedItems()Sets the selected item based on the selected tab. -
getSelectedProteinKey
public long getSelectedProteinKey()Returns the key of the selected protein.- Returns:
- the key of the selected protein
-
getSelectedPeptideKey
public long getSelectedPeptideKey()Returns the key of the selected peptide.- Returns:
- the key of the selected peptide
-
getSelectedSpectrumFile
Returns the currently selected spectrum file.- Returns:
- the file of the selected spectrum
-
getSelectedSpectrumTitle
Returns the currently selected spectrum title.- Returns:
- the title of the selected spectrum
-
clearData
public void clearData(boolean clearDatabaseFolder, boolean updateGuiComponents) Clear the data from the previous experiment.- Parameters:
clearDatabaseFolder- decides if the database folder is to be cleared or notupdateGuiComponents- true if the GUI components are to be updated
-
clearParameters
public void clearParameters()Clears the project parameters. -
getOverviewPanel
Returns the OverviewPanel.- Returns:
- the OverviewPanel
-
getProteinFractionsPanel
Returns the fractions panel.- Returns:
- the fractions panel
-
getValidationPanel
Returns the validation panel.- Returns:
- the validation panel
-
getModificationsPanel
Returns the modification panel.- Returns:
- the modification panel
-
getProteinStructurePanel
Returns the ProteinStructurePanel.- Returns:
- the ProteinStructurePanel
-
getSpectrumIdentificationPanel
Returns the SpectrumIdentificationPanel.- Returns:
- the SpectrumIdentificationPanel
-
getGOPanel
Returns the GO Panel.- Returns:
- the GO Panel
-
getPreferredColumnWidth
Gets the preferred width of the column specified by colIndex. The column will be just wide enough to show the column head and the widest cell in the column. Margin pixels are added to the left and right (resulting in an additional width of 2*margin pixels.
Note that this method iterates all rows in the table to get the perfect width of the column!- Parameters:
table- the tablecolIndex- the colum indexmargin- the margin to add- Returns:
- the preferred width of the column
-
enableSpectrumExport
public void enableSpectrumExport(boolean enable) Enable or disable the spectrum export in the overview panel.- Parameters:
enable- if true the spectrum export in the overview panel will be enabled
-
updateMainMatch
Update the protein match in the different tabs.- Parameters:
mainMatch- the protein match to useproteinInferenceType- the protein inference group type
-
setDataSaved
public void setDataSaved(boolean dataSaved) Set whether the current data has been saved to a psdb file or not.- Parameters:
dataSaved- whether the current data has been saved to a psdb file or not
-
getSelectedTab
public int getSelectedTab()Returns the selected tab as indexed by the static fields.- Returns:
- the selected tab as indexed by the static fields
-
getDisplayedProteins
public long[] getDisplayedProteins()Returns a list of keys of the currently displayed proteins.- Returns:
- a list of keys of the currently displayed proteins
-
getDisplayedPeptides
public long[] getDisplayedPeptides()Returns a list of keys of the currently displayed peptides.- Returns:
- a list of keys of the currently displayed peptides
-
getDisplayedSpectrumMatches
public long[] getDisplayedSpectrumMatches()Returns a list of keys of the currently displayed spectrum matches.- Returns:
- a list of keys of the currently displayed spectrum matches
-
getDisplayedAssumptions
public long[] getDisplayedAssumptions()Returns a list of keys of the currently displayed assumptions.- Returns:
- a list of keys of the currently displayed assumptions
-
openProteinLinks
Opens one or more protein links in the default web browser.- Parameters:
links- the links to open
-
getScoreAndConfidenceDecimalFormat
Returns the decimal format used for the score and confidence columns.- Returns:
- the decimal format used for the score and confidence columns
-
catchException
Method called whenever an exception is caught.- Parameters:
e- the exception caught
-
getExceptionHandler
public com.compomics.util.exceptions.exception_handlers.FrameExceptionHandler getExceptionHandler()Returns the exception handler.- Returns:
- the exception handler
-
close
public void close()Closes the frame by first checking if the project ought to be saved. -
restart
public void restart()Closes and restarts PeptideShaker. Does not work inside the IDE of course.- Specified by:
restartin interfacecom.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
-
updateAnnotationMenus
public void updateAnnotationMenus(com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParameters specificAnnotationParameters, int precursorCharge, HashSet<String> modNames) Update the annotation menu bar with the current annotation preferences.- Parameters:
specificAnnotationParameters- the specific annotation parametersprecursorCharge- the precursor chargesmodNames- the names of the modifications
-
getSpecificAnnotationParameters
public com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParameters getSpecificAnnotationParameters(String spectrumFile, String spectrumTitle, com.compomics.util.experiment.identification.SpectrumIdentificationAssumption spectrumIdentificationAssumption) Returns the specific annotation parameters corresponding to the given spectrum, hit, and the menu selections.- Parameters:
spectrumFile- The file name of the spectrum.spectrumTitle- The title of the spectrum.spectrumIdentificationAssumption- The spectrum annotation preferences.- Returns:
- the specific annotation parameters corresponding to the given spectrum, hit, and the menu selection
-
getAnnotationMenuBar
Returns the annotation menu bar.- Returns:
- the annotation menu bar
-
updateAnnotationMenuBarVisableOptions
public void updateAnnotationMenuBarVisableOptions(boolean showSpectrumOptions, boolean showBubblePlotOptions, boolean showIonTableOptions, boolean showPtmPlotOptions, boolean showSingleSpectrumExportOptions) Updates the visible menu items on the settings menu of the annotation menu bar.- Parameters:
showSpectrumOptions- if true, the spectrum options are shownshowBubblePlotOptions- if true, the bubble plot options are shownshowIonTableOptions- if true, the ion table options are shownshowPtmPlotOptions- if true, the PTM plot option is shownshowSingleSpectrumExportOptions- if true, the single spectrum export options are shown
-
updateRecentProjectsList
public void updateRecentProjectsList()Add the list of recently used files to the file menu. -
loadRecentProjectsList
Add the list of recently used files to the file menu.- Parameters:
menu- the menu to add the recent files list towelcomeDialog- the welcome dialog reference
-
getProjectDetails
Returns the project details.- Returns:
- the project details
-
setProjectDetails
Sets the project details.- Parameters:
projectDetails- the project details
-
importPeptideShakerZipFromURL
Imports a PeptideShaker zip file from a URL.- Parameters:
zipURL- the PeptideShaker zip file to importdestinationFolder- the folder to download and unzip the project in
-
importPeptideShakerZipFile
Imports information from a PeptideShaker zip file.- Parameters:
zipFile- the PeptideShaker zip file to import
-
importPeptideShakerFile
Imports information from a PeptideShaker file.- Parameters:
psFile- The PeptideShaker file to import.importFromZip- flag that determines if psdb was imported from a zip file
-
lostOwnership
- Specified by:
lostOwnershipin interfaceClipboardOwner
-
exportSelectedSpectraAsMgf
Export the current spectrum as an mgf.- Throws:
IOException- Exception thrown whenever an error occurred while writing the mgf file
-
exportAnnotatedSpectrum
Export the current spectrum annotation.- Throws:
IOException- exception thrown whenever an error occurred while reading or writing a file
-
exportSpectrumAsFigure
public void exportSpectrumAsFigure()Export the current spectrum as a figure. -
exportSequenceFragmentationAsFigure
public void exportSequenceFragmentationAsFigure()Export the current sequence fragmentation as a figure. -
exportIntensityHistogramAsFigure
public void exportIntensityHistogramAsFigure()Export the current intensity histogram as a figure. -
exportMassErrorPlotAsFigure
public void exportMassErrorPlotAsFigure()Export the current mass error plot as a figure. -
exportBubblePlotAsFigure
public void exportBubblePlotAsFigure()Export the current bubble plot as a figure. -
setDisplayOptions
public void setDisplayOptions(boolean displayProteins, boolean displayPeptidesAndPsms, boolean displayCoverage, boolean displaySpectrum) Update the display options for the overview tab.- Parameters:
displayProteins- if the proteins panel is to be displayeddisplayPeptidesAndPsms- if the peptides and PSMs panel is to be displayeddisplayCoverage- if the protein coverage panel is to be displayeddisplaySpectrum- if the spectrum panel is to be displayed
-
getCurrentMassDeltas
Get the current delta masses for use when annotating the spectra.- Returns:
- the current delta masses
-
saveProject
public void saveProject(boolean aCloseWhenDone, boolean aExportToZipWhenDone) Saves the modifications made to the project.- Parameters:
aCloseWhenDone- if true, PeptideShaker closes after savingaExportToZipWhenDone- if true, the project is also saved as a zip file
-
setUpdated
public void setUpdated(int tabIndex, boolean updated) Sets that the tab was updated.- Parameters:
tabIndex- integer indicating which tab (according to the static indexing) was updated.updated- boolean indicating whether the tab is updated or not
-
updateTabbedPanes
public void updateTabbedPanes()Update the tabbed panes. -
getStarHider
Returns the object responsible for starring/hiding matches.- Returns:
- the object responsible for starring/hiding matches
-
getIdentificationFeaturesGenerator
public com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator getIdentificationFeaturesGenerator()Returns the identification features generator.- Returns:
- the identification features generator
-
resetIdentificationFeaturesGenerator
public void resetIdentificationFeaturesGenerator()Resets the feature generator. -
setIdentificationFeaturesGenerator
public void setIdentificationFeaturesGenerator(com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator) Sets the feature generator.- Parameters:
identificationFeaturesGenerator- the identification features generator
-
resetDisplayFeaturesGenerator
public void resetDisplayFeaturesGenerator()Resets the display features generator. -
getDisplayFeaturesGenerator
Returns the display features generator.- Returns:
- the display features generator
-
getMetrics
public com.compomics.util.experiment.identification.peptide_shaker.Metrics getMetrics()Returns the metrics saved while loading the files.- Returns:
- the metrics saved while loading the files
-
setMetrics
public void setMetrics(com.compomics.util.experiment.identification.peptide_shaker.Metrics metrics) Sets the metrics saved while loading the files.- Parameters:
metrics- the metrics saved while loading the files
-
getProjectType
public com.compomics.util.parameters.peptide_shaker.ProjectType getProjectType()Returns the project type.- Returns:
- the project type
-
setProjectType
public void setProjectType(com.compomics.util.parameters.peptide_shaker.ProjectType projectType) Sets the project type.- Parameters:
projectType- the project type
-
getGeneMaps
public com.compomics.util.experiment.biology.genes.GeneMaps getGeneMaps()Returns the gene maps.- Returns:
- the gene maps
-
setGeneMaps
public void setGeneMaps(com.compomics.util.experiment.biology.genes.GeneMaps geneMaps) Sets the gene maps.- Parameters:
geneMaps- the gene maps
-
spectrumFileSelectionChanged
Sets the new spectrum file selected.- Parameters:
spectrumFile- the name of the new spectrum file
-
saveProjectAs
public void saveProjectAs(boolean closeWhenDone, boolean aExportToZipWhenDone) Save the project to a new location.- Parameters:
closeWhenDone- if true, PeptideShaker closes when done savingaExportToZipWhenDone- if true, the project is also saved as a zip file
-
getUserSelectedFile
public File getUserSelectedFile(String aSuggestedFileName, String aFileEnding, String aFileFormatDescription, String aDialogTitle, boolean openDialog) Returns the file selected by the user, or null if no file was selected.- Parameters:
aSuggestedFileName- the suggested file name, can be nullaFileEnding- the file type, e.g., .txtaFileFormatDescription- the file format description, e.g., (Mascot Generic Format) *.mgfaDialogTitle- the title for the dialogopenDialog- if true an open dialog is shown, false results in a save dialog- Returns:
- the file selected by the user, or null if no file or folder was selected
-
jumpToTab
public void jumpToTab(int tabIndex) Jumps to the desired tab- Parameters:
tabIndex- index of the tab as indexed by the static fields
-
showSparklines
public boolean showSparklines()Returns true if the sparklines are to be shown.- Returns:
- true if the sparklines are to be show
-
updateSurroundingAminoAcids
public void updateSurroundingAminoAcids()Update the number of surrounding amino acids displayed. -
checkNewsFeed
public void checkNewsFeed()Displays a news feed at the bottom of the GUI. -
openExampleFile
public void openExampleFile()Open the PeptideShaker example dataset. -
updateFilterSettingsField
Update the filter settings field. (Interface method: not implemented in this class as it is not needed.)- Parameters:
text- the text to set
-
exportProjectAsZip
public void exportProjectAsZip()Export the project as a zip file. -
getNormalIcon
Returns the normal icon.- Returns:
- the normal icon
-
getWaitingIcon
Returns the waiting icon.- Returns:
- the waiting icon
-
getDefaultPsmSelection
public long getDefaultPsmSelection(long peptideKey) Returns the default PSM, i.e., the "best" PSM for the given peptide.- Parameters:
peptideKey- the peptide to get the PSM for- Returns:
- the key of the default PSM
-
getDefaultPeptideSelection
public long getDefaultPeptideSelection(long proteinKey) Returns the default peptide, i.e., the "best" peptide for the given protein.- Parameters:
proteinKey- the protein to get the peptide for- Returns:
- the key of the default peptide
-
clearGeneMappings
public void clearGeneMappings()Clear the gene mappings. -
notificationClicked
- Specified by:
notificationClickedin interfacecom.compomics.util.gui.error_handlers.notification.NotificationDialogParent
-
addNote
Add a note to the current list of notes.- Parameters:
note- the note to add, can contain HTML formatting, but not the HTML start and end tags
-
setCurentNotes
Set the list of current notes.- Parameters:
currentNotes- the notes to set
-
updateNotesNotificationCounter
public void updateNotesNotificationCounter()Update the notification counter for the notes. -
showNotesNotification
public void showNotesNotification()Show a note notification pop up. -
addTip
Add a tip to the current list of tips.- Parameters:
tip- the tip to add, can contain HTML formatting, but not the HTML start and end tags
-
setCurentTips
Set the list of current tips.- Parameters:
currentTips- the tips to set
-
updateTipsNotificationCounter
public void updateTipsNotificationCounter()Update the notification counter for the tips. -
showTipsNotification
public void showTipsNotification()Show a tip notification pop up. -
getExtendedProjectReport
Returns an extended HTML project report.- Returns:
- an extended HTML project report
-
checkForNewVersion
public boolean checkForNewVersion()Check for new version.- Returns:
- true if a new version is to be downloaded
-