Class ExpressionDataMatrixBuilder
- java.lang.Object
-
- ubic.gemma.core.analysis.preprocess.ExpressionDataMatrixBuilder
-
public class ExpressionDataMatrixBuilder extends Object
Utility methods for taking an ExpressionExperiment and returning various types of ExpressionDataMatrices, such as the processed data, preferred data, background, etc. This class is not database aware; use the ExpressionDataMatrixService to get ready-to-use matrices starting from an ExpressionExperiment. This handles complexities such as experiments that contain multiple array designs with differing quantitation types.- Author:
- pavlidis
-
-
Constructor Summary
Constructors Constructor Description ExpressionDataMatrixBuilder(Collection<? extends DesignElementDataVector> vectors)
ExpressionDataMatrixBuilder(Collection<ProcessedExpressionDataVector> processedVectors, Collection<? extends DesignElementDataVector> otherVectors)
-
Method Summary
-
-
-
Constructor Detail
-
ExpressionDataMatrixBuilder
public ExpressionDataMatrixBuilder(Collection<? extends DesignElementDataVector> vectors)
- Parameters:
vectors
- collection of vectors. They should be thawed first.
-
ExpressionDataMatrixBuilder
public ExpressionDataMatrixBuilder(Collection<ProcessedExpressionDataVector> processedVectors, Collection<? extends DesignElementDataVector> otherVectors)
-
-
Method Detail
-
getMatrix
public static ExpressionDataMatrix<?> getMatrix(Collection<? extends DesignElementDataVector> vectors)
Create a matrix using all the vectors, which are assumed to all be of the same quantitation type.- Parameters:
vectors
- raw vectors- Returns:
- matrix of appropriate type.
-
getMissingValueQuantitationTypes
public static Collection<QuantitationType> getMissingValueQuantitationTypes(ExpressionExperiment expressionExperiment)
- Parameters:
expressionExperiment
- (should be lightly thawed)- Returns:
- a collection of QTs
-
getPreferredAndMissingQuantitationTypes
public static Collection<QuantitationType> getPreferredAndMissingQuantitationTypes(ExpressionExperiment expressionExperiment)
-
getPreferredQuantitationTypes
public static Collection<QuantitationType> getPreferredQuantitationTypes(ExpressionExperiment expressionExperiment)
-
getUsefulQuantitationTypes
public static Collection<QuantitationType> getUsefulQuantitationTypes(Collection<QuantitationType> eeQtTypes)
- Parameters:
eeQtTypes
- the QTs- Returns:
- just the quantitation types that are likely to be 'useful': Preferred, present/absent, signals and background from both channels (if present).
-
getUsefulQuantitationTypes
public static Collection<QuantitationType> getUsefulQuantitationTypes(ExpressionExperiment expressionExperiment)
- Parameters:
expressionExperiment
- the EE to get the QTs for- Returns:
- just the quantitation types that are likely to be 'useful': Preferred, present/absent, signals and background from both channels (if present).
-
getBackgroundChannelA
public ExpressionDataDoubleMatrix getBackgroundChannelA()
-
getBackgroundChannelB
public ExpressionDataDoubleMatrix getBackgroundChannelB()
-
getBioAssayDimensions
public List<BioAssayDimension> getBioAssayDimensions()
- Returns:
- a single BioAssayDimension except if there are multiple array designs used in the experiment.
-
getBkgSubChannelA
public ExpressionDataDoubleMatrix getBkgSubChannelA()
-
getExpressionExperiment
public ExpressionExperiment getExpressionExperiment()
-
getIntensity
public ExpressionDataDoubleMatrix getIntensity()
- Returns:
- Compute an intensity matrix. For two-channel arrays, this is the geometric mean of the background-subtracted signals on the two channels. For two-color arrays, if one channel is missing (as happens sometimes) the intensities returned are just from the one channel. For one-color arrays, this is the same as the preferred data matrix.
-
getMissingValueData
public ExpressionDataBooleanMatrix getMissingValueData()
- Returns:
- a matrix of booleans, or null if a missing value quantitation type ("absent/present", which may have been computed by our system) is not found. This will return the values whether the array design is two-color or not.
-
getNumMissingValues
public Integer getNumMissingValues(QuantitationType qt)
-
getPreferredData
public ExpressionDataDoubleMatrix getPreferredData()
- Returns:
- The matrix for the preferred data - NOT the processed data (though they may be the same, in fact)
-
getPreferredQTypes
public List<QuantitationType> getPreferredQTypes()
-
getProcessedData
public ExpressionDataDoubleMatrix getProcessedData()
-
getRanksByMean
public Map<CompositeSequence,Double> getRanksByMean()
-
getSignalChannelA
public ExpressionDataDoubleMatrix getSignalChannelA()
-
getSignalChannelB
public ExpressionDataDoubleMatrix getSignalChannelB()
-
isAnyMissing
public boolean isAnyMissing()
-
-