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 Summary
Fields Modifier and Type Field Description static int
HARD_LIMIT_MIN_NUM_USED
Absolute lower limit to minNumUsed.-
Fields inherited from interface ubic.gemma.core.analysis.expression.coexpression.links.MatrixRowPairAnalysis
NUM_BINS
-
-
Constructor Summary
Constructors Constructor Description AbstractMatrixRowPairAnalysis()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description long
getCrossHybridizationRejections()
Use after analysis.DoubleArrayList
getHistogramArrayList()
Read back the histogram as a DoubleArrayList of counts.ObjectArrayList
getKeepers()
Identify the correlations that are above the set thresholds.Matrix2D<ExpressionDataMatrixRowElement,ExpressionDataMatrixRowElement,Double>
getMatrix()
double
getNumUniqueGenes()
CompositeSequence
getProbeForRow(ExpressionDataMatrixRowElement rowEl)
double
getScoreInBin(int i)
boolean
isUsePvalueThreshold()
double
kurtosis()
void
nullMatrix()
Flag the correlation matrix as un-fillable.int
numCached()
protected abstract void
rowStatistics()
void
setDuplicateMap(Map<CompositeSequence,Set<Gene>> probeToGeneMap)
void
setLowerTailThreshold(double k)
Set the threshold, below which correlations are kept (e.g., negative values)void
setMinNumpresent(int minSamplesToKeepCorrelation)
Set the number of mutually present values in a pairwise comparison that must be attained before the correlation is stored.void
setOmitNegativeCorrelationLinks(boolean omitNegativeCorrelationLinks)
void
setPValueThreshold(double k)
void
setUpperTailThreshold(double k)
Set the threshold, above which correlations are kept.void
setUseAbsoluteValue(boolean k)
If set to true, then the absolute value of the correlation is used for histograms and choosing correlations to keep.void
setUsePvalueThreshold(boolean usePvalueThreshold)
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.int
size()
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.analysis.expression.coexpression.links.MatrixRowPairAnalysis
calculateMetrics, getMetricType
-
-
-
-
Field Detail
-
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:
- Constant Field Values
-
-
Method Detail
-
getHistogramArrayList
public DoubleArrayList getHistogramArrayList()
Read back the histogram as a DoubleArrayList of counts.- Specified by:
getHistogramArrayList
in interfaceMatrixRowPairAnalysis
- Returns:
- cern.colt.list.DoubleArrayList
-
getKeepers
public ObjectArrayList getKeepers()
Identify the correlations that are above the set thresholds.- Specified by:
getKeepers
in interfaceMatrixRowPairAnalysis
- Returns:
- cern.colt.list.ObjectArrayList
-
getProbeForRow
public CompositeSequence getProbeForRow(ExpressionDataMatrixRowElement rowEl)
- Specified by:
getProbeForRow
in interfaceMatrixRowPairAnalysis
-
getScoreInBin
public double getScoreInBin(int i)
- Specified by:
getScoreInBin
in interfaceMatrixRowPairAnalysis
-
numCached
public int numCached()
- Specified by:
numCached
in interfaceMatrixRowPairAnalysis
- Returns:
- The number of values stored in the correlation matrix.
-
setDuplicateMap
public void setDuplicateMap(Map<CompositeSequence,Set<Gene>> probeToGeneMap)
- Specified by:
setDuplicateMap
in interfaceMatrixRowPairAnalysis
-
setLowerTailThreshold
public void setLowerTailThreshold(double k)
Set the threshold, below which correlations are kept (e.g., negative values)- Specified by:
setLowerTailThreshold
in interfaceMatrixRowPairAnalysis
- 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 interfaceMatrixRowPairAnalysis
-
setOmitNegativeCorrelationLinks
public void setOmitNegativeCorrelationLinks(boolean omitNegativeCorrelationLinks)
- Specified by:
setOmitNegativeCorrelationLinks
in interfaceMatrixRowPairAnalysis
- Parameters:
omitNegativeCorrelationLinks
- the omitNegativeCorrelationLinks to set
-
setPValueThreshold
public void setPValueThreshold(double k)
- Specified by:
setPValueThreshold
in interfaceMatrixRowPairAnalysis
- Parameters:
k
- double
-
setUpperTailThreshold
public void setUpperTailThreshold(double k)
Set the threshold, above which correlations are kept.- Specified by:
setUpperTailThreshold
in interfaceMatrixRowPairAnalysis
- 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 interfaceMatrixRowPairAnalysis
- Parameters:
k
- boolean
-
getMatrix
public Matrix2D<ExpressionDataMatrixRowElement,ExpressionDataMatrixRowElement,Double> 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 interfaceMatrixRowPairAnalysis
- Parameters:
usePvalueThreshold
- the usePvalueThreshold to set
-
getCrossHybridizationRejections
public long getCrossHybridizationRejections()
Description copied from interface:MatrixRowPairAnalysis
Use after analysis.- Specified by:
getCrossHybridizationRejections
in interfaceMatrixRowPairAnalysis
- Returns:
- how many pairs were rejected due to cross-hybridization potential
-
getNumUniqueGenes
public double getNumUniqueGenes()
- Specified by:
getNumUniqueGenes
in interfaceMatrixRowPairAnalysis
-
size
public int size()
- Specified by:
size
in interfaceMatrixRowPairAnalysis
- 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.
-
rowStatistics
protected abstract void rowStatistics()
-
-