Class ReporterGUI

All Implemented Interfaces:
com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class ReporterGUI extends JFrame implements com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
The main Reporter GUI.
Author:
Marc Vaudel, Harald Barsnes
See Also:
  • Field Details

    • TITLED_BORDER_HORIZONTAL_PADDING

      public static String 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...)
  • Constructor Details

    • ReporterGUI

      public ReporterGUI()
      Creates a new ReporterGUI.
  • Method Details

    • createNewProject

      public void createNewProject(eu.isas.peptideshaker.utils.PsdbParent psdbParent, ReporterSettings reporterSettings, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, DisplayPreferences displayPreferences)
      Closes the currently opened project, open the new project dialog and loads the new project on the interface
      Parameters:
      psdbParent - the psdb parent
      reporterSettings - the reporter settings
      reporterIonQuantification - the reporter quantification settings
      processingParameters - the processing preferences
      displayPreferences - the display preferences
    • getIdentificationFeaturesGenerator

      public com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator getIdentificationFeaturesGenerator()
      Returns the identification features generator.
      Returns:
      the identification features generator
    • getProjectParameters

      public com.compomics.util.experiment.ProjectParameters getProjectParameters()
      Returns the project parameters.
      Returns:
      the project parameters
    • getDisplayFeaturesGenerator

      public eu.isas.peptideshaker.utils.DisplayFeaturesGenerator getDisplayFeaturesGenerator()
      Returns the display features generator.
      Returns:
      the display features generator
    • getQuantificationFeaturesGenerator

      public QuantificationFeaturesGenerator getQuantificationFeaturesGenerator()
      Returns the quantification features generator.
      Returns:
      the quantification features generator
    • getReporterIonQuantification

      public com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification getReporterIonQuantification()
      Returns the reporter ion quantification.
      Returns:
      the reporter ion quantification
    • getClusterBuilder

      public ClusterBuilder getClusterBuilder()
      Returns the cluster builder.
      Returns:
      the cluster builder
    • getReporterSettings

      public ReporterSettings getReporterSettings()
      Returns the reporter settings.
      Returns:
      the reporter settings
    • getIdentification

      public com.compomics.util.experiment.identification.Identification getIdentification()
      Returns the identification of the psdb file. Null if none loaded.
      Returns:
      the identification of the psdb file
    • getGeneMaps

      public com.compomics.util.experiment.biology.genes.GeneMaps getGeneMaps()
      Returns the gene maps of the loaded project. Null if none.
      Returns:
      the gene maps
    • getProjectDetails

      public eu.isas.peptideshaker.preferences.ProjectDetails getProjectDetails()
      Returns the project details.
      Returns:
      the project details
    • getProteinDetailsProvider

      public com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider getProteinDetailsProvider()
      Returns the protein details provider.
      Returns:
      the protein details provider
    • getIdentificationDisplayPreferences

      public eu.isas.peptideshaker.preferences.DisplayParameters getIdentificationDisplayPreferences()
      Returns the identification display preferences.
      Returns:
      the identification display preferences
    • getExceptionHandler

      public com.compomics.util.exceptions.ExceptionHandler getExceptionHandler()
      Returns the exception handler.
      Returns:
      the exception handler
    • getSpectrumCountingParameters

      public com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters getSpectrumCountingParameters()
      Returns the spectrum counting parameters.
      Returns:
      the spectrum counting parameters
    • getDisplayParameters

      public DisplayPreferences getDisplayParameters()
      Returns the display parameters.
      Returns:
      the display parameters
    • getFilterParameters

      public com.compomics.util.gui.filtering.FilterParameters getFilterParameters()
      Returns the filter parameters.
      Returns:
      the filter parameters
    • getSparklineColor

      public Color getSparklineColor()
      Get the sparklines color.
      Returns:
      the sparklineColor
    • getSparklineColorNonValidated

      public Color getSparklineColorNonValidated()
      Get the non-validated sparklines color.
      Returns:
      the non-validated sparklineColor
    • getSparklineColorNotFound

      public Color getSparklineColorNotFound()
      Get the not found sparklines color.
      Returns:
      the not found sparklineColor
    • getSparklineColorDoubtful

      public Color getSparklineColorDoubtful()
      Get the not doubtful sparklines color.
      Returns:
      the doubtful sparklineColor
    • getScoreAndConfidenceDecimalFormat

      public DecimalFormat getScoreAndConfidenceDecimalFormat()
      Returns the decimal format used for the score and confidence columns.
      Returns:
      the decimal format used for the score and confidence columns
    • 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
    • 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
    • getIdentificationParameters

      public com.compomics.util.parameters.identification.IdentificationParameters getIdentificationParameters()
      Returns the identification parameters.
      Returns:
      the identification parameters
    • saveProjectAs

      public void saveProjectAs(boolean closeWhenDone, boolean aExportToZipWhenDone)
      Save the project to the currentPSFile location.
      Parameters:
      closeWhenDone - if true, Reporter closes when done saving
      aExportToZipWhenDone - if true, the project is also saved as a zip file
    • closeReporter

      public void closeReporter()
      Closes Reporter.
    • clearData

      public void clearData(boolean clearDatabaseFolder)
      Clear the data from the previous experiment.
      Parameters:
      clearDatabaseFolder - decides if the database folder is to be cleared or not
    • catchException

      public void catchException(Exception e)
      Method called whenever an exception is caught.
      Parameters:
      e - the exception caught
    • saveUserPreferences

      public void saveUserPreferences()
      Saves the user parameters.
    • main

      public static void main(String[] args)
      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
    • 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 null
      aFileEnding - the file type, e.g., .txt
      aFileFormatDescription - the file format description, e.g., (Mascot Generic Format) *.mgf
      aDialogTitle - the title for the dialog
      openDialog - 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
    • restart

      public void restart()
      Closes and restarts Reporter. Does not work inside the IDE of course.
      Specified by:
      restart in interface com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
    • getUtilitiesUserParameters

      public com.compomics.util.parameters.UtilitiesUserParameters getUtilitiesUserParameters()
      Specified by:
      getUtilitiesUserParameters in interface com.compomics.software.dialogs.JavaHomeOrMemoryDialogParent
    • checkForNewVersion

      public boolean checkForNewVersion()
      Check for new version.
      Returns:
      true if a new version is to be downloaded
    • getkMeansClutering

      public com.compomics.util.math.clustering.KMeansClustering getkMeansClutering()
      Returns the k-means clustering results.
      Returns:
      the k-means clustering results
    • recluster

      public void recluster(int numberOfClusters, boolean loadData)
      Set the number of clusters and recluster.
      Parameters:
      numberOfClusters - the new number of clusters
      loadData - if true, the data is (re-)loaded
    • getSelectedProteins

      public ArrayList<Long> getSelectedProteins()
      Returns the list of selected proteins.
      Returns:
      the list of selected proteins
    • getSelectedPeptides

      public ArrayList<Long> getSelectedPeptides()
      Returns the list of selected peptides.
      Returns:
      the list of selected peptides
    • getSelectedPsms

      public ArrayList<Long> getSelectedPsms()
      Returns the list of selected PSMs.
      Returns:
      the list of selected PSMs
    • minimizeChart

      public void minimizeChart()
      If a chart is maximized, then minimize it. If not, do nothing.
    • setSelectedProteins

      public void setSelectedProteins(ArrayList<Long> selectedProteins, boolean updateSelection, boolean clearSelection)
      Set the list of selected proteins.
      Parameters:
      selectedProteins - the list of selected proteins
      updateSelection - if true, the selection is updated in the GUI
      clearSelection - if true, the current selection will be removed
    • setSelectedPeptides

      public void setSelectedPeptides(ArrayList<Long> selectedPeptides, boolean updateSelection, boolean clearSelection)
      Set the list of selected peptides.
      Parameters:
      selectedPeptides - the list of selected peptides
      updateSelection - if true, the selection is updated in the GUI
      clearSelection - if true, the current selection will be removed
    • setSelectedPsms

      public void setSelectedPsms(ArrayList<Long> selectedPsms, boolean updateSelection, boolean clearSelection)
      Set the list of selected PSMs.
      Parameters:
      selectedPsms - the list of selected PSMs
      updateSelection - if true, the selection is updated in the GUI
      clearSelection - if true, the current selection will be removed