glmWrapper(es, formula = FEV1 ~ xi + age + gender, pos.var.interest = 1, family = gaussian, logit = FALSE, pvalAdjMethod = "fdr", alpha = 0.05, probeID.var = "ProbeID", gene.var = "Symbol", chr.var = "Chromosome", applier = lapply, verbose = TRUE)fData(es) should
contains information about probe ID, chromosome number and gene symbol.
formula.
The left handside of ~ is the response variable.
Gene probe must be represented by the variable xi.
For example, xi~age+gender (gene probe is the response variable);
Or FEV1~xi+age+gender (gene probe is the predictor).
~ of formula is of
the interest.
pos.var.interest $= 0$ means the intercept is of the interest.
If the covariate of the interest is an factor or interaction term
with more than 2 levels, the smallest p-value will represent
the pvalue for the covariate of the interest.
glm.
p.adjust in R package stats:
holm, hochberg, hommel,
bonferroni, BH, BY, fdr,
none.
alpha.
$>verbose=TRUE,
intermediate output will be printed.
probeIDs, geneSymbols (gene symbols of the genes where the probes come from),
chr (numbers of chromosomes where the probes locate),
stats (z-value), pval (p-values of the tests for the covariate
of the interest),
p.adj (adjusted p-values), pos (row numbers of the probes in
the expression data matrix).formula.probeIDs, geneSymbols
(gene symbols of the genes where the probes come from),
chr (numbers of chromosomes where the probes locate),
stats (z-value for the covariate of the interest),
pval (p-values of the tests for the covariate of the interest),
p.adj (adjusted p-values), pos (row numbers of the probes in
the expression data matrix).memGenes[i]=1 if the $i$-th probe is significant (adjusted pvalue $<$ alpha) with
positive z-value for the covariate of the interest;
memGenes[i]=2 if the $i$-th probe is nonsignificant ;
memGenes[i]=3 if the $i$-th probe is significant with
negative z-value for the covariate of the interest;
$>memGenes2[i]=1 if the $i$-th probe is significant (adjusted pvalue $<$ alpha).
memGenes2[i]=0 if the $i$-th probe is nonsignificant.
$>memGenes value equal to 1.
memGenes value equal to 2.
memGenes value equal to 3.
glm
for each gene probe.
# generate simulated data set from conditional normal distribution
set.seed(1234567)
es.sim = genSimData.BayesNormal(nCpGs = 100,
nCases = 20, nControls = 20,
mu.n = -2, mu.c = 2,
d0 = 20, s02 = 0.64, s02.c = 1.5, testPara = "var",
outlierFlag = FALSE,
eps = 1.0e-3, applier = lapply)
print(es.sim)
res.glm = glmWrapper(
es = es.sim,
formula = xi~as.factor(memSubj),
pos.var.interest = 1,
family = gaussian,
logit = FALSE,
pvalAdjMethod = "fdr",
alpha = 0.05,
probeID.var = "probe",
gene.var = "gene",
chr.var = "chr",
applier = lapply,
verbose = TRUE)
Run the code above in your browser using DataLab