GSCA: An S4 class for Gene Set Collection Analyses on...

Description Usage Arguments Value Slots See Also Examples

View source: R/gsca_class.R

Description

This S4 class includes a series of methods to do gene set enrichment analysis and hypergeometric test for high-throughput data.

Usage

1
GSCA(listOfGeneSetCollections, geneList, hits = character())

Arguments

listOfGeneSetCollections

A list of gene set collections (a 'gene set collection' is a list of gene sets).

geneList

A numeric or integer vector of phenotypes named by gene identifiers.

hits

A character vector of the gene identifiers (used as hits in the hypergeometric tests).It's needed if you want to do GSOA (gene set overrepresentation analysis).

Value

This function will create a new object of 'GSCA' class.

Slots

para

A list of parameters for hypergeometric test and GSEA. These parameters are pValueCutoff, pAdjustMethod, nPermutations, minGeneSetSize and exponent.

result

A list of results.

summary

A list of summary information for listOfGeneSetCollections, geneList, hits, para, and result.

preprocessed

A single logical value specifying whether or not the input data has been preprocessed.

See Also

preprocess, analyze, appendGSTerms, summarize, report

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(org.Hs.eg.db)
library(GO.db)
## load data for enrichment analyses
data(d7)
phenotype <- as.vector(d7$neg.lfc)
names(phenotype) <- d7$id

## select hits if you also want to do GSOA, otherwise ignore it
hits <- names(phenotype[which(abs(phenotype) > 2)])

## set up a list of gene set collections
GO_MF <- GOGeneSets(species="Hs", ontologies=c("MF"))
ListGSC <- list(GO_MF=GO_MF)

## Example1: create an object of class 'GSCA' with hits
gsca <- GSCA(listOfGeneSetCollections = ListGSC, geneList = phenotype, hits = hits)
getSummary(gsca)

## Example2: create an object of class 'GSCA' without hits
gsca <- GSCA(listOfGeneSetCollections = ListGSC, geneList = phenotype)
getSummary(gsca)

CityUHK-CompBio/HTSanalyzeR2 documentation built on Nov. 24, 2018, 8:06 p.m.