topGOdata-class: Class "topGOdata"

Description Objects from the Class Slots Methods Author(s) See Also Examples

Description

TODO: The node attributes are environments containing the genes/probes annotated to the respective node

If genes is a numeric vector than this should represent the gene's score. If it is factor it should discriminate the genes in interesting genes and the rest

TODO: it will be a good idea to replace the allGenes and allScore with an ExpressionSet class. In this way we can use tests like global test, globalAncova.... – ALL variables starting with . are just for internal class usage (private)

Objects from the Class

Objects can be created by calls of the form new("topGOdata", ontology, allGenes, geneSelectionFun, description, annotationFun, ...). ~~ describe objects here ~~

Slots

description:

Object of class "character" ~~

ontology:

Object of class "character" ~~

allGenes:

Object of class "character" ~~

allScores:

Object of class "ANY" ~~

geneSelectionFun:

Object of class "function" ~~

feasible:

Object of class "logical" ~~

nodeSize:

Object of class "integer" ~~

graph:

Object of class "graphNEL" ~~

expressionMatrix:

Object of class "matrix" ~~

phenotype:

Object of class "factor" ~~

Methods

allGenes

signature(object = "topGOdata"): ...

attrInTerm

signature(object = "topGOdata", attr = "character", whichGO = "character"): ...

attrInTerm

signature(object = "topGOdata", attr = "character", whichGO = "missing"): ...

countGenesInTerm

signature(object = "topGOdata", whichGO = "character"): ...

countGenesInTerm

signature(object = "topGOdata", whichGO = "missing"): ...

description<-

signature(object = "topGOdata"): ...

description

signature(object = "topGOdata"): ...

feasible<-

signature(object = "topGOdata"): ...

feasible

signature(object = "topGOdata"): ...

geneScore

signature(object = "topGOdata"): ...

geneSelectionFun<-

signature(object = "topGOdata"): ...

geneSelectionFun

signature(object = "topGOdata"): ...

genes

signature(object = "topGOdata"): A method for obtaining the list of genes, as a characther vector, which will be used in the further analysis.

numGenes

signature(object = "topGOdata"): A method for obtaining the number of genes, which will be used in the further analysis. It has the same effect as: lenght(genes(object)).

sigGenes

signature(object = "topGOdata"): A method for obtaining the list of significant genes, as a charachter vector.

genesInTerm

signature(object = "topGOdata", whichGO = "character"): ...

genesInTerm

signature(object = "topGOdata", whichGO = "missing"): ...

getSigGroups

signature(object = "topGOdata", test.stat = "classicCount"): ...

getSigGroups

signature(object = "topGOdata", test.stat = "classicScore"): ...

graph<-

signature(object = "topGOdata"): ...

graph

signature(object = "topGOdata"): ...

initialize

signature(.Object = "topGOdata"): ...

ontology<-

signature(object = "topGOdata"): ...

ontology

signature(object = "topGOdata"): ...

termStat

signature(object = "topGOdata", whichGO = "character"): ...

termStat

signature(object = "topGOdata", whichGO = "missing"): ...

updateGenes

signature(object = "topGOdata", geneList = "numeric", geneSelFun = "function"): ...

updateGenes

signature(object = "topGOdata", geneList = "factor", geneSelFun = "missing"): ...

updateTerm<-

signature(object = "topGOdata", attr = "character"): ...

usedGO

signature(object = "topGOdata"): ...

Author(s)

Adrian Alexa

See Also

buildLevels, annFUN

Examples

 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
## load the dataset 
data(geneList)
library(package = affyLib, character.only = TRUE)

## the distribution of the adjusted p-values
hist(geneList, 100)

## how many differentially expressed genes are:
sum(topDiffGenes(geneList))

## build the topGOdata class 
GOdata <- new("topGOdata",
              ontology = "BP",
              allGenes = geneList,
              geneSel = topDiffGenes,
              description = "GO analysis of ALL data: Differential Expression between 
                             B-cell and T-cell",
              annot = annFUN.db,
              affyLib = affyLib)

## display the GOdata object
GOdata

##########################################################
## Examples on how to use the methods
##########################################################

## description of the experiment
description(GOdata)

## obtain the genes that will be used in the analysis
a <- genes(GOdata)
str(a)
numGenes(GOdata)

## obtain the score (p-value) of the genes
selGenes <- names(geneList)[sample(1:length(geneList), 10)]
gs <- geneScore(GOdata, whichGenes = selGenes)
print(gs)

## if we want an unnamed vector containing all the feasible genes
gs <- geneScore(GOdata, use.names = FALSE)
str(gs)

## the list of significant genes
sg <- sigGenes(GOdata)
str(sg)
numSigGenes(GOdata)

## to update the gene list 
.geneList <- geneScore(GOdata, use.names = TRUE)
GOdata ## more available genes
GOdata <- updateGenes(GOdata, .geneList, topDiffGenes)
GOdata ## the available genes are now the feasible genes

## the available GO terms (all the nodes in the graph)
go <- usedGO(GOdata)
length(go)

## to list the genes annotated to a set of specified GO terms
sel.terms <- sample(go, 10)
ann.genes <- genesInTerm(GOdata, sel.terms)
str(ann.genes)

## the score for these genes
ann.score <- scoresInTerm(GOdata, sel.terms)
str(ann.score)

## to see the number of annotated genes
num.ann.genes <- countGenesInTerm(GOdata)
str(num.ann.genes)

## to summarise the statistics
termStat(GOdata, sel.terms)

ycl6/topGO-feat documentation built on Aug. 12, 2020, 12:55 a.m.