calibrate.electrophoresis: Electrophoresis calibrations

calibrate.electrophoresisR Documentation

Electrophoresis calibrations

Description

Estimate the derived values from raw electrophoresis data.

Usage

calculate.length(
  electrophoresis,
  method = union(c("hyman", "interpolation", "loglinear"),
    eval(formals(splinefun)$method)),
  extrapolate = FALSE
)

calculate.concentration(electrophoresis, ladder.concentrations = NULL)

calculate.molarity(electrophoresis)

Arguments

electrophoresis

An electrophoresis object.

method

The method used to fit the mobility model of molecule length vs. migration distance, either "interpolation" (linear interpolation via approxfun), "loglinear" (log-linear regression via lm with the model relative.distance ~ log(length)), or one of the methods of splinefun (monotone methods recommended). Can be abbreviated.

ladder.concentrations

The true concentrations of the ladder peaks. If provided (from the Bioanalyzer), the concentration coefficient is fit according to the non-marker ladder peaks and then adjusted for each sample according to the relative fluorescence area of its markers compared with the ladder. If NULL (TapeStation), concentrations are fit according to only the upper marker if present or the lower marker otherwise; these marker concentrations are assumed to be correct.

Details

Ladder peaks of known length and possibly concentration are used to fit mobility models and coefficients of fluorescence area vs. concentration. If there are multiple ladders (e.g. one per ScreenTape), each sample is fit according to its corresponding ladder. Derived values are estimated for every row in electrophoresis$data, though they are NA outside the range of interpolation from the ladder.

Spline fitting seems to perform reasonably well on all data, and among R's built-in methods Hyman filtering of the FMM spline (method = "hyman") is preferred to ensure monotonicity. Agilent appears to use linear interpolation with DNA data and log-linear regression on RNA data, so you could choose those options if you want to reproduce the results of the software more precisely. However, linear interpolation creates sudden spikes in the derivative that make the concentration and molarity estimates unstable; spline fitting is basically a smoother version of that. Log-linear regression is the standard theoretical approach but does not actually fit the data very well; more sophisticated parametric models may be added in the future.

Value

The same electrophoresis object with the new estimated variable added to its $data member. calculate.length also adds estimated length boundaries to the $peaks member and aligned-time or relative-distance boundaries to $regions.


jwfoley/bioanalyzeR documentation built on Aug. 1, 2023, 4:46 a.m.