Package eu.isas.peptideshaker.cmd
Class PeptideShakerCLIInputBean
java.lang.Object
eu.isas.peptideshaker.cmd.PeptideShakerCLIInputBean
public class PeptideShakerCLIInputBean extends Object
This class is a simple bean wrapping the CLI parameters provided in an
Options instance.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Summary
Constructors Constructor Description PeptideShakerCLIInputBean()Empty constructor for API usage via other tools.PeptideShakerCLIInputBean(org.apache.commons.cli.CommandLine aLine)Construct a PeptideShakerCLIInputBean from an Apache CLI instance. -
Method Summary
Modifier and Type Method Description StringgetExperimentID()Returns the experiment name.FilegetFastaFile()Returns the FASTA file.FollowUpCLIInputBeangetFollowUpCLIInputBean()Returns the follow-up options required.static ArrayList<File>getIdentificationFiles(String optionInput)Returns a list of identification files as imported from the command line option.FilegetIdentificationParametersFile()Returns the identification parameters file.com.compomics.cli.identification_parameters.IdentificationParametersInputBeangetIdentificationParametersInputBean()Returns the identification parameters provided by the user.ArrayList<File>getIdFiles()Returns the identification files.booleangetMgfExport()When exporting the project to a zip file, returns whether mgf file/s should be written apart from it, into the same folder.MzidCLIInputBeangetMzidCLIInputBean()Returns the mzid export options required.IntegergetnThreads()Returns the number of threads to use.FilegetOutput()Returns the psdb output file.PathSettingsCLIInputBeangetPathSettingsCLIInputBean()Returns the path settings provided by the user.FilegetPrideFile()Returns the pride file.intgetReplicate()Returns the replicate number.ReportCLIInputBeangetReportCLIInputBean()Returns the report export options required.StringgetSampleID()Returns the name of the sample.ArrayList<File>getSpectrumFiles()Returns the spectrum files.static ArrayList<File>getSpectrumFiles(String optionInput)Returns a list of spectrum files as imported from the command line option.FilegetZipExport()Returns the file where to export the project as zip file.booleanisGUI()Indicates whether a GUI shall be used to display the progress.static booleanisValidStartup(org.apache.commons.cli.CommandLine aLine)Verifies the command line start parameters.voidsetExperimentID(String experimentID)Sets the experiment name.voidsetFastaFile(File fastaFile)Sets the FASTA file.voidsetIdFiles(ArrayList<File> idFiles)Sets the identification files.voidsetOutput(File output)Sets the psdb output file.voidsetPrideFile(File prideFile)Sets the pride file.voidsetReplicate(int replicate)Sets the replicate number.voidsetSampleID(String sampleID)Sets the name of the sample.voidsetSpectrumFiles(ArrayList<File> spectrumFiles)Sets the spectrum files.
-
Constructor Details
-
PeptideShakerCLIInputBean
public PeptideShakerCLIInputBean(org.apache.commons.cli.CommandLine aLine) throws IOException, ClassNotFoundExceptionConstruct a PeptideShakerCLIInputBean from an Apache CLI instance.- Parameters:
aLine- the command line- Throws:
IOException- thrown of IOException occursClassNotFoundException- thrown of ClassNotFoundException occurs
-
PeptideShakerCLIInputBean
public PeptideShakerCLIInputBean()Empty constructor for API usage via other tools.
-
-
Method Details
-
getZipExport
Returns the file where to export the project as zip file. Null if not set.- Returns:
- the file where to export the project as zip file
-
getMgfExport
public boolean getMgfExport()When exporting the project to a zip file, returns whether mgf file/s should be written apart from it, into the same folder.- Returns:
- whether mgf file/s should be written apart from the zip file
-
getExperimentID
Returns the experiment name.- Returns:
- the experiment name
-
setExperimentID
Sets the experiment name.- Parameters:
experimentID- the experiment name
-
getOutput
Returns the psdb output file. Null if not set.- Returns:
- the psdb output file
-
setOutput
Sets the psdb output file.- Parameters:
output- the psdb output file
-
getSampleID
Returns the name of the sample.- Returns:
- the name of the sample
-
setSampleID
Sets the name of the sample.- Parameters:
sampleID- the name of the sample
-
getIdFiles
Returns the identification files.- Returns:
- the identification files
-
setIdFiles
Sets the identification files.- Parameters:
idFiles- the identification files
-
getPrideFile
Returns the pride file.- Returns:
- the pride file
-
setPrideFile
Sets the pride file.- Parameters:
prideFile- the pride file
-
getReplicate
public int getReplicate()Returns the replicate number.- Returns:
- the replicate number
-
setReplicate
public void setReplicate(int replicate)Sets the replicate number.- Parameters:
replicate- the replicate number
-
getSpectrumFiles
Returns the spectrum files.- Returns:
- the spectrum files
-
setSpectrumFiles
Sets the spectrum files.- Parameters:
spectrumFiles- the spectrum files
-
getFastaFile
Returns the FASTA file.- Returns:
- the FASTA file
-
setFastaFile
Sets the FASTA file.- Parameters:
fastaFile- the FASTA 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
-
getIdentificationFiles
public static ArrayList<File> getIdentificationFiles(String optionInput) throws FileNotFoundExceptionReturns a list of identification 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
-
isGUI
public boolean isGUI()Indicates whether a GUI shall be used to display the progress.- Returns:
- a boolean indicating whether a GUI shall be used to display the progress
-
getFollowUpCLIInputBean
Returns the follow-up options required.- Returns:
- the follow-up options required
-
getReportCLIInputBean
Returns the report export options required.- Returns:
- the report export options required
-
getMzidCLIInputBean
Returns the mzid export options required.- Returns:
- the mzid export options required
-
getPathSettingsCLIInputBean
Returns the path settings provided by the user.- Returns:
- the path settings provided by the user
-
getIdentificationParametersInputBean
public com.compomics.cli.identification_parameters.IdentificationParametersInputBean getIdentificationParametersInputBean()Returns the identification parameters provided by the user.- Returns:
- the identification parameters provided by the user
-
getIdentificationParametersFile
Returns the identification parameters file.- Returns:
- the identification parameters file
-
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
-