Learn R Programming

FTICRMS (version 0.8)

run.cluster.matrix: Identify Equivalent Peaks from Different Subjects

Description

Takes the file generated by run.lrg.peaks, identifies equivalent peaks in each spectrum, and fills in missing values.

Usage

run.cluster.matrix(pre.align = FALSE, align.method = c("PL", "spline", "affine", "none"), align.fcn = NA, trans.method = c("shiftedlog", "glog", "none"), add.par = 0, subtract.base = FALSE, lrg.only = TRUE, calc.all.peaks = FALSE, masses = NA, isotope.dist = 7, cluster.method = c("ppm", "constant", "usewidth"), cluster.constant = 10, num.pts = 5, R2.thresh = 0.98, oneside.min = 1, min.spect = 1, peak.method = c("parabola", "locmaxes"), bhbysubj = TRUE, covariates, root.dir = ".", base.dir, peak.dir, lrg.dir, lrg.file = "lrg_peaks.RData", overwrite = FALSE, use.par.file = FALSE, par.file = "parameters.RData")

Arguments

pre.align
either FALSE, or a numeric vector of shifts to apply to spectra, or a four-component list (of the form described in the Note section below) to be used before identifying peaks from different spectra
align.method
alignment algorithm for peaks
align.fcn
function (and inverse) to apply to masses before (and after) applying align.method; see below
trans.method
type of transformation to use on spectra before statistical analysis
add.par
additive parameter for "shiftedlog" or "glog" options for trans.method
subtract.base
logical; whether to subtract calculated baseline from spectrum
lrg.only
logical; whether to consider only peaks that have at least one “large” peak; i.e., identified by run.lrg.peaks
calc.all.peaks
logical; whether to calculate all possible peaks or only sufficiently large ones
masses
specific masses to test
isotope.dist
maximum distance for declaring isotopes
cluster.method
method for determining when two peaks from different spectra are the same
cluster.constant
parameter used in running cluster.method
num.pts
number of consecutive points needed for peak fitting
R2.thresh
$R^2$ value needed for peak fitting
oneside.min
minimum number of points on each side of local maximum for peak fitting
min.spect
minimum number of spectra necessary for peak to be used in run.analysis
peak.method
method for locating peaks
bhbysubj
logical; whether to look for number of large peaks by subject (i.e., combining replicates) or by spectrum
covariates
data frame with rownames given by raw data files with extensions (e.g., “.txt”) stripped; only needed if bhbysubj == TRUE
root.dir
directory for parameters file and raw data
base.dir
directory for baseline files; default is paste(root.dir, "/Baselines", sep = "")
peak.dir
directory for peak location files; default is paste(root.dir, "/All_Peaks", sep = "")
lrg.dir
directory for large peaks file; default is paste(root.dir, "/Large_Peaks", sep = "")
lrg.file
name of file to store large peaks in
overwrite
logical; whether to replace existing 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

Value

No value returned; the file is simply created.

Details

Reads in information from file created by run.strong.peaks, calculates the cluster matrix, fills in missing values, and overwrites the file named lrg.file in lrg.dir. The resulting file contains variables
amps
data frame of amplitudes created by run.strong.peaks
centers
data frame of centers created by run.strong.peaks
clust.mat
data frame with columns given by samples and rows given by the distinct peaks in the samples
lrg.mat
data frame of same size as clust.mat with entries given by TRUE if the peak was large in that spectrum and FALSE otherwise
lrg.peaks
the data frame of significant peaks created by run.lrg.peaks
num.lrg
number of subjects (or spectra if bhbysubj == TRUE) with a large peak at the corresponding mass
and is ready to be used by run.analysis.

References

Barkauskas, D.A. and D.M. Rocke. (2009a) “A general-purpose baseline estimation algorithm for spectroscopic data”. to appear in Analytica Chimica Acta. doi:10.1016/j.aca.2009.10.043

Barkauskas, D.A. et al. (2009b) “Analysis of MALDI FT-ICR mass spectrometry data: A time series approach”. Analytica Chimica Acta, 648:2, 207--214.

Barkauskas, D.A. et al. (2009c) “Detecting glycan cancer biomarkers in serum samples using MALDI FT-ICR mass spectrometry data”. Bioinformatics, 25:2, 251--257.

Zhang, L.-K. et al. (2005) “Accurate mass measurements by Fourier transform mass spectrometry”. Mass Spectrom Rev, 24:2, 286--309.

See Also

run.lrg.peaks, run.strong.peaks, interpSpline