Class BaselineSelection

java.lang.Object
ubic.gemma.core.analysis.expression.diff.BaselineSelection

public class BaselineSelection extends Object
Utilities for deciding if a factor value is a baseline condition.
Author:
paul
  • Constructor Details

    • BaselineSelection

      public BaselineSelection()
  • Method Details

    • isBaselineCondition

      public static boolean isBaselineCondition(FactorValue factorValue)
      Check if a given factor value indicates a baseline condition.
    • isBaselineCondition

      public static boolean isBaselineCondition(Statement c)
      Check if a given statement indicates a baseline condition.
    • isBaselineCondition

      public static boolean isBaselineCondition(Characteristic c)
      Check if a given characteristic indicate a baseline condition.
    • isForcedBaseline

      public static boolean isForcedBaseline(FactorValue fv)
      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 the FORCED_BASELINE_VALUE_URI URI. In practice, this is not much different from isBaselineCondition(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 - factors
      samplesUsed - 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)