baseline {FTICRMS} | R Documentation |
Computes an estimated baseline curve for a spectrum by a method of Rocke and Xi.
baseline(spect, sm.fac = 10^15, neg.pen = sqrt(pi/2), max.iter = 30, frac.changed = 0.001, binsize = 64, xvals = 1:length(spect))
spect |
vector containing the intensities of the spectrum |
sm.fac |
smoothing factor |
neg.pen |
negativity penalty |
max.iter |
maximum number of iterations before giving up |
frac.changed |
maximal fraction of indicators that can switch for convergence |
binsize |
bin size used to estimate noise variance |
xvals |
vector containing the mass locations of the spectrum; currently not used in the algorithm |
The algorithm works by maximizing the objective function
F({b[i]}) = sum_{i=1}^{n}b[i] - A[1] sum_{i=2}^{n-1}(b[i-1]-2b[i]+b[i+1])^2 - A[2] sum_{i=1}^n[max{b[i]-y[i],0}]^2
The value of xvals
is currently irrelevant; future implementations may use it.
Experimentally, the smoothing factor sm.fac
should be as large as possible without giving
obviously incorrect results.
The default value of neg.pen
is calculated under the assumption of iid N(0,1) noise.
The default value of frac.changed
is the smallest one for which the algorithm reliably terminates
before max.iter
iterations are reached for any reasonable value of max.iter
.
A list containing the following items:
baseline |
The computed baseline |
noise |
The estimated noise standard deviation |
iter |
The number of iterations for convergence |
changed |
Numeric vector of length iter containing the number of indicator variables that switched value on each iteration |
The algorithm used was developed by Yuanxin Xi and David Rocke (unpublished). This program is based on a Matlab program by Yuanxin Xi.
Don Barkauskas (barkda@wald.ucdavis.edu)
Barkauskas, D.A. et al. (2008) “Detecting glycan cancer biomarkers in serum samples using MALDI FT-ICR mass spectrometry data”. Submitted to Bioinformatics
Xi, Y. and Rocke, D.M. (2006) “Baseline Correction for NMR Spectroscopic Metabolomics Data Analysis”, unpublished.