Class AbstractMatrixRowPairAnalysis

java.lang.Object
ubic.gemma.core.analysis.expression.coexpression.links.AbstractMatrixRowPairAnalysis
All Implemented Interfaces:
MatrixRowPairAnalysis
Direct Known Subclasses:
PearsonMetrics

public abstract class AbstractMatrixRowPairAnalysis extends Object implements MatrixRowPairAnalysis
Author:
paul
  • Field Details

    • HARD_LIMIT_MIN_NUM_USED

      public static final int HARD_LIMIT_MIN_NUM_USED
      Absolute lower limit to minNumUsed. (This used to be 3, and then 5). It doesn't make much sense to set this higher than ExpressionExperimentFilter.MIN_NUMBER_OF_SAMPLES_PRESENT
      See Also:
  • Constructor Details

    • AbstractMatrixRowPairAnalysis

      public AbstractMatrixRowPairAnalysis()
  • Method Details

    • getHistogramArrayList

      public DoubleArrayList getHistogramArrayList()
      Read back the histogram as a DoubleArrayList of counts.
      Specified by:
      getHistogramArrayList in interface MatrixRowPairAnalysis
      Returns:
      cern.colt.list.DoubleArrayList
    • getKeepers

      public ObjectArrayList getKeepers()
      Identify the correlations that are above the set thresholds.
      Specified by:
      getKeepers in interface MatrixRowPairAnalysis
      Returns:
      cern.colt.list.ObjectArrayList
    • getProbeForRow

      public CompositeSequence getProbeForRow(ExpressionDataMatrixRowElement rowEl)
      Specified by:
      getProbeForRow in interface MatrixRowPairAnalysis
    • getScoreInBin

      public double getScoreInBin(int i)
      Specified by:
      getScoreInBin in interface MatrixRowPairAnalysis
    • numCached

      public int numCached()
      Specified by:
      numCached in interface MatrixRowPairAnalysis
      Returns:
      The number of values stored in the correlation matrix.
    • setDuplicateMap

      public void setDuplicateMap(Map<CompositeSequence,Set<Gene>> probeToGeneMap)
      Specified by:
      setDuplicateMap in interface MatrixRowPairAnalysis
    • setLowerTailThreshold

      public void setLowerTailThreshold(double k)
      Set the threshold, below which correlations are kept (e.g., negative values)
      Specified by:
      setLowerTailThreshold in interface MatrixRowPairAnalysis
      Parameters:
      k - double
    • setMinNumpresent

      public void setMinNumpresent(int minSamplesToKeepCorrelation)
      Set the number of mutually present values in a pairwise comparison that must be attained before the correlation is stored. Note that you cannot set the value less than HARD_LIMIT_MIN_NUM_USED.
      Specified by:
      setMinNumpresent in interface MatrixRowPairAnalysis
    • setOmitNegativeCorrelationLinks

      public void setOmitNegativeCorrelationLinks(boolean omitNegativeCorrelationLinks)
      Specified by:
      setOmitNegativeCorrelationLinks in interface MatrixRowPairAnalysis
      Parameters:
      omitNegativeCorrelationLinks - the omitNegativeCorrelationLinks to set
    • setPValueThreshold

      public void setPValueThreshold(double k)
      Specified by:
      setPValueThreshold in interface MatrixRowPairAnalysis
      Parameters:
      k - double
    • setUpperTailThreshold

      public void setUpperTailThreshold(double k)
      Set the threshold, above which correlations are kept.
      Specified by:
      setUpperTailThreshold in interface MatrixRowPairAnalysis
      Parameters:
      k - double
    • setUseAbsoluteValue

      public void setUseAbsoluteValue(boolean k)
      If set to true, then the absolute value of the correlation is used for histograms and choosing correlations to keep. The correlation matrix, if actually used to store all the values, maintains the actual number.
      Specified by:
      setUseAbsoluteValue in interface MatrixRowPairAnalysis
      Parameters:
      k - boolean
    • getMatrix

      Returns:
      baseCode.dataStructure.NamedMatrix
    • isUsePvalueThreshold

      public boolean isUsePvalueThreshold()
      Returns:
      the usePvalueThreshold
    • setUsePvalueThreshold

      public void setUsePvalueThreshold(boolean usePvalueThreshold)
      Description copied from interface: MatrixRowPairAnalysis
      Default is true; set to false to disable use of the pvalue threshold, in which case only the upper and lower tail thresholds will be used.
      Specified by:
      setUsePvalueThreshold in interface MatrixRowPairAnalysis
      Parameters:
      usePvalueThreshold - the usePvalueThreshold to set
    • getCrossHybridizationRejections

      public long getCrossHybridizationRejections()
      Description copied from interface: MatrixRowPairAnalysis
      Use after analysis.
      Specified by:
      getCrossHybridizationRejections in interface MatrixRowPairAnalysis
      Returns:
      how many pairs were rejected due to cross-hybridization potential
    • getNumUniqueGenes

      public double getNumUniqueGenes()
      Specified by:
      getNumUniqueGenes in interface MatrixRowPairAnalysis
    • size

      public int size()
      Specified by:
      size in interface MatrixRowPairAnalysis
      Returns:
      how many rows/columns the matrix has.
    • kurtosis

      public double kurtosis()
      Returns:
      double
    • nullMatrix

      public void nullMatrix()
      Flag the correlation matrix as un-fillable. This means that when PearsonMatrix is called, only the histogram will be filled in. Also trashes any values that might have been stored there.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      java.lang.String
    • rowStatistics

      protected abstract void rowStatistics()