Class IdentificationFeaturesCache
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.features.IdentificationFeaturesCache
- All Implemented Interfaces:
Serializable
public class IdentificationFeaturesCache extends ExperimentObject
This class caches the identification features calculated by the
IdentificationFeaturesGenerator for later reuse.
- Author:
- Marc Vaudel
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IdentificationFeaturesCache.ObjectType
An enumerator of the supported object types. -
Field Summary
-
Constructor Summary
Constructors Constructor Description IdentificationFeaturesCache()
Constructor. -
Method Summary
Modifier and Type Method Description void
addObject(IdentificationFeaturesCache.ObjectType type, long objectKey, Object object)
Adds an object in the cache.long
getCurrentPeptideKey()
Returns the current peptide key.long
getCurrentProteinKey()
Returns the current protein key.int
getMaxSpectrumCount()
Returns the maximal amount of PSMs for the peptides in the current peptide list.int
getnValidatedPsms()
Returns the number of validated PSMs for the currently selected peptide.Object
getObject(IdentificationFeaturesCache.ObjectType type, long objectKey)
Returns an object if present in the cache.long[]
getPeptideList()
Returns the current peptide list.long[]
getProteinList()
Returns the protein list.long[]
getProteinListAfterHiding()
Returns the protein list after all hiding filters have been used.long[]
getPsmList()
Returns the PSM list.long[]
getValidatedProteinList()
Returns a list of validated proteins.boolean
isFiltered()
Indicates whether the protein list is filtered.void
removeObjects(IdentificationFeaturesCache.ObjectType type)
Clears all objects of the given type.void
setCurrentPeptideKey(long currentPeptideKey)
Sets the current peptide key.void
setCurrentProteinKey(long currentProteinKey)
Sets the current protein key.void
setFiltered(boolean filtered)
Sets whether the protein list is filtered.void
setMaxSpectrumCount(int maxSpectrumCount)
Sets the maximal amount of PSMs for the peptides in the current peptide list.void
setnValidatedPsms(int nValidatedPsms)
Sets the number of validated PSMs for the currently selected peptide.void
setPeptideList(long[] peptideList)
Sets the current peptide list.void
setProteinList(long[] proteinList)
Sets the protein list.void
setProteinListAfterHiding(long[] proteinListAfterHiding)
Sets the protein list after all hiding filters have been used.void
setPsmList(long[] psmList)
Sets the PSM list.void
setReadOnly(boolean readOnly)
Sets the cache in read only.void
setValidatedProteinList(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
-