Class MACalculator

java.lang.Object
net.sf.basedb.util.ma.MACalculator
Direct Known Subclasses:
Log10MACalculator, Log2MACalculator

public class MACalculator extends Object
Calculates M and A values for 2-channel data. For "normal" intensity values M and A are defined as follows: M = log2(ch1/ch2) A = log10(ch*ch2)/2 Channel intensity corrections are used to calculate new values for channel 1 and 2. For corrections that use M+A values the corrections are usually calculated in log2-space and the resulting equations are: log2(newCh1) = log2(oldCh1) - factor log2(newCh2) = log2(oldCh2) + factor Source data that has been transformed (eg. log2-transformed) must use different equations to get the correct results.
Since:
3.2.4
Author:
nicklas
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final double
     
    (package private) static final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    correct(double ch1, double ch2, double factor)
    Apply a correction factor to the ch1 and ch2 intensity values.
    double[]
    MA(double ch1, double ch2)
    Calculate the M and A values from the ch1 and ch2 intensity values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INV_LN2

      static final double INV_LN2
    • INV_LN10x2

      static final double INV_LN10x2
  • Constructor Details

    • MACalculator

      public MACalculator()
  • Method Details

    • MA

      public double[] MA(double ch1, double ch2)
      Calculate the M and A values from the ch1 and ch2 intensity values. See class description for information about the definitions of M and A.
      Returns:
      An array with [0] = M, [1] = A
    • correct

      public double[] correct(double ch1, double ch2, double factor)
      Apply a correction factor to the ch1 and ch2 intensity values.
      Returns:
      An array with [0] = newCh1, [1] = newCh2