run.baselines {FTICRMS} | R Documentation |
Takes the spectra from files in raw.dir
, calculates the baselines from them,
and writes the results in the directory base.dir
.
run.baselines(root.dir = ".", raw.dir, base.dir, overwrite = FALSE, use.par.file = FALSE, par.file = "parameters.RData", sm.par = 1e-11, sm.ord = 2, max.iter = 40, tol = 5e-8, sm.div = NA, sm.norm.by = c("baseline", "overestimate", "constant"), neg.div = NA, neg.norm.by = c("baseline", "overestimate", "constant"), rel.conv.crit = TRUE, zero.rm = TRUE, halve.search = FALSE)
root.dir |
directory for parameters file and raw data |
raw.dir |
directory for raw data files; default is paste(root.dir, "/Raw_Data", sep = "") |
base.dir |
directory for baseline files; default is paste(root.dir, "/Baselines", sep = "") |
overwrite |
whether to replace exisiting files with new ones |
use.par.file |
logical; if TRUE , then parameters are read from par.file in directory root.dir |
par.file |
string containing name of parameters file |
sm.par |
smoothing parameter for baseline calculation |
sm.ord |
order of derivative to kill in baseline analysis |
max.iter |
convergence criterion in baseline calculation |
tol |
convergence criterion; see below |
sm.div |
smoothness divisor in baseline calculation |
sm.norm.by |
method for smoothness penalty in baseline analysis |
neg.div |
negativity divisor in baseline calculation |
neg.norm.by |
method for negativity penalty in baseline analysis |
rel.conv.crit |
logical; whether convergence criterion should be relatiev to current baseline estimate |
zero.rm |
logical; whether to replace zeros with average of surrounding values |
halve.search |
logical; whether to use a halving-line search if step leads to smaller value of function |
Goes through the entire directory raw.dir
file-by-file and computes each
baseline using baseline
, then writes the spectrum and the baseline to a file
in directory base.dir
. The name of the new file is the same as the name of the old
file with “.txt” replaced by “.RData”, and the new file is ready to be used
by run.peaks
.
See baseline
for descriptions of all the parameters after par.file
.
No value returned; the files are simply created.
If use.par.file = TRUE
, then the parameters read in from the file overwrite any arguments entered in the
function call.
Don Barkauskas (barkda@wald.ucdavis.edu)
Barkauskas, D.A. (2009) “Statistical Analysis of Matrix-Assisted Laser Desorption/Ionization Fourier Transform Ion Cyclotron Resonance Mass Spectrometry Data with Applications to Cancer Biomarker Detection”. Ph.D. dissertation, University of California at Davis.
Barkauskas, D.A. et al. (2009) “Detecting glycan cancer biomarkers in serum samples using MALDI FT-ICR mass spectrometry data”. Bioinformatics, 25:2, 251–257.
Xi, Y. and Rocke, D.M. (2008) “Baseline Correction for NMR Spectroscopic Metabolomics Data Analysis”. BMC Bioinformatics, 9:324.