Description Usage Arguments Value See Also Examples
MIGSA
runs a MIGSA execution. Functional analysis is done for each
experiment by means of dEnricher and mGSZ.
1 2 3 4 |
igsaInputs |
list of IGSAinput objects to execute. |
... |
not in use. |
geneSets |
(optional) named list of GeneSetCollection objects to be tested for enrichment (names must be unique). If provided then it will be tested in every IGSAinput, if not, each IGSAinput object must have its own list of GeneSetCollection. |
A MIGSAres object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ## Lets simulate two expression matrices of 1000 genes and 30 subjects.
nGenes <- 1000
# 1000 genes
nSamples <- 30
# 30 subjects
geneNames <- paste("g", 1:nGenes, sep = "")
# with names g1 ... g1000
## Create random gene expression data matrix.
set.seed(8818)
exprData1 <- matrix(rnorm(nGenes * nSamples), ncol = nSamples)
rownames(exprData1) <- geneNames
exprData2 <- matrix(rnorm(nGenes * nSamples), ncol = nSamples)
rownames(exprData2) <- geneNames
## There will be 40 differentialy expressed genes.
nDeGenes <- nGenes / 25
## Lets generate the offsets to sum to the differentialy expressed genes.
deOffsets <- matrix(2 * abs(rnorm(nDeGenes * nSamples / 2)), ncol = nSamples / 2)
## Randomly select which are the DE genes.
deIndexes1 <- sample(1:nGenes, nDeGenes, replace = FALSE)
exprData1[deIndexes1, 1:(nSamples / 2)] <-
exprData1[deIndexes1, 1:(nSamples / 2)] + deOffsets
deIndexes2 <- sample(1:nGenes, nDeGenes, replace = FALSE)
exprData2[deIndexes2, 1:(nSamples / 2)] <-
exprData2[deIndexes2, 1:(nSamples / 2)] + deOffsets
exprData1 <- new("MAList", list(M = exprData1))
exprData2 <- new("MAList", list(M = exprData2))
## 15 subjects with condition C1 and 15 with C2.
conditions <- rep(c("C1", "C2"), c(nSamples / 2, nSamples / 2))
nGSets <- 200
# 200 gene sets
## Lets create randomly 200 gene sets, of 10 genes each
gSets <- lapply(1:nGSets, function(i) sample(geneNames, size = 10))
names(gSets) <- paste("set", as.character(1:nGSets), sep = "")
myGSs <- as.Genesets(gSets)
fitOpts <- FitOptions(conditions)
igsaInput1 <- IGSAinput(
name = "igsaInput1", expr_data = exprData1,
fit_options = fitOpts, gene_sets_list = list(myGSs = myGSs)
)
igsaInput2 <- IGSAinput(
name = "igsaInput2", expr_data = exprData2,
fit_options = fitOpts, gene_sets_list = list(myGSs = myGSs)
)
experiments <- list(igsaInput1, igsaInput2)
## Finally run MIGSA!
## Not run:
migsaRes <- MIGSA(experiments)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.