run.analysis {FTICRMS} | R Documentation |
Takes the file generated by run.cluster.matrix
and tests the peaks using Benjamini-Hochberg
to control the False Discovery Rate.
run.analysis(form, covariates, FDR = 0.1, normalization = "common", add.norm = TRUE, repl.method = max, use.t.test = TRUE, 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", ...)
form |
formula used in t.test or lm |
covariates |
data frame containing covariates used in analysis |
FDR |
False Discovery Rate to use 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 |
logical; whether to use t.test to get p-values |
pval.fcn |
default value gives p-value of overall F-statistic of test; see below for form to be used for user-defined values |
lrg.only |
whether to consider only peaks that have at least one peak “significant”; i.e.,
identified by run.lrg.peaks |
masses |
numeric vector of specific masses to test |
isotope.dist |
maximum number of isotope peaks to look at (in addition to main peak) |
root.dir |
string containing location of raw data directory |
lrg.dir |
directory for significant peaks file; default is paste(root.dir, "/Large_Peaks", sep = "") |
lrg.file |
string containing name for significant peaks file |
res.dir |
directory for results file; default is paste(root.dir, "/Results", sep = "") |
res.file |
string containing name for results file |
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 |
... |
additional parameters to be passed to t.test or pval.fcn |
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 |
No value returned; the file is simply created.
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 peaks in 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.
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
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.