Package net.sf.basedb.core
Enum Class IntensityTransform
- All Implemented Interfaces:
Serializable
,Comparable<IntensityTransform>
,Constable
Gives information in what way spot intensities has been transformed
before they were stored in the database.
- Version:
- 2.12
- Author:
- Nicklas
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Formula.AverageMethod
private final String
Returned by the toString method.private final boolean
If the intensities are transformed or not.private static final double
private final int
The integer value of this transform.private static final Map<Integer,
IntensityTransform> Maps an integer to a transform. -
Constructor Summary
ModifierConstructorDescriptionprivate
IntensityTransform
(int value, String displayValue, boolean isTransformed, Formula.AverageMethod averageMethod) Creates a new intensity transform. -
Method Summary
Modifier and TypeMethodDescriptionstatic IntensityTransform
fromValue
(int value) Get theSpotDataTransform
object when you know the integer code.Get the averaging method to use when averaging values that has been transformed with the specified transformation.abstract MACalculator
Get a MA calculator implementation that is suitable for calculating MA-values for the given source data type.int
getValue()
Get the integer value that is used when storing a transform in the database.boolean
Does this intensity transformation represents a transformation that has modified the spot intensity values or not?toString()
abstract double
transform
(double value) Transform a "normal" intensity value to the transformed value.abstract Expression
Transform an expression representing a "normal" intensity value so that it represents the transformed intensity value.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
Returns the enum constant of this class with the specified name.static IntensityTransform[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No transformation has been applied to the spot intensities. -
LOG2
Spot intensities are stored as base-2 logged values -
LOG10
Spot intensities are stored as base-10 logged values
-
-
Field Details
-
valueMapping
Maps an integer to a transform. -
LN2
private static final double LN2 -
value
private final int valueThe integer value of this transform. -
displayValue
Returned by the toString method. -
isTransformed
private final boolean isTransformedIf the intensities are transformed or not. -
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
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<IntensityTransform>
-
fromValue
Get theSpotDataTransform
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
Get the averaging method to use when averaging values that has been transformed with the specified transformation.- Returns:
- An average method
-
unTransform
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
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
Get a MA calculator implementation that is suitable for calculating MA-values for the given source data type.- Since:
- 3.2.4
-