Class SearchHandler

java.lang.Object
eu.isas.searchgui.SearchHandler

public class SearchHandler extends Object
This class represents the search command line interface.
Author:
Marc Vaudel, Lennart Martens, Harald Barsnes
  • Field Details

    • SEARCHGUI_CONFIGURATION_FILE

      public static final String SEARCHGUI_CONFIGURATION_FILE
      Default SearchGUI configurations.
      See Also:
    • OUTPUT_TEMP_FOLDER_NAME

      public static final String OUTPUT_TEMP_FOLDER_NAME
      Folder where the output is stored before packaging.
      See Also:
    • DEFAULT_OUTPUT_FILE_NAME_ENDING

      public static final String DEFAULT_OUTPUT_FILE_NAME_ENDING
      Default file name ending for a SearchGUI output.
      See Also:
    • DEFAULT_DATA_FOLDER

      public static final String DEFAULT_DATA_FOLDER
      The name of the folder where to save the spectrum and FASTA files.
      See Also:
    • CONDA_APP_NAME

      public static final String CONDA_APP_NAME
      Name of SearchGUI's Conda package.
      See Also:
  • Constructor Details

    • SearchHandler

      public SearchHandler()
      Empty default constructor.
    • SearchHandler

      public SearchHandler(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, File resultsFolder, File configFolder, ArrayList<File> msFiles, File fastaFile, ArrayList<File> rawFiles, File identificationParametersFile, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, com.compomics.util.experiment.io.mass_spectrometry.MsFileHandler msFileHandler, com.compomics.util.exceptions.ExceptionHandler exceptionHandler)
      Constructor for the SearchGUI command line interface.Uses the configuration file searchGUI_configuration.txt to get the default search engine locations and which search engines that are enabled.Mainly for use via the graphical UI.
      Parameters:
      identificationParameters - the identification parameters
      resultsFolder - the results folder
      configFolder - the config folder (can be null)
      msFiles - list of mass spectrometry files
      fastaFile - the FASTA file
      rawFiles - list of raw files
      identificationParametersFile - the identification parameters file
      processingParameters - the processing parameters
      msFileHandler - the mass spectrometry file handler
      exceptionHandler - a handler for exceptions
    • SearchHandler

      public SearchHandler(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, File resultsFolder, File configFolder, String defaultOutputFileName, ArrayList<File> msFiles, File fastaFile, ArrayList<File> rawFiles, File identificationParametersFile, boolean runOmssa, boolean runXTandem, boolean runMsgf, boolean runMsAmanda, boolean runMyriMatch, boolean runComet, boolean runTide, boolean runAndromeda, boolean runMetaMorpheus, boolean runSage, boolean runNovor, boolean runDirecTag, File omssaFolder, File xTandemFolder, File msgfFolder, File msAmandaFolder, File myriMatchFolder, File cometFolder, File tideFolder, File tideIndexLocation, File andromedaFolder, File metaMorpheusFolder, File sageFolder, File novorFolder, File direcTagFolder, File makeblastdbFolder, com.compomics.util.parameters.tools.ProcessingParameters processingParameters)
      Constructor for the SearchGUI command line interface.If the search engines folders are set to null the default search engine locations are used.
      Parameters:
      identificationParameters - the identification parameters
      resultsFolder - the results folder
      configFolder - the config folder (can be null)
      defaultOutputFileName - the default output file name
      msFiles - list of mass spectrometry files
      fastaFile - the FASTA file
      rawFiles - list of raw files
      identificationParametersFile - the search parameters file
      runOmssa - if true, the OMSSA search is enabled
      runXTandem - if true, the XTandem search is enabled
      runMsgf - if true, the MS-GF+ search is enabled
      runMsAmanda - if true, the MS Amanda search is enabled
      runMyriMatch - if true, the MyriMatch search is enabled
      runComet - if true, the Comet search is enabled
      runTide - if true, the Tide search is enabled
      runAndromeda - if true, the Andromeda search is enabled
      runMetaMorpheus - if true, the MetaMorpheus search is enabled
      runSage - if true, the Sage search is enabled
      runNovor - if true, the Novor search is enabled
      runDirecTag - if true, the DirecTag search is enabled
      omssaFolder - the folder where OMSSA is installed, if null the default location is used
      xTandemFolder - the folder where X!Tandem is installed, if null the default location is used
      msgfFolder - the folder where MS-GF+ is installed, if null the default location is used
      msAmandaFolder - the folder where MS Amanda is installed, if null the default location is used
      myriMatchFolder - the folder where MyriMatch is installed, if null the default location is used
      cometFolder - the folder where Comet is installed, if null the default location is used
      tideFolder - the folder where Tide is installed, if null the default location is used
      tideIndexLocation - the folder where the tide index is to be saved
      andromedaFolder - the folder where Andromeda is installed, if null the default location is used
      metaMorpheusFolder - the folder where MetaMorpheus is installed, if null the default location is used
      sageFolder - the folder where Sage is installed, if null the default location is used
      novorFolder - the folder where Novor is installed, if null the default location is used
      direcTagFolder - the folder where DirecTag is installed, if null the default location is used
      makeblastdbFolder - the folder where makeblastdb is installed, if null the default location is used
      processingParameters - the processing preferences
  • Method Details

    • startSearch

      public void startSearch(com.compomics.util.waiting.WaitingHandler waitingHandler) throws InterruptedException
      Start the search.
      Parameters:
      waitingHandler - the waiting handler
      Throws:
      InterruptedException - thrown if the process is interrupted
    • cancelSearch

      public void cancelSearch()
      Cancel the search.
    • getXTandemFileName

      public static String getXTandemFileName(String spectrumFileName)
      Returns the name of the X!Tandem result file if renamed.
      Parameters:
      spectrumFileName - the name of the spectrum file searched
      Returns:
      the name of the X!Tandem result file
    • getCometFileName

      public String getCometFileName(String spectrumFileName)
      Returns the name of the Comet result file.
      Parameters:
      spectrumFileName - the name of the spectrum file searched
      Returns:
      the name of the Comet result file
    • getCometFileName

      public static String getCometFileName(String spectrumFileName, com.compomics.util.parameters.identification.tool_specific.CometParameters cometParameters)
      Returns the name of the Comet result file.
      Parameters:
      spectrumFileName - the spectrum file name
      cometParameters - the Comet parameters
      Returns:
      the name of the Comet result file
    • getTideFileName

      public String getTideFileName(String spectrumFileName)
      Returns the name of the Tide result file.
      Parameters:
      spectrumFileName - the spectrum file name
      Returns:
      the name of the Tide result file
    • getTideFileName

      public static String getTideFileName(String spectrumFileName, com.compomics.util.parameters.identification.tool_specific.TideParameters tideParameters)
      Returns the name of the Tide result file.
      Parameters:
      spectrumFileName - the spectrum file name
      tideParameters - the Tide parameters
      Returns:
      the name of the Tide result file
    • getAndromedaFileName

      public static String getAndromedaFileName(String spectrumFileName)
      Returns the name of the Andromeda result file.
      Parameters:
      spectrumFileName - the name of the spectrum file searched
      Returns:
      the name of the Andromeda result file
    • getMetaMorpheusFileName

      public static String getMetaMorpheusFileName(String spectrumFileName)
      Returns the name of the MetaMorpheus result file.
      Parameters:
      spectrumFileName - the name of the spectrum file searched
      Returns:
      the name of the MetaMorpheus result file
    • getNovorFileName

      public static String getNovorFileName(String spectrumFileName)
      Returns the name of the Novor result file.
      Parameters:
      spectrumFileName - the name of the spectrum file searched
      Returns:
      the name of the Novor result file
    • getDirecTagFileName

      public static String getDirecTagFileName(String spectrumFileName)
      Returns the name of the DirecTag result file.
      Parameters:
      spectrumFileName - the name of the spectrum file searched
      Returns:
      the name of the DirecTag result file
    • getOMSSAFileName

      public String getOMSSAFileName(String spectrumFileName)
      Returns the name of the OMSSA result file.
      Parameters:
      spectrumFileName - the spectrum file name
      Returns:
      the name of the OMSSA result file
    • getOMSSAFileName

      public static String getOMSSAFileName(String spectrumFileName, com.compomics.util.parameters.identification.tool_specific.OmssaParameters omssaParameters)
      Returns the name of the OMSSA result file.
      Parameters:
      spectrumFileName - the spectrum file name
      omssaParameters - the OMSSA parameters
      Returns:
      the name of the OMSSA result file
    • getMsgfFileName

      public static String getMsgfFileName(String spectrumFileName)
      Returns the name of the MS-GF+ result file.
      Parameters:
      spectrumFileName - the spectrum file name
      Returns:
      the name of the MS-GF+ result file
    • getSageFileName

      public static String getSageFileName(String spectrumFileName)
      Returns the name of the Sage result file.
      Parameters:
      spectrumFileName - the spectrum file name
      Returns:
      the name of the Sage result file
    • getMsAmandaFileName

      public String getMsAmandaFileName(String spectrumFileName)
      Returns the name of the MS Amanda result file.
      Parameters:
      spectrumFileName - the spectrum file name
      Returns:
      the name of the MS Amanda result file
    • getMsAmandaFileName

      public static String getMsAmandaFileName(String spectrumFileName, com.compomics.util.parameters.identification.tool_specific.MsAmandaParameters msAmandaParameters)
      Returns the name of the MS Amanda result file.
      Parameters:
      spectrumFileName - the spectrum file name
      msAmandaParameters - the MS Amanda parameters
      Returns:
      the name of the MS Amanda result file
    • getMyriMatchFileName

      public String getMyriMatchFileName(String spectrumFileName)
      Returns the name of the MyriMatch result file.
      Parameters:
      spectrumFileName - the spectrum file name
      Returns:
      the name of the MyriMatch result file
    • getMyriMatchFileName

      public static String getMyriMatchFileName(String spectrumFileName, com.compomics.util.parameters.identification.tool_specific.MyriMatchParameters myriMatchParameters)
      Returns the name of the MyriMatch result file.
      Parameters:
      spectrumFileName - the spectrum file name
      myriMatchParameters - the MyriMatch parameters
      Returns:
      the name of the MyriMatch result file
    • getXTandemFiles

      public ArrayList<File> getXTandemFiles(File folder, String spectrumFileName)
      Lists all the files which can be X!Tandem output for this spectrum file in the given folder.
      Parameters:
      folder - the folder to screen
      spectrumFileName - the name of the spectrum file
      Returns:
      the list of candidate identification result files
    • getOmssaLocation

      public File getOmssaLocation()
      Returns the OMSSA location.
      Returns:
      the omssaLocation
    • setOmssaLocation

      public void setOmssaLocation(File omssaLocation)
      Set the OMSSA location.
      Parameters:
      omssaLocation - the omssaLocation to set
    • getXtandemLocation

      public File getXtandemLocation()
      Returns the X!Tandem location.
      Returns:
      the xtandemLocation
    • setXtandemLocation

      public void setXtandemLocation(File xtandemLocation)
      Set the X!Tandem location.
      Parameters:
      xtandemLocation - the xtandemLocation to set
    • getMsgfLocation

      public File getMsgfLocation()
      Returns the MS-GF+ location.
      Returns:
      the msgfLocation
    • setMsgfLocation

      public void setMsgfLocation(File msgfLocation)
      Set the MS-GF+ location.
      Parameters:
      msgfLocation - the msgfLocation to set
    • getMsAmandaLocation

      public File getMsAmandaLocation()
      Returns the MS Amanda location.
      Returns:
      the msAmandaLocation
    • setMsAmandaLocation

      public void setMsAmandaLocation(File msAmandaLocation)
      Set the MS Amanda location.
      Parameters:
      msAmandaLocation - the msAmandaLocation to set
    • getMyriMatchLocation

      public File getMyriMatchLocation()
      Returns the MyriMatch location.
      Returns:
      the myriMatchLocation
    • setMyriMatchLocation

      public void setMyriMatchLocation(File myriMatchLocation)
      Set the MyriMatch location.
      Parameters:
      myriMatchLocation - the myriMatchLocation to set
    • getCometLocation

      public File getCometLocation()
      Returns the Comet location.
      Returns:
      the comet location
    • setCometLocation

      public void setCometLocation(File cometLocation)
      Set the Comet location.
      Parameters:
      cometLocation - the cometLocation to set
    • getTideLocation

      public File getTideLocation()
      Returns the Tide location.
      Returns:
      the Tide location
    • setTideLocation

      public void setTideLocation(File tideLocation)
      Set the Tide location.
      Parameters:
      tideLocation - the Tide location to set
    • getAndromedaLocation

      public File getAndromedaLocation()
      Returns the Andromeda location.
      Returns:
      the Andromeda location
    • setAndromedaLocation

      public void setAndromedaLocation(File andromedaLocation)
      Set the Andromeda location.
      Parameters:
      andromedaLocation - the Andromeda location to set
    • getMetaMorpheusLocation

      public File getMetaMorpheusLocation()
      Returns the MetaMorpheus location.
      Returns:
      the MetaMorpheus location
    • setMetaMorpheusLocation

      public void setMetaMorpheusLocation(File metaMorpheusLocation)
      Set the MetaMorpheus location.
      Parameters:
      metaMorpheusLocation - the MetaMorpheus location to set
    • getSageLocation

      public File getSageLocation()
      Returns the Sage location.
      Returns:
      the Sage location
    • setSageLocation

      public void setSageLocation(File sageLocation)
      Set the Sage location.
      Parameters:
      sageLocation - the Sage location to set
    • getNovorLocation

      public File getNovorLocation()
      Returns the Novor location.
      Returns:
      the Novor location
    • setNovorLocation

      public void setNovorLocation(File novorLocation)
      Set the Novor location.
      Parameters:
      novorLocation - the Novor location to set
    • getDirecTagLocation

      public File getDirecTagLocation()
      Returns the DirecTag location.
      Returns:
      the DirecTag location
    • setDirecTagLocation

      public void setDirecTagLocation(File direcTagLocation)
      Set the DirecTag location.
      Parameters:
      direcTagLocation - the DirecTag location to set
    • getMakeblastdbLocation

      public File getMakeblastdbLocation()
      Returns the makeblastdb location.
      Returns:
      the makeblastdb location
    • setMakeblastdbLocation

      public void setMakeblastdbLocation(File makeblastdbLocation)
      Set the makeblastdb location.
      Parameters:
      makeblastdbLocation - the makeblastdbLocation to set
    • isOmssaEnabled

      public boolean isOmssaEnabled()
      Returns true if OMSSA is to be used.
      Returns:
      true if OMSSA is to be used
    • setPeptideShakerEnabled

      public void setPeptideShakerEnabled(boolean runPeptideShaker)
      Set if PeptideShaker is to be run or not.
      Parameters:
      runPeptideShaker - if PeptideShaker is to be run or not
    • isPeptideShakerEnabled

      public boolean isPeptideShakerEnabled()
      Returns a boolean indicating whether PeptideShaker was enabled.
      Returns:
      a boolean indicating whether PeptideShaker was enabled
    • isReporterEnabled

      public boolean isReporterEnabled()
      Returns a boolean indicating whether Reporter was enabled.
      Returns:
      a boolean indicating whether Reporter was enabled
    • setOmssaEnabled

      public void setOmssaEnabled(boolean runOmssa)
      Set if OMSSA is to be used.
      Parameters:
      runOmssa - run OMSSA?
    • isXtandemEnabled

      public boolean isXtandemEnabled()
      Returns true if X!Tandem is to be used.
      Returns:
      if X!Tandem is to be used
    • isMsgfEnabled

      public boolean isMsgfEnabled()
      Returns true if MS-GF+ is to be used.
      Returns:
      if MS-GF+ is to be used
    • isMsAmandaEnabled

      public boolean isMsAmandaEnabled()
      Returns true if MS Amanda is to be used.
      Returns:
      if MS Amanda is to be used
    • isMyriMatchEnabled

      public boolean isMyriMatchEnabled()
      Returns true if MyriMatch is to be used.
      Returns:
      if MyriMatch is to be used
    • isCometEnabled

      public boolean isCometEnabled()
      Returns true if Comet is to be used.
      Returns:
      if Comet is to be used
    • isTideEnabled

      public boolean isTideEnabled()
      Returns true if Tide is to be used.
      Returns:
      if Tide is to be used
    • isAndromedaEnabled

      public boolean isAndromedaEnabled()
      Returns true if Andromeda is to be used.
      Returns:
      if Andromeda is to be used
    • isMetaMorpheusEnabled

      public boolean isMetaMorpheusEnabled()
      Returns true if MetaMorpheus is to be used.
      Returns:
      if MetaMorpheus is to be used
    • isSageEnabled

      public boolean isSageEnabled()
      Returns true if Sage is to be used.
      Returns:
      if Sage is to be used
    • isNovorEnabled

      public boolean isNovorEnabled()
      Returns true if Novor is to be used.
      Returns:
      if Novor is to be used
    • isDirecTagEnabled

      public boolean isDirecTagEnabled()
      Returns true if DirecTag is to be used.
      Returns:
      if DirecTag is to be used
    • setXtandemEnabled

      public void setXtandemEnabled(boolean runXtandem)
      Set if X!Tandem is to be used.
      Parameters:
      runXtandem - run X!Tandem?
    • setMsgfEnabled

      public void setMsgfEnabled(boolean runMsgf)
      Set if MS-GF+ is to be used.
      Parameters:
      runMsgf - run MS-GF+?
    • setMsAmandaEnabled

      public void setMsAmandaEnabled(boolean runMsAmanda)
      Set if MS Amanda is to be used.
      Parameters:
      runMsAmanda - run MS Amanda?
    • setMyriMatchEnabled

      public void setMyriMatchEnabled(boolean runMyriMatch)
      Set if MyriMatch is to be used.
      Parameters:
      runMyriMatch - run MyriMatch?
    • setCometEnabled

      public void setCometEnabled(boolean runComet)
      Set if Comet is to be used.
      Parameters:
      runComet - run Comet?
    • setTideEnabled

      public void setTideEnabled(boolean runTide)
      Set if Tide is to be used.
      Parameters:
      runTide - run Tide?
    • setAndromedaEnabled

      public void setAndromedaEnabled(boolean runAndromeda)
      Set if Andromeda is to be used.
      Parameters:
      runAndromeda - run Andromeda?
    • setMetaMorpheusEnabled

      public void setMetaMorpheusEnabled(boolean runMetaMorpheus)
      Set if MetaMorpheus is to be used.
      Parameters:
      runMetaMorpheus - run MetaMorpheus?
    • setSageEnabled

      public void setSageEnabled(boolean runSage)
      Set if Sage is to be used.
      Parameters:
      runSage - run Sage?
    • setNovorEnabled

      public void setNovorEnabled(boolean runNovor)
      Set if Novor is to be used.
      Parameters:
      runNovor - run Novor?
    • setDirecTagEnabled

      public void setDirecTagEnabled(boolean runDirecTag)
      Set if DirecTag is to be used.
      Parameters:
      runDirecTag - run DirecTag?
    • getResultsFolder

      public File getResultsFolder()
      Returns the results folder.
      Returns:
      the resultsFolder
    • setResultsFolder

      public void setResultsFolder(File resultsFolder)
      Set the results folder.
      Parameters:
      resultsFolder - the resultsFolder to set
    • getSpectrumFiles

      public ArrayList<File> getSpectrumFiles()
      Returns the list of mass spectrometry files.
      Returns:
      the mass spectrometry files
    • setSpectrumFiles

      public void setSpectrumFiles(ArrayList<File> msFiles)
      Sets the list of mass spectrometry files.
      Parameters:
      msFiles - the mass spectrometry files
    • getSpectrumFile

      public File getSpectrumFile(String fileName)
      Returns the spectrum file with the given name. Null if not found.
      Parameters:
      fileName - the file name of the spectrum file
      Returns:
      the spectrum file with the given name
    • getCmsFiles

      public ArrayList<File> getCmsFiles()
      Returns the list of cms files.
      Returns:
      the cms files
    • setCmsFiles

      public void setCmsFiles(ArrayList<File> cmsFiles)
      Sets the list of cms files.
      Parameters:
      cmsFiles - the cms files
    • getCmsFile

      public File getCmsFile(String fileName)
      Returns the cms file with the given name. Null if not found.
      Parameters:
      fileName - the file name of the cms file
      Returns:
      the spectrum file with the given name
    • getFastaFile

      public File getFastaFile()
      Returns the FASTA file.
      Returns:
      the FASTA file
    • setFastaFile

      public void setFastaFile(File fastaFile)
      Set the FASTA file.
      Parameters:
      fastaFile - the FASTA file
    • getRawFiles

      public ArrayList<File> getRawFiles()
      Returns the list of raw files.
      Returns:
      the raw files
    • setRawFiles

      public void setRawFiles(ArrayList<File> rawFiles)
      Sets the list of raw files.
      Parameters:
      rawFiles - the raw files
    • getExperimentLabel

      public String getExperimentLabel()
      Returns the experiment label.
      Returns:
      the experiment label
    • setExperimentLabel

      public void setExperimentLabel(String experimentLabel)
      Sets the the experiment label.
      Parameters:
      experimentLabel - the experimentLabel to set
    • getPeptideShakerFile

      public File getPeptideShakerFile()
      Returns the PeptideShaker file.
      Returns:
      the PeptideShaker file
    • setPeptideShakerFile

      public void setPeptideShakerFile(File peptideShakerFile)
      Sets the PeptideShaker file.
      Parameters:
      peptideShakerFile - the peptideShakerFile to set
    • saveInputFile

      public void saveInputFile(File folder)
      Save the input file.
      Parameters:
      folder - the folder where to save the input file
    • setIdentificationParameters

      public void setIdentificationParameters(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters)
      Set the identification parameters.
      Parameters:
      identificationParameters - the identification parameters
    • setIdentificationParametersFile

      public void setIdentificationParametersFile(File identificationParametersFile)
      Set the identification parameters file.
      Parameters:
      identificationParametersFile - the identification parameters file
    • setMascotFiles

      public void setMascotFiles(ArrayList<File> mascotFiles)
      Sets the mascot files.
      Parameters:
      mascotFiles - the mascot files
    • getMascotFiles

      public ArrayList<File> getMascotFiles()
      Returns the Mascot files.
      Returns:
      the mascot files
    • getProcessingParameters

      public com.compomics.util.parameters.tools.ProcessingParameters getProcessingParameters()
      Returns the processing preferences.
      Returns:
      the processingParameters
    • setProcessingParameters

      public void setProcessingParameters(com.compomics.util.parameters.tools.ProcessingParameters processingParameters)
      Set the processing preferences.
      Parameters:
      processingParameters - the processingParameters to set
    • getMsConvertParameters

      public com.compomics.util.experiment.mass_spectrometry.proteowizard.MsConvertParameters getMsConvertParameters()
      Returns the msconvert parameters.
      Returns:
      the msconvert parameters
    • setMsConvertParameters

      public void setMsConvertParameters(com.compomics.util.experiment.mass_spectrometry.proteowizard.MsConvertParameters msConvertParameters)
      Sets the msconvert parameters.
      Parameters:
      msConvertParameters - the msconvert parameters
    • getThermoRawFileParserParameters

      public com.compomics.util.experiment.mass_spectrometry.thermo_raw_file_parser.ThermoRawFileParserParameters getThermoRawFileParserParameters()
      Returns the ThermoRawFileParser parameters.
      Returns:
      the ThermoRawFileParser parameters
    • setThermoRawFileParserParameters

      public void setThermoRawFileParserParameters(com.compomics.util.experiment.mass_spectrometry.thermo_raw_file_parser.ThermoRawFileParserParameters thermoRawFileParserParameters)
      Sets the ThermoRawFileParser parameters.
      Parameters:
      thermoRawFileParserParameters - the ThermoRawFileParser parameters
    • getDefaultOutputFile

      public static File getDefaultOutputFile(File outputFolder, boolean includeDate)
      Returns the default output file produced by SearchGUI.
      Parameters:
      outputFolder - the folder where to put the file
      includeDate - if true the date will be included in the output file name
      Returns:
      the default output file produced by SearchGUI
    • getDefaultOutputFile

      public static File getDefaultOutputFile(File outputFolder, String classifier, boolean includeDate)
      Returns the default output file produced by SearchGUI classified according to a classifier. For example "OMSSA_searchgui.zip".
      Parameters:
      outputFolder - the folder where to put the file
      classifier - the first part of the name used to classify the output
      includeDate - if true the date will be included in the output file name
      Returns:
      the default output file produced by SearchGUI
    • getOutputDate

      public static String getOutputDate()
      Returns the date as a string to be included in the output. yyyy-MM-dd_HH.mm.ss.
      Returns:
      the date as a string to be included in the output
    • setOutputTimeStamp

      public void setOutputTimeStamp(String outputTimeStamp)
      Set the current output time stamp.
      Parameters:
      outputTimeStamp - the current output time stamp
    • getInputFile

      public static File getInputFile(File outputFolder)
      Returns the file where the paths to the spectrum and FASTA files are saved.
      Parameters:
      outputFolder - the folder where this file shall be saved
      Returns:
      the file where the paths to the spectrum and FASTA file paths are saved
    • organizeOutput

      public void organizeOutput(File outputFolder, File tempOutputFolder, HashMap<String,HashMap<Integer,File>> identificationFilesMap, File parametersFile, boolean includeDate) throws IOException
      Organizes the identification files in zip files according to the output option of the search handler. Existing zip files will be overwritten and result files will be deleted.
      Parameters:
      outputFolder - the output folder
      tempOutputFolder - the folder where the raw SearchGUI output is stored
      identificationFilesMap - the identification files map
      parametersFile - the parameters file
      includeDate - if true the date will be included in the output file name
      Throws:
      IOException - thrown if there is a problem with the files
    • getPeakListFolder

      public File getPeakListFolder(File configFolder)
      Returns the folder to use to store peak lists.
      Parameters:
      configFolder - the config folder
      Returns:
      the folder to use to store peak lists
    • getJarFilePath

      public static String getJarFilePath()
      Returns the path to the jar file.
      Returns:
      the path to the jar file
    • getConfigFolder

      public static File getConfigFolder()
      Returns the folder where the configuration files are stored.
      Returns:
      the folder where the configuration files are stored
    • getTempFolderPath

      public static String getTempFolderPath(File configFolder)
      Returns the folder to use for temporary files. By default the resources folder is used.
      Parameters:
      configFolder - the config folder
      Returns:
      the folder to use for temporary files
    • setTempFolderPath

      public static void setTempFolderPath(String tempFolderPath)
      Sets the folder to use for temporary files.
      Parameters:
      tempFolderPath - the folder to use for temporary files
    • getTempSearchEngineFolderPath

      public static String getTempSearchEngineFolderPath(File configFolder)
      Returns the folder to use for temporary search engine files.
      Parameters:
      configFolder - the config folder
      Returns:
      the folder to use for temporary search engine files
    • setTempSearchEngineFolderPath

      public static void setTempSearchEngineFolderPath(String tempSearchEngineFolderPath)
      Sets the folder to use for temporary search engine files.
      Parameters:
      tempSearchEngineFolderPath - the folder to use for temporary search engine files
    • setLogFolder

      public void setLogFolder(File logFolder)
      Sets the log folder.
      Parameters:
      logFolder - the log folder
    • loadModifications

      public static String loadModifications(com.compomics.util.parameters.identification.search.SearchParameters searchParameters)
      Verifies that the modifications backed-up in the search parameters are loaded and returns an error message if one was already loaded, null otherwise.
      Parameters:
      searchParameters - the search parameters to load
      Returns:
      an error message if one was already loaded, null otherwise
    • getDefaultOutputFileName

      public static String getDefaultOutputFileName()
      Returns the default output file name.
      Returns:
      the defaultOutputFileName
    • setDefaultOutputFileName

      public static void setDefaultOutputFileName(String newOutputFileName)
      Sets the default output file name.
      Parameters:
      newOutputFileName - the defaultOutputFileName to set
    • setCloseProcessWhenDone

      public static void setCloseProcessWhenDone(boolean aCloseProcessWhenDone)
      Set whether the process should be closed when completing or crashing.
      Parameters:
      aCloseProcessWhenDone - the closeProcessWhenDone to set