Package eu.isas.peptideshaker
Class PeptideShaker
java.lang.Object
eu.isas.peptideshaker.PeptideShaker
This class will be responsible for the identification import and the
associated calculations.
- Author:
- Marc Vaudel, Harald Barsnes
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPeptideShaker(com.compomics.util.experiment.ProjectParameters projectParameters) Constructor without mass specification. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateProject(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters spectrumCountingParameters, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, ProjectDetails projectDetails, com.compomics.util.parameters.peptide_shaker.ProjectType projectType, com.compomics.util.waiting.WaitingHandler waitingHandler, boolean setWaitingHandlerFinshedWhenDone, com.compomics.util.exceptions.ExceptionHandler exceptionHandler) Creates a PeptideShaker project.static FileReturns the folder where the configuration files are stored.com.compomics.util.experiment.biology.genes.GeneMapsReturns the gene maps.com.compomics.util.experiment.identification.IdentificationReturns the identification object.com.compomics.util.experiment.identification.features.IdentificationFeaturesGeneratorReturns the identification features generator used when loading the files.static StringRetrieves the path to the jar file.static StringReturns the matches directory parent.static FileReturns the matches directory parent.static StringReturns the directory used to store the identification matches.static FileReturns the path to the matches folder according to the user path settings.com.compomics.util.experiment.identification.peptide_shaker.MetricsReturns the metrics picked-up while loading the files.com.compomics.util.experiment.io.biology.protein.ProteinDetailsProviderReturns the protein details provider.com.compomics.util.experiment.io.biology.protein.SequenceProviderReturns the sequence provider.static StringReturns the file used for user preferences storage.static StringReturns the folder used for user preferences storage.static StringRetrieves the version number set in the pom file.intimportFiles(com.compomics.util.waiting.WaitingHandler waitingHandler, ArrayList<File> idFiles, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, ProjectDetails projectDetails, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, com.compomics.util.exceptions.ExceptionHandler exceptionHandler) Imports identification results from result files.static voidinstantiateFacories(com.compomics.util.parameters.UtilitiesUserParameters utilitiesUserPreferences) Instantiates the spectrum, sequence, and PTM factories with caches adapted to the memory available as set in the user preferences.static StringloadModifications(com.compomics.util.parameters.identification.search.SearchParameters searchParameters) Verifies that the modifications backed-up in the search parameters are loaded and returns an error message if one was already loaded, null otherwise.voidpeptideMapChanged(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider) Processes the identifications if a change occurred in the peptide map.voidproteinMapChanged(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider) Processes the identifications if a change occurred in the protein map.static voidsetConfigFolder(File aConfigFolder) Set the config folder.voidsetGeneMaps(com.compomics.util.experiment.biology.genes.GeneMaps geneMaps) Sets the gene maps.static voidsetMatchesDirectoryParent(String matchesDirectoryParent) Sets the matches directory parent.static voidsetUserPreferencesFolder(String userPreferencesFolder) Sets the file used for user preferences storage.voidspectrumMapChanged(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.parameters.tools.ProcessingParameters processingPreferences, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.parameters.peptide_shaker.ProjectType projectType) Processes the identifications if a change occurred in the PSM map.
-
Field Details
-
TIMEOUT_DAYS
public static final int TIMEOUT_DAYSDefault time out in days.- See Also:
-
PEPTIDESHAKER_CONFIGURATION_FILE
Default PeptideShaker modifications.- See Also:
-
DATA_DIRECTORY
Folder where the data files are stored by default. Should be the same as in SearchGUI.
-
-
Constructor Details
-
PeptideShaker
public PeptideShaker(com.compomics.util.experiment.ProjectParameters projectParameters) Constructor without mass specification. Calculation will be done on new maps which will be retrieved as compomics utilities parameters.- Parameters:
projectParameters- the experiment conducted
-
-
Method Details
-
importFiles
public int importFiles(com.compomics.util.waiting.WaitingHandler waitingHandler, ArrayList<File> idFiles, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, ProjectDetails projectDetails, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, com.compomics.util.exceptions.ExceptionHandler exceptionHandler) Imports identification results from result files.- Parameters:
waitingHandler- the handler displaying feedback to the useridFiles- the files to importspectrumProvider- the spectrum provideridentificationParameters- identification parametersprojectDetails- the project detailsprocessingParameters- the initial processing preferencesexceptionHandler- the exception handler- Returns:
- 0 if the import went fine, 1 otherwise
-
createProject
public void createProject(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.parameters.tools.ProcessingParameters processingParameters, com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters spectrumCountingParameters, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, ProjectDetails projectDetails, com.compomics.util.parameters.peptide_shaker.ProjectType projectType, com.compomics.util.waiting.WaitingHandler waitingHandler, boolean setWaitingHandlerFinshedWhenDone, com.compomics.util.exceptions.ExceptionHandler exceptionHandler) throws InterruptedException, TimeoutException, IOException Creates a PeptideShaker project.- Parameters:
identificationParameters- the identification parametersprocessingParameters- the processing parametersspectrumCountingParameters- the spectrum counting parametersspectrumProvider- the spectrum providerprojectDetails- the project detailsprojectType- the project typewaitingHandler- the handler displaying feedback to the usersetWaitingHandlerFinshedWhenDone- if true, the waiting handler is set to finished when the project is createdexceptionHandler- handler for exceptions- Throws:
InterruptedException- exception thrown if a thread gets interruptedTimeoutException- exception thrown if a process times outIOException- if an exception occurs when parsing files
-
spectrumMapChanged
public void spectrumMapChanged(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.parameters.tools.ProcessingParameters processingPreferences, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.parameters.peptide_shaker.ProjectType projectType) Processes the identifications if a change occurred in the PSM map.- Parameters:
identification- the identification object containing the identification matcheswaitingHandler- the waiting handlerprocessingPreferences- the processing preferencesidentificationParameters- the identification parameterssequenceProvider- a protein sequence providerspectrumProvider- the spectrum providerprojectType- the project type
-
peptideMapChanged
public void peptideMapChanged(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider) Processes the identifications if a change occurred in the peptide map.- Parameters:
identification- the identification object containing the identification matcheswaitingHandler- the waiting handleridentificationParameters- the identification parameterssequenceProvider- a protein sequence providerspectrumProvider- the spectrum provider
-
proteinMapChanged
public void proteinMapChanged(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.waiting.WaitingHandler waitingHandler, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider) Processes the identifications if a change occurred in the protein map.- Parameters:
identification- the identification object containing the identification matcheswaitingHandler- the waiting handleridentificationParameters- the identification parameterssequenceProvider- a protein sequence provider
-
getMetrics
public com.compomics.util.experiment.identification.peptide_shaker.Metrics getMetrics()Returns the metrics picked-up while loading the files.- Returns:
- the metrics picked-up while loading the files
-
getGeneMaps
public com.compomics.util.experiment.biology.genes.GeneMaps getGeneMaps()Returns the gene maps.- Returns:
- the gene maps
-
getIdentification
public com.compomics.util.experiment.identification.Identification getIdentification()Returns the identification object.- Returns:
- the identification object
-
getSequenceProvider
public com.compomics.util.experiment.io.biology.protein.SequenceProvider getSequenceProvider()Returns the sequence provider.- Returns:
- the sequence provider
-
getProteinDetailsProvider
public com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider getProteinDetailsProvider()Returns the protein details provider.- Returns:
- the protein details provider
-
setGeneMaps
public void setGeneMaps(com.compomics.util.experiment.biology.genes.GeneMaps geneMaps) Sets the gene maps.- Parameters:
geneMaps- the new gene maps
-
getIdentificationFeaturesGenerator
public com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator getIdentificationFeaturesGenerator()Returns the identification features generator used when loading the files.- Returns:
- the identification features generator used when loading the files
-
loadModifications
public static String loadModifications(com.compomics.util.parameters.identification.search.SearchParameters searchParameters) Verifies that the modifications backed-up in the search parameters are loaded and returns an error message if one was already loaded, null otherwise.- Parameters:
searchParameters- the search parameters to load- Returns:
- an error message if one was already loaded, null otherwise
-
getUserPreferencesFile
Returns the file used for user preferences storage.- Returns:
- the file used for user preferences storage
-
getUserPreferencesFolder
Returns the folder used for user preferences storage.- Returns:
- the folder used for user preferences storage
-
setUserPreferencesFolder
Sets the file used for user preferences storage.- Parameters:
userPreferencesFolder- the folder used for user preferences storage
-
getMatchesDirectorySubPath
Returns the directory used to store the identification matches.- Returns:
- the directory used to store the identification matches
-
getMatchesDirectoryParent
Returns the matches directory parent. An empty string if not set. Can be a relative path.- Returns:
- the matches directory parent
-
getMatchesDirectoryParentFile
Returns the matches directory parent. An empty string if not set.- Returns:
- the matches directory parent
-
setMatchesDirectoryParent
Sets the matches directory parent.- Parameters:
matchesDirectoryParent- the matches directory parent- Throws:
IOException- thrown of an exception occurs
-
getMatchesFolder
Returns the path to the matches folder according to the user path settings.- Returns:
- the path to the match folder according to the user path settings
-
instantiateFacories
public static void instantiateFacories(com.compomics.util.parameters.UtilitiesUserParameters utilitiesUserPreferences) Instantiates the spectrum, sequence, and PTM factories with caches adapted to the memory available as set in the user preferences.- Parameters:
utilitiesUserPreferences- the user preferences
-
getVersion
Retrieves the version number set in the pom file.- Returns:
- the version number of PeptideShaker
-
getJarFilePath
Retrieves the path to the jar file.- Returns:
- the path to the jar file
-
getConfigFolder
Returns the folder where the configuration files are stored.- Returns:
- the folder where the configuration files are stored
-
setConfigFolder
Set the config folder.- Parameters:
aConfigFolder- the config folder
-