Class IdentificationParametersInputBean
java.lang.Object
com.compomics.cli.identification_parameters.IdentificationParametersInputBean
public class IdentificationParametersInputBean extends Object
This class parses the parameters from a command line and stores them in a
SearchParameters object.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Summary
Constructors Constructor Description IdentificationParametersInputBean(org.apache.commons.cli.CommandLine aLine)
Takes all the arguments from a command line. -
Method Summary
Modifier and Type Method Description File
getDestinationFile()
Returns the file where to save the identification parameters.IdentificationParameters
getIdentificationParameters()
Returns the identification parameters.File
getInputFile()
Returns the input parameters file.Boolean
isListEnzymes()
Indicates whether the enzymes should be printed.Boolean
isListMods()
Indicates whether the modifications should be printed.static boolean
isValidModifications(org.apache.commons.cli.CommandLine aLine)
Verifies that modifications are correctly recognized.static boolean
isValidStartup(org.apache.commons.cli.CommandLine aLine, boolean checkMandatoryParameters)
Verifies the command line start parameters.void
setIdentificationParameters(IdentificationParameters identificationParameters)
Sets the identification parameters.void
updateIdentificationParameters()
Updates the identification parameters according to the command line.
-
Constructor Details
-
IdentificationParametersInputBean
public IdentificationParametersInputBean(org.apache.commons.cli.CommandLine aLine) throws IOException, ClassNotFoundExceptionTakes all the arguments from a command line.- Parameters:
aLine
- the command line- Throws:
IOException
- if an IOException occursClassNotFoundException
- if aClassNotFoundException ClassNotFoundException occurs
-
-
Method Details
-
isValidStartup
public static boolean isValidStartup(org.apache.commons.cli.CommandLine aLine, boolean checkMandatoryParameters)Verifies the command line start parameters.- Parameters:
aLine
- the command line to validatecheckMandatoryParameters
- if true, check if mandatory parameters are included- Returns:
- true if the startup was valid
-
updateIdentificationParameters
public void updateIdentificationParameters()Updates the identification parameters according to the command line. -
setIdentificationParameters
Sets the identification parameters.- Parameters:
identificationParameters
- the identification parameters
-
getIdentificationParameters
Returns the identification parameters.- Returns:
- the identification parameters
-
getInputFile
Returns the input parameters file.- Returns:
- the input parameters file
-
getDestinationFile
Returns the file where to save the identification parameters.- Returns:
- the file where to save the identification parameters
-
isListMods
Indicates whether the modifications should be printed.- Returns:
- true if the modifications should be printed
-
isListEnzymes
Indicates whether the enzymes should be printed.- Returns:
- true if the enzymes should be printed
-
isValidModifications
public static boolean isValidModifications(org.apache.commons.cli.CommandLine aLine) throws IOExceptionVerifies that modifications are correctly recognized.- Parameters:
aLine
- the command line to validate- Returns:
- true if the startup was valid
- Throws:
IOException
- if an IOException occurs
-