2.17.2: 2011-06-17

net.sf.basedb.core
Enum IntensityTransform

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

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 Summary
LOG10
          Spot intensities are stored as base-10 logged values
LOG2
          Spot intensities are stored as base-2 logged values
NONE
          No transformation has been applied to the spot intensities.
 
Field Summary
private  Formula.AverageMethod averageMethod
           
private  String displayValue
          Returned by the toString method.
private  boolean isTransformed
          If the intensities are transformed or not.
private  int value
          The integer value of this transform.
private static Map<Integer,IntensityTransform> valueMapping
          Maps an integer to a transform.
 
Method Summary
static IntensityTransform fromValue(int value)
          Get the SpotDataTransform object when you know the integer code.
 Formula.AverageMethod getAverageMethod()
          Get the averaging method to use when averaging values that has been transformed with the specified transformation.
 int getValue()
          Get the integer value that is used when storing a transform in the database.
 boolean isTransformed()
          Does this intensity transformation represents a transformation that has modified the spot intensity values or not?
 String toString()
           
abstract  double unTransform(double transformed)
          Un-transform a transformed intensity value back to a regular intensity value.
abstract  Expression unTransform(Expression transformed)
          Un-transform an expression representing a transformed intensity value so that it represents a raw intensity value.
static IntensityTransform valueOf(String name)
          Returns the enum constant of this type with the specified name.
static IntensityTransform[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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 Detail

valueMapping

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


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
Method Detail

values

public static IntensityTransform[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IntensityTransform c : IntensityTransform.values())
    System.out.println(c);

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

2.17.2: 2011-06-17