Class ClusterBuilder

java.lang.Object
eu.isas.reporter.calculation.clustering.ClusterBuilder

public class ClusterBuilder extends Object
Methods for building clusters based on a reporter project.
Author:
Marc Vaudel, Harald Barsnes
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.compomics.util.math.clustering.KMeansClustering
    clusterProfiles(com.compomics.util.experiment.identification.Identification identification, 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.experiment.identification.peptide_shaker.Metrics metrics, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, QuantificationFeaturesGenerator quantificationFeaturesGenerator, DisplayPreferences displayPreferences, boolean loadData, com.compomics.util.waiting.WaitingHandler waitingHandler)
    Clusters the profiles according to the given parameters.
    Returns the peptide keys retained after filtering.
    Returns the protein keys retained after filtering.
    Returns the PSM keys retained after filtering.
    Returns the maximal ratio included in the clusters.
    Returns the minimal ratio included in the clusters.
    Returns the cluster classes corresponding to a peptide match.
    Returns the index of the cluster of the given peptide key.
    Returns the cluster classes corresponding to a protein match.
    Returns the index of the cluster of the given protein key.
    Returns the cluster classes corresponding to a PSM.
    Returns the index of the cluster of the given PSM key.
    Returns the maximal value between the absolute value of the min and max ratios.
    void
    loadData(com.compomics.util.experiment.identification.Identification identification, 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.experiment.identification.peptide_shaker.Metrics metrics, DisplayPreferences displayPreferences, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, QuantificationFeaturesGenerator quantificationFeaturesGenerator, com.compomics.util.waiting.WaitingHandler waitingHandler)
    Filters the proteins and indexes them according to the clustering settings and stores the result in the attribute maps.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClusterBuilder

      public ClusterBuilder()
      Constructor.
  • Method Details

    • clusterProfiles

      public com.compomics.util.math.clustering.KMeansClustering clusterProfiles(com.compomics.util.experiment.identification.Identification identification, 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.experiment.identification.peptide_shaker.Metrics metrics, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, QuantificationFeaturesGenerator quantificationFeaturesGenerator, DisplayPreferences displayPreferences, boolean loadData, com.compomics.util.waiting.WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
      Clusters the profiles according to the given parameters.
      Parameters:
      identification - the identification
      identificationParameters - the identification parameters
      sequenceProvider - the sequence provider
      spectrumProvider - the spectrum provider
      metrics - the PeptideShaker metrics
      reporterIonQuantification - the reporter ion quantification
      quantificationFeaturesGenerator - the quantification features generator
      displayPreferences - the display preferences
      loadData - if true, the data is (re-)loaded
      waitingHandler - a waiting handler
      Returns:
      the k-means clustering of every class
      Throws:
      SQLException - if an SQLException occurs
      IOException - if an IOException occurs
      ClassNotFoundException - if a ClassNotFoundException occurs
      InterruptedException - if an InterruptedException occurs
    • loadData

      public void loadData(com.compomics.util.experiment.identification.Identification identification, 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.experiment.identification.peptide_shaker.Metrics metrics, DisplayPreferences displayPreferences, com.compomics.util.experiment.quantification.reporterion.ReporterIonQuantification reporterIonQuantification, QuantificationFeaturesGenerator quantificationFeaturesGenerator, com.compomics.util.waiting.WaitingHandler waitingHandler) throws SQLException, IOException, ClassNotFoundException, InterruptedException
      Filters the proteins and indexes them according to the clustering settings and stores the result in the attribute maps.
      Parameters:
      identification - the identification
      identificationParameters - the identification parameters
      sequenceProvider - the sequence provider
      spectrumProvider - the spectrum provider
      metrics - the PeptideShaker metrics
      displayPreferences - the display preferences
      reporterIonQuantification - the reporter ion quantification
      quantificationFeaturesGenerator - the quantification features generator
      waitingHandler - the waiting handler
      Throws:
      SQLException - if an exception occurs while interacting with the database
      IOException - if an exception occurs while reading or writing a file
      ClassNotFoundException - if a exception occurs while deserializing an object
      InterruptedException - if an threading exception occurs
    • getFilteredProteins

      public Set<Long> getFilteredProteins()
      Returns the protein keys retained after filtering.
      Returns:
      the protein keys retained after filtering
    • getFilteredPeptides

      public Set<Long> getFilteredPeptides()
      Returns the peptide keys retained after filtering.
      Returns:
      the peptide keys retained after filtering
    • getFilteredPsms

      public Set<Long> getFilteredPsms()
      Returns the PSM keys retained after filtering.
      Returns:
      the PSM keys retained after filtering
    • getMinRatio

      public Double getMinRatio()
      Returns the minimal ratio included in the clusters.
      Returns:
      the minimal ratio included in the clusters
    • getMaxRatio

      public Double getMaxRatio()
      Returns the maximal ratio included in the clusters.
      Returns:
      the maximal ratio included in the clusters
    • getRatioAmplitude

      public Double getRatioAmplitude()
      Returns the maximal value between the absolute value of the min and max ratios.
      Returns:
      the maximal value between the absolute value of the min and max ratios
    • getPsmIndex

      public Integer getPsmIndex(Long key)
      Returns the index of the cluster of the given PSM key. Null if not found or not a PSM.
      Parameters:
      key - the PSM key
      Returns:
      the index in the cluster
    • getPeptideIndex

      public Integer getPeptideIndex(Long key)
      Returns the index of the cluster of the given peptide key. Null if not found or not a peptide.
      Parameters:
      key - the peptide key
      Returns:
      the index in the cluster
    • getProteinIndex

      public Integer getProteinIndex(Long key)
      Returns the index of the cluster of the given protein key. Null if not found or not a protein.
      Parameters:
      key - the protein key
      Returns:
      the index in the cluster
    • getProteinClasses

      public ArrayList<String> getProteinClasses(Long key)
      Returns the cluster classes corresponding to a protein match.
      Parameters:
      key - the match key
      Returns:
      the cluster classes corresponding to this protein
    • getPeptideClasses

      public ArrayList<String> getPeptideClasses(Long key)
      Returns the cluster classes corresponding to a peptide match.
      Parameters:
      key - the match key
      Returns:
      the cluster classes corresponding to this peptide
    • getPsmClasses

      public ArrayList<String> getPsmClasses(Long key)
      Returns the cluster classes corresponding to a PSM.
      Parameters:
      key - the match key
      Returns:
      the cluster classes corresponding to this PSM