run.strong.peaks: Locate Peaks that are "Large" in All Samples

Description Usage Arguments Details Value Note Author(s) References See Also

Description

Takes the file generated by run.peaks, extracts all peaks that are “large” in all samples, and writes the results to a file.

Usage

1
2
3
4
5
run.strong.peaks(cor.thresh = 0.8, isotope.dist = 7, pre.align = FALSE,
                 align.method = c("PL", "spline", "affine", "none"),
                 align.fcn = NA, root.dir = ".", lrg.dir, 
                 lrg.file = "lrg_peaks.RData", overwrite = FALSE, 
                 use.par.file = FALSE, par.file = "parameters.RData")

Arguments

cor.thresh

threshold correlation for declaring isotopes

isotope.dist

maximum distance for declaring isotopes

pre.align

either FALSE, or a numeric vector of shifts to apply to spectra, or a three-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

root.dir

directory for parameters file and raw data

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

Details

Reads in information from file created by run.lrg.peaks, locates peaks which appear in all samples, and overwrites the file lrg.file in lrg.dir. The resulting file contains variables

amps data frame of amplitudes of non-isotope peaks that occur in all samples
centers data frame of centers of non-isotope peaks that occur in all samples
lrg.peaks the data frame of significant peaks created by run.lrg.peaks

and is ready to be used by run.cluster.matrix.

Value

No value returned; the file is simply created.

Note

If use.par.file == TRUE and other parameters are entered into the function call, then the parameters entered in the function call overwrite those read in from the file. Note that this is opposite from the behavior for FTICRMS versions 0.7 and earlier.

If align.fcn is not NA, then it should consist of a list with components fcn and inv, each of class function. align.fcn$fcn should take a vector of masses as its argument and return a vector of transformed masses. (Typically, this will be transforming to the frequency domain; see Zhang (2005).) align.fcn$inv should be the inverse function of align.fcn$fcn. If align.method == "leastsq", it is strongly recommended that you supply a value for align.fcn that makes the masses (approximately) equally-spaced.

align.method can be abbreviated. If align.method == "spline", then alignment consists of making the transformed masses of the strong peaks all agree exactly with their means, then shifting the rest of the transformed masses via a cubic interpolation spline generated using interpSpline. If align.method == "PL", then the same is done but interpolation is piecewise linear between the strong peaks. If align.method == "leastsq", then the transformed masses of the strong peaks are aligned to their means using a least-squares affine fit for each spectrum. In any of these cases, if there are no strong peaks, align.method is changed to "none" with a warning. If there is exactly one strong peak, then alignment is by a simple shift in each spectrum on the transformed masses. If there are exactly two strong peaks, then the alignment is by a simple affine transformation on the transformed masses in each spectrum. If align.method == "spline" and there are exactly three strong peaks, then alignment is piecewise affine on the transformed masses (i.e., identical to using align.method = "PL").

pre.align = FALSE is used if the spectra have already been aligned by the mass spectroscopists. If it is not FALSE, it can either be a vector of additive shifts to be applied to the spectra, or a list with components targets, actual, and align.method. In the last case, targets is a vector of target masses, and actual is a matrix with length(targets) columns and a row for each spectrum, actual[i,j] being the mass in spectrum i that should be matched exactly to target[j], with NA being a valid entry in actual. The alignment is then done row-by-row as in the description in the above paragraph, depending on the number of non-missing values in row i).

Author(s)

Don Barkauskas (barkda@wald.ucdavis.edu)

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.cluster.matrix, interpSpline


FTICRMS documentation built on May 1, 2019, 10:53 p.m.