This function tries to estimate the stutter ratio, either in terms of peak heigth ratios or peak surface ratio.
stutterabif(abifdata, chanel, poswild, datapointbefore = 70,
datapointafter = 20, datapointsigma = 3.5,
chanel.names = c(1:4, 105), DATA = paste("DATA", chanel.names[chanel], sep = "."),
maxrfu = 1000, method = "monoH.FC", pms = 6, fig = FALSE)
the result returned by read.abif
the dye number
the position in datapoint units of the allele at
the origin of the stutter product, typically obtained after a call to peakabif
how many datapoints before poswild
to be include in analysis
how many datapoints after poswild
to be include in analysis
initial guess for the standard deviation of a peak
numbers extensions used for the DATA
names of the DATA components
argument passed to baselineabif
method to be used by splinefun
how many standard deviations (after gaussian fit) before and after the mean peak values should be considered for spline function interpolation
should a summary plot be produced?
A list with the following components:
Stutter ratio computed as the height of the stutter divided by the height of its corresponding allele
Stutter ratio computed as the surface of the stutter divided by the surface of its corresponding allele
The height of the stutter with baseline at 0
The height of the allele with baseline at 0
The surface of the stutter
The surface of the allele
A list of additional parameter that could be usesfull, see example
FIXME, See R code for now
JLO
for a dataset example,
peakabif
to get an estimate of peak location.
# NOT RUN {
#
# Load pre-defined dataset, same as what would be obtained with read.abif:
#
data(JLO)
#
# Get peak locations in the blue channel:
#
maxis <- peakabif(JLO, 1, npeak = 6, tmin = 3, fig = FALSE)$maxis
#
# Compute stutter ratio for first peak and ask for a figure:
#
tmp <- stutterabif(JLO, 1, maxis[1], fig = TRUE)
#
# Show in addition the normal approximation used at the stutter peak:
#
xx <- seq(tmp$p$mu1 - 6*tmp$p$sd1, tmp$p$mu1 + 6*tmp$p$sd1, le = 100)
lines(xx, tmp$p$p1*dnorm(xx, tmp$p$mu1, tmp$p$sd1), col = "darkgreen")
#
# Show in addition the normal approximation used at allele peak:
#
xx <- seq(tmp$p$mu2 - 6*tmp$p$sd2, tmp$p$mu2 + 6*tmp$p$sd2, le = 100)
lines(xx, tmp$p$p2*dnorm(xx, tmp$p$mu2, tmp$p$sd2), col = "darkgreen")
# }
Run the code above in your browser using DataLab