Class ClusterBuilder
java.lang.Object
eu.isas.reporter.calculation.clustering.ClusterBuilder
Methods for building clusters based on a reporter project.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.compomics.util.math.clustering.KMeansClusteringclusterProfiles(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.getPeptideClasses(Long key) Returns the cluster classes corresponding to a peptide match.getPeptideIndex(Long key) Returns the index of the cluster of the given peptide key.getProteinClasses(Long key) Returns the cluster classes corresponding to a protein match.getProteinIndex(Long key) Returns the index of the cluster of the given protein key.getPsmClasses(Long key) Returns the cluster classes corresponding to a PSM.getPsmIndex(Long key) 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.voidloadData(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.
-
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 identificationidentificationParameters- the identification parameterssequenceProvider- the sequence providerspectrumProvider- the spectrum providermetrics- the PeptideShaker metricsreporterIonQuantification- the reporter ion quantificationquantificationFeaturesGenerator- the quantification features generatordisplayPreferences- the display preferencesloadData- if true, the data is (re-)loadedwaitingHandler- a waiting handler- Returns:
- the k-means clustering of every class
- Throws:
SQLException- if an SQLException occursIOException- if an IOException occursClassNotFoundException- if a ClassNotFoundException occursInterruptedException- 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 identificationidentificationParameters- the identification parameterssequenceProvider- the sequence providerspectrumProvider- the spectrum providermetrics- the PeptideShaker metricsdisplayPreferences- the display preferencesreporterIonQuantification- the reporter ion quantificationquantificationFeaturesGenerator- the quantification features generatorwaitingHandler- the waiting handler- Throws:
SQLException- if an exception occurs while interacting with the databaseIOException- if an exception occurs while reading or writing a fileClassNotFoundException- if a exception occurs while deserializing an objectInterruptedException- if an threading exception occurs
-
getFilteredProteins
Returns the protein keys retained after filtering.- Returns:
- the protein keys retained after filtering
-
getFilteredPeptides
Returns the peptide keys retained after filtering.- Returns:
- the peptide keys retained after filtering
-
getFilteredPsms
Returns the PSM keys retained after filtering.- Returns:
- the PSM keys retained after filtering
-
getMinRatio
Returns the minimal ratio included in the clusters.- Returns:
- the minimal ratio included in the clusters
-
getMaxRatio
Returns the maximal ratio included in the clusters.- Returns:
- the maximal ratio included in the clusters
-
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
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
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
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
Returns the cluster classes corresponding to a protein match.- Parameters:
key- the match key- Returns:
- the cluster classes corresponding to this protein
-
getPeptideClasses
Returns the cluster classes corresponding to a peptide match.- Parameters:
key- the match key- Returns:
- the cluster classes corresponding to this peptide
-
getPsmClasses
Returns the cluster classes corresponding to a PSM.- Parameters:
key- the match key- Returns:
- the cluster classes corresponding to this PSM
-