Class SearchCLIInputBean

java.lang.Object
eu.isas.searchgui.cmd.SearchCLIInputBean

public class SearchCLIInputBean extends Object
The SearchCLIInputBean reads and stores command line options from a command line.
Author:
Marc Vaudel, Harald Barsnes
  • Constructor Details

    • SearchCLIInputBean

      public SearchCLIInputBean(org.apache.commons.cli.CommandLine aLine) throws IOException, ClassNotFoundException
      Parses the arguments of a command line.
      Parameters:
      aLine - the command line
      Throws:
      IOException - thrown if an error occurred while reading the FASTA file
      ClassNotFoundException - thrown if the search parameters cannot be converted
  • Method Details

    • getSpectrumFiles

      public ArrayList<File> getSpectrumFiles()
      Return the spectrum files.
      Returns:
      the spectrum files
    • getFastaFile

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

      public File getOutputFolder()
      Returns the output folder.
      Returns:
      the output folder
    • getConfigFolder

      public File getConfigFolder()
      Returns the config folder.
      Returns:
      the config folder
    • getIdentificationParameters

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

      public File getIdentificationParametersFile()
      Returns the identification parameters file.
      Returns:
      the identification parameters file
    • getSpectrumFiles

      public static ArrayList<File> getSpectrumFiles(String optionInput) throws FileNotFoundException
      Returns a list of spectrum files as imported from the command line option.
      Parameters:
      optionInput - the command line option
      Returns:
      a list of file candidates
      Throws:
      FileNotFoundException - exception thrown whenever a file is not found
    • isOmssaEnabled

      public boolean isOmssaEnabled()
      Returns true if OMSSA is to be used.
      Returns:
      true if OMSSA is to be used
    • 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
    • getOmssaLocation

      public File getOmssaLocation()
      Returns the OMSSA location, null if none is set.
      Returns:
      the OMSSA location
    • getXtandemLocation

      public File getXtandemLocation()
      Returns the X!Tandem location.
      Returns:
      the xtandem location
    • getMsgfLocation

      public File getMsgfLocation()
      Returns the MS-GF+ location.
      Returns:
      the msgf location
    • getMsAmandaLocation

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

      public File getMyriMatchLocation()
      Returns the MyriMatch location.
      Returns:
      the mMyriMatch location
    • getCometLocation

      public File getCometLocation()
      Returns the Comet location.
      Returns:
      the cometL location
    • getTideLocation

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

      public File getTideIndexLocation()
      Returns the Tide index location.
      Returns:
      the Tide index location
    • getAndromedaLocation

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

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

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

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

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

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

      public int getMgfMaxSize()
      Returns the max mgf file size before splitting.
      Returns:
      the mgfMaxSize
    • getMgfNSpectra

      public int getMgfNSpectra()
      Get the max number of spectra in an mgf file.
      Returns:
      the mgfNSpectra
    • getDuplicateSpectrumTitleHandling

      public int getDuplicateSpectrumTitleHandling()
      Returns how duplicate spectrum titles are to be handled. 0: do nothing (default), 1: rename by adding (2), (3), etc, behind the titles of the duplicated titles, or 2: delete spectra with duplicated titles.
      Returns:
      how duplicate spectrum titles are to be handled
    • setDuplicateSpectrumTitleHandling

      public void setDuplicateSpectrumTitleHandling(int duplicateSpectrumTitleHandling)
      Set how duplicate spectrum titles are to be handled. 0: do nothing, 1: rename by adding (2), (3), etc, behind the titles of the duplicated titles, or 2: delete spectra with duplicated titles.
      Parameters:
      duplicateSpectrumTitleHandling - the duplicateSpectrumTitleHandling to set
    • getMissingSpectrumTitleHandling

      public int getMissingSpectrumTitleHandling()
      Returns how missing spectrum titles are to be handled. 0: do nothing, 1: add missing titles.
      Returns:
      how missing spectrum titles are to be handled
    • setMissingSpectrumTitleHandling

      public void setMissingSpectrumTitleHandling(int missingSpectrumTitleHandling)
      Set how missing spectrum titles are to be handled. 0: do nothing, 1: add missing titles.
      Parameters:
      missingSpectrumTitleHandling - the missingSpectrumTitleHandling to set
    • getNThreads

      public int getNThreads()
      Returns the number of threads to use.
      Returns:
      the number of threads to use
    • isValidStartup

      public static boolean isValidStartup(org.apache.commons.cli.CommandLine aLine) throws IOException
      Verifies the command line start parameters.
      Parameters:
      aLine - the command line to validate
      Returns:
      true if the startup was valid
      Throws:
      IOException - if the spectrum file(s) are not found
    • getPathSettingsCLIInputBean

      public PathSettingsCLIInputBean getPathSettingsCLIInputBean()
      Returns the path settings provided by the user.
      Returns:
      the path settings provided by the user
    • getDefaultOutputFileName

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

      public void setDefaultOutputFileName(String defaultOutputFileName)
      Sets the default output name.
      Parameters:
      defaultOutputFileName - the defaultOutputFileName to set
    • isGzip

      public boolean isGzip()
      Indicates whether identification files should be gzipped.
      Returns:
      A boolean indicating whether identification files should be gzipped.
    • getOutputOption

      public com.compomics.util.parameters.searchgui.OutputParameters getOutputOption()
      Returns the output option chosen by the user. Null if not set.
      Returns:
      the output option chosen by the user
    • isOutputData

      public Boolean isOutputData()
      Indicates whether input data should be included in the output when it is zipped.
      Returns:
      whether input data should be included in the output
    • isOutputDate

      public Boolean isOutputDate()
      Indicates whether the date should be included in the output name.
      Returns:
      whether the date should be included in the output name
    • renameXTandemFile

      public Boolean renameXTandemFile()
      Returns true if the X! Tandem file should be renamed.
      Returns:
      true if the X! Tandem file should be renamed
    • setRenameXTandemFile

      public void setRenameXTandemFile(Boolean renameXTandemFile)
      Set if the X! Tandem file should be renamed.
      Parameters:
      renameXTandemFile - rename file?
    • getTargetDecoyFileNameTag

      public String getTargetDecoyFileNameTag()
      Returns the target-decoy file name tag.
      Returns:
      the targetDecoyFileNameTag
    • setTargetDecoyFileNameTag

      public void setTargetDecoyFileNameTag(String targetDecoyFileNameTag)
      Set the target-decoy file name tag.
      Parameters:
      targetDecoyFileNameTag - the targetDecoyFileNameTag to set
    • checkMgfSize

      public boolean checkMgfSize()
      Returns if the mgf should be checked for size.
      Returns:
      true if the mgf should be checked for size
    • setCheckMgfSize

      public void setCheckMgfSize(boolean checkMgfSize)
      Set if the mgf should be checked for size.
      Parameters:
      checkMgfSize - the mgf should be checked for size
    • getRefMass

      public Double getRefMass()
      Returns the reference mass for the conversion of the fragment ion tolerance from ppm to Dalton.
      Returns:
      the reference mass for the conversion of the fragment ion tolerance from ppm to Dalton
    • setRefMass

      public void setRefMass(Double refMass)
      Sets the reference mass for the conversion of the fragment ion tolerance from ppm to Dalton.
      Parameters:
      refMass - the reference mass for the conversion of the fragment ion tolerance from ppm to Dalton