Package eu.isas.searchgui.cmd
Class SearchCLIInputBean
java.lang.Object
eu.isas.searchgui.cmd.SearchCLIInputBean
The SearchCLIInputBean reads and stores command line options from a command
line.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Summary
ConstructorsConstructorDescriptionSearchCLIInputBean(org.apache.commons.cli.CommandLine aLine) Parses the arguments of a command line. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns if the mgf should be checked for size.Returns the Andromeda location.Returns the Comet location.Returns the config folder.Returns the default output name.Returns the DirecTag location.intReturns how duplicate spectrum titles are to be handled.Return the FASTA file.com.compomics.util.parameters.identification.IdentificationParametersReturns the identification parameters.Returns the identification parameters file.Returns the makeblastdb location.Returns the MetaMorpheus location.intReturns the max mgf file size before splitting.intGet the max number of spectra in an mgf file.intReturns how missing spectrum titles are to be handled.Returns the MS Amanda location.Returns the MS-GF+ location.Returns the MyriMatch location.Returns the Novor location.intReturns the number of threads to use.Returns the OMSSA location, null if none is set.Returns the output folder.com.compomics.util.parameters.searchgui.OutputParametersReturns the output option chosen by the user.Returns the path settings provided by the user.Returns the reference mass for the conversion of the fragment ion tolerance from ppm to Dalton.Returns the Sage location.Return the spectrum files.getSpectrumFiles(String optionInput) Returns a list of spectrum files as imported from the command line option.Returns the target-decoy file name tag.Returns the Tide index location.Returns the Tide location.Returns the X!Tandem location.booleanReturns true if Andromeda is to be used.booleanReturns true if Comet is to be used.booleanReturns true if DirecTag is to be used.booleanisGzip()Indicates whether identification files should be gzipped.booleanReturns true if MetaMorpheus is to be used.booleanReturns true if MS Amanda is to be used.booleanReturns true if MS-GF+ is to be used.booleanReturns true if MyriMatch is to be used.booleanReturns true if Novor is to be used.booleanReturns true if OMSSA is to be used.Indicates whether input data should be included in the output when it is zipped.Indicates whether the date should be included in the output name.booleanReturns true if Sage is to be used.booleanReturns true if Tide is to be used.static booleanisValidStartup(org.apache.commons.cli.CommandLine aLine) Verifies the command line start parameters.booleanReturns true if X!Tandem is to be used.Returns true if the X! Tandem file should be renamed.voidsetCheckMgfSize(boolean checkMgfSize) Set if the mgf should be checked for size.voidsetDefaultOutputFileName(String defaultOutputFileName) Sets the default output name.voidsetDuplicateSpectrumTitleHandling(int duplicateSpectrumTitleHandling) Set how duplicate spectrum titles are to be handled.voidsetMissingSpectrumTitleHandling(int missingSpectrumTitleHandling) Set how missing spectrum titles are to be handled.voidsetRefMass(Double refMass) Sets the reference mass for the conversion of the fragment ion tolerance from ppm to Dalton.voidsetRenameXTandemFile(Boolean renameXTandemFile) Set if the X! Tandem file should be renamed.voidsetTargetDecoyFileNameTag(String targetDecoyFileNameTag) Set the target-decoy file name tag.
-
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 fileClassNotFoundException- thrown if the search parameters cannot be converted
-
-
Method Details
-
getSpectrumFiles
Return the spectrum files.- Returns:
- the spectrum files
-
getFastaFile
Return the FASTA file.- Returns:
- the FASTA file
-
getOutputFolder
Returns the output folder.- Returns:
- the output folder
-
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
Returns the identification parameters file.- Returns:
- the identification parameters file
-
getSpectrumFiles
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
Returns the OMSSA location, null if none is set.- Returns:
- the OMSSA location
-
getXtandemLocation
Returns the X!Tandem location.- Returns:
- the xtandem location
-
getMsgfLocation
Returns the MS-GF+ location.- Returns:
- the msgf location
-
getMsAmandaLocation
Returns the MS Amanda location.- Returns:
- the MS Amanda location
-
getMyriMatchLocation
Returns the MyriMatch location.- Returns:
- the mMyriMatch location
-
getCometLocation
Returns the Comet location.- Returns:
- the cometL location
-
getTideLocation
Returns the Tide location.- Returns:
- the Tide location
-
getTideIndexLocation
Returns the Tide index location.- Returns:
- the Tide index location
-
getAndromedaLocation
Returns the Andromeda location.- Returns:
- the Andromeda location
-
getMetaMorpheusLocation
Returns the MetaMorpheus location.- Returns:
- the MetaMorpheus location
-
getSageLocation
Returns the Sage location.- Returns:
- the Sage location
-
getNovorLocation
Returns the Novor location.- Returns:
- the Novor location
-
getDirecTagLocation
Returns the DirecTag location.- Returns:
- the DirecTag location
-
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
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
Returns the path settings provided by the user.- Returns:
- the path settings provided by the user
-
getDefaultOutputFileName
Returns the default output name.- Returns:
- the defaultOutputFileName
-
setDefaultOutputFileName
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
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
Indicates whether the date should be included in the output name.- Returns:
- whether the date should be included in the output name
-
renameXTandemFile
Returns true if the X! Tandem file should be renamed.- Returns:
- true if the X! Tandem file should be renamed
-
setRenameXTandemFile
Set if the X! Tandem file should be renamed.- Parameters:
renameXTandemFile- rename file?
-
getTargetDecoyFileNameTag
Returns the target-decoy file name tag.- Returns:
- the targetDecoyFileNameTag
-
setTargetDecoyFileNameTag
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
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
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
-