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
  • Constructor Details

  • Method Details

    • removeObjects

      public void removeObjects​(IdentificationFeaturesCache.ObjectType type)
      Clears all objects of the given type.
      Parameters:
      type - the object type
    • addObject

      public void addObject​(IdentificationFeaturesCache.ObjectType type, long objectKey, Object object)
      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 object
      objectKey - the object key
      object - the object to store
    • getObject

      public Object getObject​(IdentificationFeaturesCache.ObjectType type, long objectKey)
      Returns an object if present in the cache. Null if not.
      Parameters:
      type - the type of the object
      objectKey - 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