Enum IntensityTransform

java.lang.Object
java.lang.Enum<IntensityTransform>
net.sf.basedb.core.IntensityTransform
All Implemented Interfaces:
Serializable, Comparable<IntensityTransform>, java.lang.constant.Constable

public enum IntensityTransform
extends Enum<IntensityTransform>
Gives information in what way spot intensities has been transformed before they were stored in the database.
Version:
2.12
Author:
Nicklas
  • Enum Constant Details

    • NONE

      public static final IntensityTransform NONE
      No transformation has been applied to the spot intensities.
    • LOG2

      public static final IntensityTransform LOG2
      Spot intensities are stored as base-2 logged values
    • LOG10

      public static final IntensityTransform LOG10
      Spot intensities are stored as base-10 logged values
  • Field Details

    • valueMapping

      private static final Map<Integer,​IntensityTransform> valueMapping
      Maps an integer to a transform.
    • LN2

      private static final double LN2
    • value

      private final int value
      The integer value of this transform.
    • displayValue

      private final String displayValue
      Returned by the toString method.
    • isTransformed

      private final boolean isTransformed
      If the intensities are transformed or not.
    • averageMethod

      private final Formula.AverageMethod averageMethod
  • Constructor Details

    • IntensityTransform

      private IntensityTransform​(int value, String displayValue, boolean isTransformed, Formula.AverageMethod averageMethod)
      Creates a new intensity transform. Used internal only.
      Parameters:
      value - The integer value of this location.
  • Method Details

    • values

      public static IntensityTransform[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static IntensityTransform valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<IntensityTransform>
    • fromValue

      public static IntensityTransform fromValue​(int value)
      Get the SpotDataTransform object when you know the integer code.
      Parameters:
      value - The integer value.
      Returns:
      The transform for the integer value.
    • getValue

      public int getValue()
      Get the integer value that is used when storing a transform in the database.
      Returns:
      The integer value for this transform
    • isTransformed

      public boolean isTransformed()
      Does this intensity transformation represents a transformation that has modified the spot intensity values or not?
      Returns:
      TRUE if the intensity values are transformed, FALSE if they are not
    • getAverageMethod

      public Formula.AverageMethod getAverageMethod()
      Get the averaging method to use when averaging values that has been transformed with the specified transformation.
      Returns:
      An average method
    • unTransform

      public abstract Expression unTransform​(Expression transformed)
      Un-transform an expression representing a transformed intensity value so that it represents a raw intensity value. This method may return the same expression if no transformation is needed.
      Parameters:
      transformed - The transformed expression
    • unTransform

      public abstract double unTransform​(double transformed)
      Un-transform a transformed intensity value back to a regular intensity value.
      Parameters:
      transformed - The transformed value
    • transform

      public abstract Expression transform​(Expression e)
      Transform an expression representing a "normal" intensity value so that it represents the transformed intensity value. This method may return the same expression if no transformation is needed.
      Parameters:
      e - The regular expression
      Since:
      3.2.4
    • transform

      public abstract double transform​(double value)
      Transform a "normal" intensity value to the transformed value.
      Parameters:
      value - The regular value
      Since:
      3.2.4
    • getMACalculator

      public abstract MACalculator getMACalculator()
      Get a MA calculator implementation that is suitable for calculating MA-values for the given source data type.
      Since:
      3.2.4