gseaAfterBoot: Gene set analysis for hurdle model

Description Usage Arguments Value control Return Value See Also Examples

View source: R/GSEA-by-boot.R

Description

Modules defined in sets are tested for average differences in expression from the "average" gene. By using bootstraps, the between-gene covariance of terms in the hurdle model is found, and is used to adjust for coexpression between genes. We drop genes if the coefficient we are testing was not estimible in original model fit in zFit or in any of the bootstrap replicates (evidenced an NA in the bootstrap array). This might yield overly conservative inference. Since bootstrapping is a randomized procedure, the degrees of freedom of a module (and its variance parameters) might differ from run-to-run. You might try setting var_estimate='modelbased' to relax this requirement by assuming independence between genes and then using the asymptotic covariance estimates, which are deterministic, but may result in overly-generous inference.

Usage

1
2
gseaAfterBoot(zFit, boots, sets, hypothesis, control = list(n_randomize = Inf,
  var_estimate = "bootall"))

Arguments

zFit

object of class ZlmFit

boots

bootstraps of zFit

sets

list of indices of genes

hypothesis

a Hypothesis to test. Currently only one degree CoefficientHypothesis are supported.

control

list of control parameters. See details.

Value

Object of class GSEATests, containing slots tests, 4D array and bootR, the number of boostrap replicates.

control

control is a list with elements:

Return Value

A 4D array is returned, with dimensions "set" (each module), "comp" ('disc'rete or 'cont'inuous), "metric" ('stat' gives the average of the coefficient, 'var' gives the variance of that average, 'dof' gives the number of genes that were actually tested in the set), "group" ('test' for the genes in test-set, "null" for all genes outside the test-set).

See Also

calcZ

summary,GSEATests-method

Examples

1
2
3
4
5
6
7
8
9
data(vbetaFA)
vb1 = subset(vbetaFA, ncells==1)
vb1 = vb1[,freq(vb1)>.1][1:15,]
zf = zlm(~Stim.Condition, vb1)
boots = bootVcov1(zf, 5)
sets=list(A=1:5, B=3:10, C=15, D=1:5)
gsea=gseaAfterBoot(zf, boots, sets, CoefficientHypothesis('Stim.ConditionUnstim'))
calcZ(gsea)
summary(gsea)

MAST documentation built on May 31, 2017, 2:28 p.m.