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 Constructor Description LinearModelAnalyzer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<DifferentialExpressionAnalysis>
run(ExpressionExperiment ee, Map<FactorValue,ExpressionExperimentSubSet> subsets, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config)
Analyze a dataset with a pre-existing subset structure.Collection<DifferentialExpressionAnalysis>
run(ExpressionExperiment expressionExperiment, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config)
I apologize for this being so complicated.DifferentialExpressionAnalysis
run(ExpressionExperimentSubSet subset, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config)
Analyze a subset.
-
-
-
Method Detail
-
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:
run
in 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:DiffExAnalyzer
Analyze a dataset with a pre-existing subset structure.A subset must be defined in the configuration.
- Specified by:
run
in interfaceDiffExAnalyzer
- Throws:
AnalysisException
-
run
public DifferentialExpressionAnalysis run(ExpressionExperimentSubSet subset, ExpressionDataDoubleMatrix dmatrix, DifferentialExpressionAnalysisConfig config) throws AnalysisException
Description copied from interface:DiffExAnalyzer
Analyze a subset.Note that normally when we run a subset analysis, the subsetting is done internally, so we pass in the expression experiment, not the subset. This method is used for exceptions to that.
- Specified by:
run
in interfaceDiffExAnalyzer
- Parameters:
subset
- subsetconfig
- config- Returns:
- analysis
- Throws:
AnalysisException
-
-