Package net.sf.basedb.core
Enum 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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description private Formula.AverageMethod
averageMethod
private String
displayValue
Returned by the toString method.private boolean
isTransformed
If the intensities are transformed or not.private static double
LN2
private int
value
The integer value of this transform.private static Map<Integer,IntensityTransform>
valueMapping
Maps an integer to a transform. -
Constructor Summary
Constructors Modifier Constructor Description private
IntensityTransform(int value, String displayValue, boolean isTransformed, Formula.AverageMethod averageMethod)
Creates a new intensity transform. -
Method Summary
Modifier and Type Method Description static IntensityTransform
fromValue(int value)
Get theSpotDataTransform
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.abstract MACalculator
getMACalculator()
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
isTransformed()
Does this intensity transformation represents a transformation that has modified the spot intensity values or not?String
toString()
abstract double
transform(double value)
Transform a "normal" intensity value to the transformed value.abstract Expression
transform(Expression e)
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
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.
-
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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 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
-