Class PeptideShakerPathParameters
java.lang.Object
eu.isas.peptideshaker.preferences.PeptideShakerPathParameters
This class sets the path preferences for the files to read/write.
- Author:
- Marc Vaudel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum of the paths which can be set in PeptideShaker. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArrayList<com.compomics.software.settings.PathKey> Returns a list containing the keys of the paths where the tool is not able to write.static StringgetPathPreference(PeptideShakerPathParameters.PeptideShakerPathKey peptideShakerPathKey) Sets the path according to the given key and path.static voidloadPathParametersFromFile(File inputFile) Loads the path preferences from a text file.static voidLoads a path to be set from a line.static voidsetAllPathsIn(String path) Sets all the paths inside a given folder.static voidsetPathParameters(com.compomics.software.settings.PathKey pathKey, String path) Sets the path according to the given key and path.static voidsetPathPreference(PeptideShakerPathParameters.PeptideShakerPathKey peptideShakerPathKey, String path) Sets the path according to the given key and path.static voidwriteConfigurationToFile(com.compomics.util.io.flat.SimpleFileWriter writer) Writes the configuration file using the provided buffered writer.static voidwriteConfigurationToFile(File file) Writes all path configurations to the given file.static voidwritePathToFile(com.compomics.util.io.flat.SimpleFileWriter writer, PeptideShakerPathParameters.PeptideShakerPathKey pathKey) Writes the path of interest using the provided buffered writer.
-
Constructor Details
-
PeptideShakerPathParameters
public PeptideShakerPathParameters()
-
-
Method Details
-
loadPathParametersFromFile
public static void loadPathParametersFromFile(File inputFile) throws FileNotFoundException, IOException Loads the path preferences from a text file.- Parameters:
inputFile- the file to load the path preferences from- Throws:
FileNotFoundException- thrown if an FileNotFoundException occursIOException- thrown if an IOException occurs
-
loadPathParametersFromLine
public static void loadPathParametersFromLine(String line) throws FileNotFoundException, IOException Loads a path to be set from a line.- Parameters:
line- the line where to read the path from- Throws:
FileNotFoundException- thrown if an FileNotFoundException occursIOException
-
getPathPreference
public static String getPathPreference(PeptideShakerPathParameters.PeptideShakerPathKey peptideShakerPathKey) throws IOException Sets the path according to the given key and path.- Parameters:
peptideShakerPathKey- the key of the path- Returns:
- returns the path used
- Throws:
FileNotFoundException- thrown if an FileNotFoundException occursIOException
-
setPathPreference
public static void setPathPreference(PeptideShakerPathParameters.PeptideShakerPathKey peptideShakerPathKey, String path) throws IOException Sets the path according to the given key and path.- Parameters:
peptideShakerPathKey- the key of the pathpath- the path to be set- Throws:
FileNotFoundException- thrown if an FileNotFoundException occursIOException
-
setPathParameters
public static void setPathParameters(com.compomics.software.settings.PathKey pathKey, String path) throws IOException Sets the path according to the given key and path.- Parameters:
pathKey- the key of the pathpath- the path to be set- Throws:
FileNotFoundException- thrown if an FileNotFoundException occursIOException
-
setAllPathsIn
Sets all the paths inside a given folder.- Parameters:
path- the path of the folder where to redirect all paths.- Throws:
FileNotFoundException- thrown if an FileNotFoundException occursIOException
-
writeConfigurationToFile
Writes all path configurations to the given file.- Parameters:
file- the destination file- Throws:
FileNotFoundException- thrown if an FileNotFoundException occursIOException
-
writeConfigurationToFile
public static void writeConfigurationToFile(com.compomics.util.io.flat.SimpleFileWriter writer) throws IOException Writes the configuration file using the provided buffered writer.- Parameters:
writer- the writer to use for writing.- Throws:
FileNotFoundException- thrown if an FileNotFoundException occursIOException
-
writePathToFile
public static void writePathToFile(com.compomics.util.io.flat.SimpleFileWriter writer, PeptideShakerPathParameters.PeptideShakerPathKey pathKey) throws IOException Writes the path of interest using the provided buffered writer.- Parameters:
writer- the writer to use for writingpathKey- the key of the path of interest- Throws:
FileNotFoundException- thrown if an FileNotFoundException occursIOException
-
getErrorKeys
Returns a list containing the keys of the paths where the tool is not able to write.- Returns:
- a list containing the keys of the paths where the tool is not able to write
- Throws:
IOException- exception thrown whenever an error occurred while loading the path configuration
-