com.compomics.util.experiment.identification
Class SearchParametersInputBean

java.lang.Object
  extended by com.compomics.util.experiment.identification.SearchParametersInputBean

public class SearchParametersInputBean
extends Object

This class contains the parses parameters from a command line and stores them in a SearchParameters object.

Author:
Marc Vaudel, Harald Barsnes

Nested Class Summary
static class SearchParametersInputBean.ToolType
          The tool type.
 
Constructor Summary
SearchParametersInputBean(org.apache.commons.cli.CommandLine aLine)
          Takes all the arguments from a command line.
 
Method Summary
 boolean fixDuplicateSpectrumTitles()
          Returns true if duplicate spectrum titles are to be corrected automatically.
 int getMgfMaxSize()
          Returns the max mgf file size before splitting.
 int getMgfNSpectra()
          Get the max number of spectra in an mgf file.
 int getNThreads()
          Returns the number of threads to use.
 File getOmssaLocation()
          Returns the OMSSA location, null if none is set.
 File getOutputFile()
          Returns the output folder.
 File getPepNovoExecutable()
          Returns the PepNovo+ executable.
 SearchParameters getSearchParameters()
          Returns the search parameters.
 ArrayList<File> getSpectrumFiles()
          Return the spectrum files.
static ArrayList<File> getSpectrumFiles(String optionInput)
          Returns a list of spectrum files as imported from the command line option.
 File getXtandemLocation()
          Returns the X!Tandem location.
 boolean isOmssaEnabled()
          Returns true if OMSSA is to be used.
 boolean isOmssaOutputAsOmx()
          Returns true if OMSSA OMX is to be used as output, false if OMSSA CSV is to be used.
static boolean isValidStartup(org.apache.commons.cli.CommandLine aLine, SearchParametersInputBean.ToolType currentToolType)
          Verifies the command line start parameters.
 boolean isXTandemEnabled()
          Returns true if X!Tandem is to be used.
 void setFixDuplicateSpectrumTitles(boolean fixDuplicateSpectrumTitles)
          Set if duplicate spectrum titles are to be corrected automatically.
 void setOmssaLocation(File omssaLocation)
          Set the OMSSA location.
 void setPepNovoExecutable(File pepNovoExecutable)
          Set the PepNovo+ executable.
 void setXtandemLocation(File xtandemLocation)
          Set the X!Tandem location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchParametersInputBean

public SearchParametersInputBean(org.apache.commons.cli.CommandLine aLine)
                          throws FileNotFoundException,
                                 IOException,
                                 ClassNotFoundException
Takes all the arguments from a command line.

Parameters:
aLine - the command line
Throws:
FileNotFoundException
IOException
ClassNotFoundException
Method Detail

getSpectrumFiles

public ArrayList<File> getSpectrumFiles()
Return the spectrum files.

Returns:
the spectrum files

getOutputFile

public File getOutputFile()
Returns the output folder.

Returns:
the output folder

getSearchParameters

public SearchParameters getSearchParameters()
Returns the search parameters.

Returns:
the search parameters

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

isOmssaOutputAsOmx

public boolean isOmssaOutputAsOmx()
Returns true if OMSSA OMX is to be used as output, false if OMSSA CSV is to be used.

Returns:
true if OMSSA OMX is to be used as output, false if OMSSA CSV is to be used

getOmssaLocation

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

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

getPepNovoExecutable

public File getPepNovoExecutable()
Returns the PepNovo+ executable. Null if not set.

Returns:
the PepNovo+ executable

setPepNovoExecutable

public void setPepNovoExecutable(File pepNovoExecutable)
Set the PepNovo+ executable.

Parameters:
pepNovoExecutable - the pepNovoExecutable to set

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

fixDuplicateSpectrumTitles

public boolean fixDuplicateSpectrumTitles()
Returns true if duplicate spectrum titles are to be corrected automatically.

Returns:
the fixDuplicateSpectrumTitles

setFixDuplicateSpectrumTitles

public void setFixDuplicateSpectrumTitles(boolean fixDuplicateSpectrumTitles)
Set if duplicate spectrum titles are to be corrected automatically.

Parameters:
fixDuplicateSpectrumTitles - the fixDuplicateSpectrumTitles 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,
                                     SearchParametersInputBean.ToolType currentToolType)
                              throws IOException
Verifies the command line start parameters.

Parameters:
aLine - the command line to validate
currentToolType - the tool type, used to check which parameters that are mandatory
Returns:
true if the startup was valid
Throws:
IOException


Copyright © 2013. All Rights Reserved.