Class LinearModelAnalyzer
java.lang.Object
ubic.gemma.core.analysis.expression.diff.LinearModelAnalyzer
- All Implemented Interfaces:
DiffExAnalyzer
@Component
@ParametersAreNonnullByDefault
public class LinearModelAnalyzer
extends Object
implements DiffExAnalyzer
Handles fitting linear models with continuous or fixed-level covariates. Data are always log-transformed.
Interactions can be included if a DifferentialExpressionAnalysisConfig is passed as an argument to 'run'. Currently we only support interactions if there are two factors in the model (no more).
One factor can be constant (the same value for all samples); such a factor will be analyzed by looking at the intercept in the fitted model. This is only appropriate for 'non-reference' designs on ratiometric arrays.
This also supports subsetting the data based on a factor. For example, a data set with "tissue" as a factor could be analyzed per-tissue rather than with tissue as a covariate.
This only handles the analysis, not the persistence or output of the results.
- Author:
- paul
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrun(ExpressionExperiment ee, Map<FactorValue, ExpressionExperimentSubSet> subsets, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config) Analyze a dataset with a pre-existing subset structure.run(ExpressionExperiment expressionExperiment, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config) I apologize for this being so complicated.run(ExpressionExperimentSubSet subset, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config) Check if a factor value should be excluded from the analysis.
-
Constructor Details
-
LinearModelAnalyzer
public LinearModelAnalyzer()
-
-
Method Details
-
run
public Collection<DifferentialExpressionAnalysis> run(ExpressionExperiment expressionExperiment, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config) throws AnalysisException I apologize for this being so complicated. Basically there are four phases:- Get the data matrix and factors
- Determine baseline groups; build model and contrasts
- Run the analysis
- Postprocess the analysis
- Specified by:
runin interfaceDiffExAnalyzer- Parameters:
expressionExperiment- experiment to analyzedmatrix- D matrixconfig- config- Returns:
- analyses. There will be more than one if a subset factor is defined.
- Throws:
AnalysisException
-
run
public Collection<DifferentialExpressionAnalysis> run(ExpressionExperiment ee, Map<FactorValue, ExpressionExperimentSubSet> subsets, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config) throws AnalysisException Description copied from interface:DiffExAnalyzerAnalyze a dataset with a pre-existing subset structure.A subset must be defined in the configuration.
- Specified by:
runin interfaceDiffExAnalyzer- Throws:
AnalysisException
-
run
@Nullable public DifferentialExpressionAnalysis run(ExpressionExperimentSubSet subset, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config) throws AnalysisException Check if a factor value should be excluded from the analysis.- Specified by:
runin interfaceDiffExAnalyzer- Parameters:
subset- subsetconfig- config- Returns:
- analysis
- Throws:
AnalysisException
-