signature(fileName="character"):
high level gene cluster report file parser.
ids
signature(object="DAVIDGeneCluster"):
list with the member ids within each cluster.
genes
signature(object="DAVIDGeneCluster"):
list with the DAVIDGenes members within each cluster.
plot2D
signature(object="DAVIDGeneCluster",
color=c("FALSE"="black","TRUE"="green"), names=FALSE):
ggplot2 tile plot with gene membership to each cluster.
Author(s)
Cristobal Fresno and Elmer A Fernandez
References
The Database for Annotation,
Visualization and Integrated Discovery
(david.abcc.ncifcrf.gov)
Huang, D. W.; Sherman, B.
T.; Tan, Q.; Kir, J.; Liu, D.; Bryant, D.; Guo, Y.;
Stephens, R.; Baseler, M. W.; Lane, H. C. & Lempicki, R.
A. DAVID Bioinformatics Resources: expanded annotation
database and novel algorithms to better extract biology
from large gene lists. Nucleic Acids Res, Laboratory of
Immunopathogenesis and Bioinformatics, SAIC-Frederick,
Inc., National Cancer Institute at Frederick, MD 21702,
USA., 2007, 35, W169-W175
{
##Load the Gene Functional Classification Tool file report for the
##input demo list 1 file to create a DAVIDGeneCluster object.
setwd(tempdir())
fileName<-system.file("files/geneClusterReport1.tab.tar.gz",
package="RDAVIDWebService")
untar(fileName)
davidGeneCluster1<-DAVIDGeneCluster(untar(fileName, list=TRUE))
davidGeneCluster1
##Now we can invoke DAVIDCluster ancestor functions to inspect the report
##data, of each cluster. For example, we can call summary to get a general
##idea, and the inspect the cluster with higher Enrichment Score, to see
##which members belong to it, etc. Or simply returning the whole cluster as
##a list with EnrichmentScore and Members.
summary(davidGeneCluster1)
higherEnrichment<-which.max(enrichment(davidGeneCluster1))
clusterGenes<-members(davidGeneCluster1)[[higherEnrichment]]
wholeCluster<-cluster(davidGeneCluster1)[[higherEnrichment]]
##Then, we can obtain the ids of the members calling clusterGenes object
##which is a DAVIDGenes class or directly using ids on davidGeneCluster1.
ids(clusterGenes)
ids(davidGeneCluster1)[[higherEnrichment]]
##Obtain the genes of the first cluster using davidGeneCluster1 object.
##Or, using genes on DAVIDGenes class once we get the members of the cluster.
genes(davidGeneCluster1)[[1]]
genes(members(davidGeneCluster1)[[1]])
##Finally, we can inspect a 2D tile membership plot, to visually inspect for
##overlapping of genes across the clusters. Or use a scaled version of gene
##names to see the association of gene cluster, e.g., cluster 3 is related to
##ATP genes.
plot2D(davidGeneCluster1)
plot2D(davidGeneCluster1,names=TRUE)+
theme(axis.text.y=element_text(size=rel(0.9)))
}
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(RDAVIDWebService)
Loading required package: graph
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: GOstats
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: Category
Loading required package: stats4
Loading required package: AnnotationDbi
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: Matrix
Attaching package: 'Matrix'
The following object is masked from 'package:S4Vectors':
expand
Attaching package: 'GOstats'
The following object is masked from 'package:AnnotationDbi':
makeGOGraph
Loading required package: ggplot2
Attaching package: 'RDAVIDWebService'
The following object is masked from 'package:AnnotationDbi':
species
The following object is masked from 'package:IRanges':
members
The following objects are masked from 'package:BiocGenerics':
counts, species
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RDAVIDWebService/DAVIDGeneCluster-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: DAVIDGeneCluster-class
> ### Title: class "DAVIDGeneCluster
> ### Aliases: DAVIDGeneCluster-class
> ### Keywords: classes
>
> ### ** Examples
>
> {
+ ##Load the Gene Functional Classification Tool file report for the
+ ##input demo list 1 file to create a DAVIDGeneCluster object.
+ setwd(tempdir())
+ fileName<-system.file("files/geneClusterReport1.tab.tar.gz",
+ package="RDAVIDWebService")
+ untar(fileName)
+ davidGeneCluster1<-DAVIDGeneCluster(untar(fileName, list=TRUE))
+ davidGeneCluster1
+
+ ##Now we can invoke DAVIDCluster ancestor functions to inspect the report
+ ##data, of each cluster. For example, we can call summary to get a general
+ ##idea, and the inspect the cluster with higher Enrichment Score, to see
+ ##which members belong to it, etc. Or simply returning the whole cluster as
+ ##a list with EnrichmentScore and Members.
+ summary(davidGeneCluster1)
+ higherEnrichment<-which.max(enrichment(davidGeneCluster1))
+ clusterGenes<-members(davidGeneCluster1)[[higherEnrichment]]
+ wholeCluster<-cluster(davidGeneCluster1)[[higherEnrichment]]
+
+ ##Then, we can obtain the ids of the members calling clusterGenes object
+ ##which is a DAVIDGenes class or directly using ids on davidGeneCluster1.
+ ids(clusterGenes)
+ ids(davidGeneCluster1)[[higherEnrichment]]
+
+ ##Obtain the genes of the first cluster using davidGeneCluster1 object.
+ ##Or, using genes on DAVIDGenes class once we get the members of the cluster.
+ genes(davidGeneCluster1)[[1]]
+ genes(members(davidGeneCluster1)[[1]])
+
+ ##Finally, we can inspect a 2D tile membership plot, to visually inspect for
+ ##overlapping of genes across the clusters. Or use a scaled version of gene
+ ##names to see the association of gene cluster, e.g., cluster 3 is related to
+ ##ATP genes.
+ plot2D(davidGeneCluster1)
+ plot2D(davidGeneCluster1,names=TRUE)+
+ theme(axis.text.y=element_text(size=rel(0.9)))
+ }
>
>
>
>
>
> dev.off()
null device
1
>