run.analysis {FTICRMS}R Documentation

Test for Significant Peaks in FT-ICR MS by Controlling FDR

Description

Takes the file generated by run.cluster.matrix and tests the peaks using Benjamini-Hochberg to control the False Discovery Rate.

Usage

run.analysis(form, covariates, FDR = 0.1, normalization = "common",
             add.norm = TRUE, repl.method = max, use.t.test = FALSE,
             pval.fcn = "default", lrg.only = TRUE, masses = NULL,
             isotope.dist = 7, root.dir = ".", lrg.dir,
             lrg.file = lrg_peaks.RData, res.dir,
             res.file = "analyzed.RData", overwrite = FALSE,
             use.par.file = FALSE, par.file = "parameters.RData",
             ...)

Arguments

form formula used in t.test or lm
covariates data frame containing covariates used in analysis
FDR False Discovery Rate in Benjamini-Hochberg test
normalization type of normalization to use on spectra before statistical analysis; currently, only "common", "postbase", "postrepl", and "none" are supported
add.norm logical; whether to normalize additively or multiplicatively on the log scale
repl.method function or string representing a function; how to deal with replicates
use.t.test whether to use a t-test to calculate p-values
pval.fcn function to calculate p-values if use.t.test = FALSE; default is overall p-value of F-test using lm
lrg.only logical; whether to consider only peaks that have at least one “large”peak; i.e., identified by run.lrg.peaks
masses specific masses to test
isotope.dist maximum distance for declaring isotopes
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
res.dir directory for results file; default is paste(root.dir, "/Results", sep = "")
res.file name for results file
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
... additional parameters to be passed to t.test or pval.fcn

Details

Reads in information from file created by run.strong.peaks and creates a file named res.file in res.dir which contains variables
amps matrix of transformed amplitudes of alignment peaks
centers matrix of calculated masses of alignment peaks
clust.mat matrix of transformed amplitudes of peaks used in statistical testing
min.FDR FDR level required to get at least one significant test given the starting set of peaks
sigs matrix containing all tests which are significant under at least one scenario
which.sig matrix containing all peaks tested
parameter.list if use.par.file = TRUE, a list generated by extract.pars; otherwise not defined

Value

No value returned; the file is simply created.

Note

If use.par.file = TRUE, then the parameters read in from the file overwrite any arguments entered in the function call.

To analyze replicates as independent samples, use repl.method = "none". This will also speed up the run time if there are no replicates in the data set.

The normalization schemes are as follows: "common" divides all peak heights in each spectrum by the average peak height of the alignment peaks from that spectrum in amps; "postbase" divides all peaks heights in each spectrum by the average of of all peak heights in that spectrum; and "postrepl" first combines replicates by applying repl.method to the peaks and then does "postbase".

If masses is not NULL, then the listed masses plus anything that could be in the first six isotope peaks of each mass are tested.

If something other than the p-value for the overall F-statistic is needed, then the user-defined function for pval.fcn should have the form function(form, dat, ...), where form and dat are as in lm; and should have a return value of the desired p-value.

Author(s)

Don Barkauskas (barkda@wald.ucdavis.edu)

References

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.

Benjamini, Y. and Hochberg, Y. (1995) “Controlling the false discovery rate: a practical and powerful approach to multiple testing.” J. Roy. Statist. Soc. Ser. B, 57:1, 289–300.

See Also

run.strong.peaks


[Package FTICRMS version 0.7 Index]