Class QuantitationTypeUtils
QuantitationTypes.- Author:
- poirigui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAppend a suffix to aQuantitationTypedescription.static doublegetDefaultCountValueAsDouble(QuantitationType quantitationType) Obtain the value that indicates a missing value for counting data.static floatgetDefaultCountValueAsFloat(QuantitationType quantitationType) Obtain the value that indicates a missing value for counting data.static ObjectgetDefaultValue(QuantitationType quantitationType) Obtain the default to use for a given quantitation type.static doublestatic NumbergetDefaultValueAsNumber(QuantitationType quantitationType) static StringgetUnit(QuantitationType quantitationType) static booleanCheck if a given quantitation type contains counting data.static booleanCheck if a given quantitation type holds log2 CPM.static booleanCheck if a given QT holds log-transformed data.static QuantitationTypemergeQuantitationTypes(Collection<QuantitationType> quantitationTypes) Merge a given collection of quantitation types.
-
Constructor Details
-
QuantitationTypeUtils
public QuantitationTypeUtils()
-
-
Method Details
-
isLog2cpm
Check if a given quantitation type holds log2 CPM. -
isLogTransformed
Check if a given QT holds log-transformed data. -
isCount
Check if a given quantitation type contains counting data.Note that counting data might not necessarily use the
ScaleType.COUNTscale. -
getDefaultValue
Obtain the default to use for a given quantitation type.This can be used as a placeholder for missing values in data vectors.
Missing double and float values are represented as NaNs unless they are counts in which case they are represented as zeroes.
For counting data represented as double or float, the default value is transformed as per
getDefaultCountValueAsDouble(QuantitationType)andgetDefaultCountValueAsFloat(QuantitationType). -
getDefaultValueAsNumber
-
getDefaultValueAsDouble
-
getDefaultCountValueAsDouble
Obtain the value that indicates a missing value for counting data.The default count is zero, but if the data is on a log-scale, it will be mapped to
Double.NEGATIVE_INFINITY. -
getDefaultCountValueAsFloat
Obtain the value that indicates a missing value for counting data. -
mergeQuantitationTypes
public static QuantitationType mergeQuantitationTypes(Collection<QuantitationType> quantitationTypes) Merge a given collection of quantitation types.All QTs must share the same general type, type, scale, representation and ratio status.
The
QuantitationType.getIsRecomputedFromRawData()status is kept if all QTs are recomputed from raw data,It is not possible to merge QTs that were either normalized or batch-corrected.
- Throws:
IllegalArgumentException- if the QTs are incompatible or if less than two QTs are provided.
-
appendToDescription
Append a suffix to aQuantitationTypedescription.This is used to describe the conversion that was performed.
-
getUnit
- Returns:
- a unit, or null if the QT is unitless (e.g. ratio)
-