Class BaselineSelection
java.lang.Object
ubic.gemma.core.analysis.expression.diff.BaselineSelection
Utilities for deciding if a factor value is a baseline condition.
- Author:
- paul
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Map
<ExperimentalFactor, FactorValue> getBaselineConditions
(List<BioMaterial> samplesUsed, List<ExperimentalFactor> factors) static Map
<ExperimentalFactor, FactorValue> getBaselineLevels
(Collection<ExperimentalFactor> factors) Identify the FactorValue that should be treated as 'Baseline' for each of the given factors.static Map
<ExperimentalFactor, FactorValue> getBaselineLevels
(Collection<ExperimentalFactor> factors, List<BioMaterial> samplesUsed) Identify the FactorValue that should be treated as 'Baseline' for each of the given factors.static boolean
Check if a given characteristic indicate a baseline condition.static boolean
isBaselineCondition
(FactorValue factorValue) Check if a given factor value indicates a baseline condition.static boolean
Check if a given statement indicates a baseline condition.static boolean
Check if this factor value is the baseline, overriding other possible baselines.
-
Constructor Details
-
BaselineSelection
public BaselineSelection()
-
-
Method Details
-
isBaselineCondition
Check if a given factor value indicates a baseline condition. -
isBaselineCondition
Check if a given statement indicates a baseline condition. -
isBaselineCondition
Check if a given characteristic indicate a baseline condition. -
isForcedBaseline
Check if this factor value is the baseline, overriding other possible baselines.A baseline can be *forced* in two ways: either by setting
FactorValue.setIsBaseline(Boolean)
to true or by adding a characteristic with theFORCED_BASELINE_VALUE_URI
URI. In practice, this is not much different fromisBaselineCondition(Statement)
, but there might be cases where you would want to indicate that the baseline was explicitly forced. -
getBaselineLevels
public static Map<ExperimentalFactor,FactorValue> getBaselineLevels(Collection<ExperimentalFactor> factors, @Nullable List<BioMaterial> samplesUsed) Identify the FactorValue that should be treated as 'Baseline' for each of the given factors. This is done heuristically, and if all else fails we choose arbitrarily. For continuous factors, the minimum value is treated as baseline.- Parameters:
factors
- factorssamplesUsed
- These are used to make sure we don't bother using factor values as baselines if they are not used by any of the samples. This is important for subsets. If null, this is ignored.- Returns:
- map of factors to the baseline factorvalue for that factor.
-
getBaselineLevels
public static Map<ExperimentalFactor,FactorValue> getBaselineLevels(Collection<ExperimentalFactor> factors) Identify the FactorValue that should be treated as 'Baseline' for each of the given factors. This is done heuristically, and if all else fails we choose arbitrarily.- Parameters:
factors
- factors- Returns:
- map
-
getBaselineConditions
public static Map<ExperimentalFactor,FactorValue> getBaselineConditions(List<BioMaterial> samplesUsed, List<ExperimentalFactor> factors)
-