{
##Load the Gene Functional Classification Tool file report for the
##input demo file 2 to create a DAVIDGeneCluster object.
setwd(tempdir())
fileName<-system.file("files/termClusterReport2.tab.tar.gz",
package="RDAVIDWebService")
untar(fileName)
davidTermCluster2<-DAVIDTermCluster(untar(fileName, list=TRUE))
davidTermCluster2
##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(davidTermCluster2)
higherEnrichment<-which.max(enrichment(davidTermCluster2))
clusterGenes<-members(davidTermCluster2)[[higherEnrichment]]
wholeCluster<-cluster(davidTermCluster2)[[higherEnrichment]]
##Then, we can obtain the ids of the term members calling clusterGenes object
##which is a DAVIDFunctionalAnnotationChart class or directly using ids on
##davidTermCluster2 for the higherEnrichment cluster.
ids(clusterGenes)
ids(davidTermCluster2)[[higherEnrichment]]
##Finally, we can inspect a 2D tile membership plot, to visual inspect for
##overlapping of genes across the term members of the selected cluster.
plot2D(davidTermCluster2, number=higherEnrichment)
}
Run the code above in your browser using DataLab