the GO terms for which the plot should be generated.
ranks
if ranks should be used instead of scores.
rm.one
the p-values which are 1 are removed.
whichTerms
character vector listing the GO terms for which
the summary should be printed.
file
character string specifying the file in which the results should
be printed.
...
Extra arguments for GenTable can be:
...
one or more objects of class topGOresult.
orderBy
if more than one topGOresult object is given then
orderBy gives the index of which scores will be
used to order the resulting table. Can be an integer index
or a character vector given the name of the topGOresult
object.
ranksOf
same as orderBy argument except that this parameter shows
the relative ranks of the specified result.
topNodes
the number of top GO terms to be included in the table.
numChar
the GO term definition will be truncated such that only
the first numChar characters are shown.
Extra arguments for printGenes can be:
chip
character string containing the name of the Bioconductor
annotation package for a microarray chip.
numChar
the gene description is trimmed such that it has
numChar characters.
simplify
logical variable affecting how the results are returned.
geneCutOff
the maximal number of genes shown for each term.
pvalCutOff
only the genes with a p-value less than pvalCutOff are shown.
oneFile
if TRUE then a file for each GO term is generated.
Details
GenTable is an easy to use function for summarising the most
significant GO terms and the corresponding p-values. The function
dispatches for topGOdata and topGOresult objects, and
it can take an arbitrary number of the later, making comparison
between various results easier.
Note: One needs to type the complete attribute names (the exact name)
of this function, like: topNodes = 5, rankOf = "resultFis", etc.
This being the price paid for flexibility of specifying different
number of topGOdata objects.
The showGroupDensity function analyse the distribution of the
gene-wise scores for a specified GO term.
The function will show the distribution of the genes in a GO term
compared with the complementary set, using a lattice plot.
printGenes
The function will generate a table with all the probes annotated to
the specified GO term. Various type of identifiers, the gene name and
the gene-wise statistics are provided in the table.
One or more GO identifiers can be given to the function using the
whichTerms argument. When more than one GO is specified, the
function returns a list of data.frames, otherwise only one
data.frame is returned.
The function has a argument file which, when specified, will
save the results into a file using the CSV format.
For the moment the function will work only when the chip used has an
annotation package available in Bioconductor. It will not work with
other type of custom annotations.
Value
A data.frame or a list of data.fames.
Author(s)
Adrian Alexa
See Also
groupStats-class,
getSigGroups-methods
Examples
data(GOdata)
########################################
## GenTable
########################################
## load two topGOresult sample objects: resultFisher and resultKS
data(results.tGO)
## generate the result of Fisher's exact test
sig.tab <- GenTable(GOdata, Fis = resultFisher, topNodes = 20)
## results of both test
sig.tab <- GenTable(GOdata, resultFisher, resultKS, topNodes = 20)
## results of both test with specified names
sig.tab <- GenTable(GOdata, Fis = resultFisher, KS = resultKS, topNodes = 20)
## results of both test with specified names and specified ordering
sig.tab <- GenTable(GOdata, Fis = resultFisher, KS = resultKS, orderBy = "KS", ranksOf = "Fis", topNodes = 20)
########################################
## showGroupDensity
########################################
goID <- "GO:0006091"
print(showGroupDensity(GOdata, goID, ranks = TRUE))
print(showGroupDensity(GOdata, goID, ranks = FALSE, rm.one = FALSE))
########################################
## printGenes
########################################
## Not run:
library(hgu95av2.db)
goID <- "GO:0006629"
gt <- printGenes(GOdata, whichTerms = goID, chip = "hgu95av2.db", numChar = 40)
goIDs <- c("GO:0006629", "GO:0007076")
gt <- printGenes(GOdata, whichTerms = goIDs, chip = "hgu95av2.db", pvalCutOff = 0.01)
gt[goIDs[1]]
## End(Not run)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(topGO)
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: graph
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: GO.db
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: SparseM
Attaching package: 'SparseM'
The following object is masked from 'package:base':
backsolve
groupGOTerms: GOBPTerm, GOMFTerm, GOCCTerm environments built.
Attaching package: 'topGO'
The following object is masked from 'package:IRanges':
members
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/topGO/diagnosticMethods.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dignostic-methods
> ### Title: Diagnostic functions for topGOdata and topGOresult objects.
> ### Aliases: printGenes-methods printGenes
> ### printGenes,topGOdata,character,character-method
> ### printGenes,topGOdata,character,missing-method GenTable
> ### GenTable,topGOdata-method showGroupDensity
> ### Keywords: methods
>
> ### ** Examples
>
>
> data(GOdata)
>
>
> ########################################
> ## GenTable
> ########################################
>
> ## load two topGOresult sample objects: resultFisher and resultKS
> data(results.tGO)
>
> ## generate the result of Fisher's exact test
> sig.tab <- GenTable(GOdata, Fis = resultFisher, topNodes = 20)
>
> ## results of both test
> sig.tab <- GenTable(GOdata, resultFisher, resultKS, topNodes = 20)
>
> ## results of both test with specified names
> sig.tab <- GenTable(GOdata, Fis = resultFisher, KS = resultKS, topNodes = 20)
>
> ## results of both test with specified names and specified ordering
> sig.tab <- GenTable(GOdata, Fis = resultFisher, KS = resultKS, orderBy = "KS", ranksOf = "Fis", topNodes = 20)
>
>
> ########################################
> ## showGroupDensity
> ########################################
>
> goID <- "GO:0006091"
> print(showGroupDensity(GOdata, goID, ranks = TRUE))
> print(showGroupDensity(GOdata, goID, ranks = FALSE, rm.one = FALSE))
>
>
>
> ########################################
> ## printGenes
> ########################################
>
> ## Not run:
> ##D library(hgu95av2.db)
> ##D goID <- "GO:0006629"
> ##D
> ##D gt <- printGenes(GOdata, whichTerms = goID, chip = "hgu95av2.db", numChar = 40)
> ##D
> ##D goIDs <- c("GO:0006629", "GO:0007076")
> ##D gt <- printGenes(GOdata, whichTerms = goIDs, chip = "hgu95av2.db", pvalCutOff = 0.01)
> ##D
> ##D gt[goIDs[1]]
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>