Class IdentificationFeaturesCache
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.features.IdentificationFeaturesCache
- All Implemented Interfaces:
Serializable
This class caches the identification features calculated by the
IdentificationFeaturesGenerator for later reuse.
- Author:
- Marc Vaudel
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enumerator of the supported object types. -
Field Summary
Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObject(IdentificationFeaturesCache.ObjectType type, long objectKey, Object object) Adds an object in the cache.longReturns the current peptide key.longReturns the current protein key.intReturns the maximal amount of PSMs for the peptides in the current peptide list.intReturns the number of validated PSMs for the currently selected peptide.getObject(IdentificationFeaturesCache.ObjectType type, long objectKey) Returns an object if present in the cache.long[]Returns the current peptide list.long[]Returns the protein list.long[]Returns the protein list after all hiding filters have been used.long[]Returns the PSM list.long[]Returns a list of validated proteins.booleanIndicates whether the protein list is filtered.voidClears all objects of the given type.voidsetCurrentPeptideKey(long currentPeptideKey) Sets the current peptide key.voidsetCurrentProteinKey(long currentProteinKey) Sets the current protein key.voidsetFiltered(boolean filtered) Sets whether the protein list is filtered.voidsetMaxSpectrumCount(int maxSpectrumCount) Sets the maximal amount of PSMs for the peptides in the current peptide list.voidsetnValidatedPsms(int nValidatedPsms) Sets the number of validated PSMs for the currently selected peptide.voidsetPeptideList(long[] peptideList) Sets the current peptide list.voidsetProteinList(long[] proteinList) Sets the protein list.voidsetProteinListAfterHiding(long[] proteinListAfterHiding) Sets the protein list after all hiding filters have been used.voidsetPsmList(long[] psmList) Sets the PSM list.voidsetReadOnly(boolean readOnly) Sets the cache in read only.voidsetValidatedProteinList(long[] validatedProteinList) Sets the list of validated proteins.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
IdentificationFeaturesCache
public IdentificationFeaturesCache()Constructor.
-
-
Method Details
-
removeObjects
Clears all objects of the given type.- Parameters:
type- the object type
-
addObject
Adds an object in the cache. If a thread gets interrupted, the corresponding exception is thrown as runtime exception.- Parameters:
type- the type of the objectobjectKey- the object keyobject- the object to store
-
getObject
Returns an object if present in the cache. Null if not.- Parameters:
type- the type of the objectobjectKey- the key of the object- Returns:
- the desired object
-
getCurrentPeptideKey
public long getCurrentPeptideKey()Returns the current peptide key.- Returns:
- the current peptide key
-
setCurrentPeptideKey
public void setCurrentPeptideKey(long currentPeptideKey) Sets the current peptide key.- Parameters:
currentPeptideKey- the current peptide key
-
getCurrentProteinKey
public long getCurrentProteinKey()Returns the current protein key.- Returns:
- the current protein key
-
setCurrentProteinKey
public void setCurrentProteinKey(long currentProteinKey) Sets the current protein key.- Parameters:
currentProteinKey- the current protein key
-
isFiltered
public boolean isFiltered()Indicates whether the protein list is filtered.- Returns:
- a boolean indicating whether the protein list is filtered
-
setFiltered
public void setFiltered(boolean filtered) Sets whether the protein list is filtered.- Parameters:
filtered- a boolean indicating whether the protein list is filtered
-
getMaxSpectrumCount
public int getMaxSpectrumCount()Returns the maximal amount of PSMs for the peptides in the current peptide list.- Returns:
- the maximal amount of PSMs for the peptides in the current peptide list
-
setMaxSpectrumCount
public void setMaxSpectrumCount(int maxSpectrumCount) Sets the maximal amount of PSMs for the peptides in the current peptide list.- Parameters:
maxSpectrumCount- the maximal amount of PSMs for the peptides in the current peptide list
-
getnValidatedPsms
public int getnValidatedPsms()Returns the number of validated PSMs for the currently selected peptide.- Returns:
- the number of validated PSMs
-
setnValidatedPsms
public void setnValidatedPsms(int nValidatedPsms) Sets the number of validated PSMs for the currently selected peptide.- Parameters:
nValidatedPsms- the number of validated PSMs
-
getPeptideList
public long[] getPeptideList()Returns the current peptide list.- Returns:
- the current peptide list
-
setPeptideList
public void setPeptideList(long[] peptideList) Sets the current peptide list.- Parameters:
peptideList- the current peptide list
-
getProteinList
public long[] getProteinList()Returns the protein list.- Returns:
- the protein list
-
setProteinList
public void setProteinList(long[] proteinList) Sets the protein list.- Parameters:
proteinList- the protein list
-
getProteinListAfterHiding
public long[] getProteinListAfterHiding()Returns the protein list after all hiding filters have been used.- Returns:
- the protein list after all hiding filters have been used
-
setProteinListAfterHiding
public void setProteinListAfterHiding(long[] proteinListAfterHiding) Sets the protein list after all hiding filters have been used.- Parameters:
proteinListAfterHiding- the protein list after all hiding filters have been used
-
getPsmList
public long[] getPsmList()Returns the PSM list.- Returns:
- the PSM list
-
setPsmList
public void setPsmList(long[] psmList) Sets the PSM list.- Parameters:
psmList- the PSM list
-
getValidatedProteinList
public long[] getValidatedProteinList()Returns a list of validated proteins.- Returns:
- a list of validated proteins
-
setValidatedProteinList
public void setValidatedProteinList(long[] validatedProteinList) Sets the list of validated proteins.- Parameters:
validatedProteinList- a list of validated proteins
-
setReadOnly
public void setReadOnly(boolean readOnly) Sets the cache in read only.- Parameters:
readOnly- boolean indicating whether the cache should be in read only
-