{
##Load the Functional Annotation Chart file report for the input demo
##file 2, using data function. Then, create a DAVIDGODag object using
##Molecular Function main category of DAVIDFunctionalAnnotationChart object,
##obtained from the loaded data.frame funChart2. In addition, we have
##selected a threshold pvalue of 0.001 and removed unattached nodes, in case
##DAVID/GO.db database are not using the same version.
data(funChart2)
davidGODag<-DAVIDGODag(DAVIDFunctionalAnnotationChart(funChart2), type="MF",
pvalueCutoff=0.001, removeUnattached=TRUE)
##Now, we can inspect the enrichment GO DAG using GOstats functionalities:
##counts, pvalues, sigCategories, universeCounts, geneMappedCount, etc.
##However, oddsRatios, expectedCounts and universeMappedCount are not
##available because these results are not available on DAVID's Functional
##Annotation Chart report. In addition geneIdUniverse are not the ones of
##the universe but the ids on the category (geneIdsByCategory).
davidGODag
counts(davidGODag)
pvalues(davidGODag)
sigCategories(davidGODag, p=0.0001)
universeCounts(davidGODag)
geneMappedCount(davidGODag)
geneIdsByCategory(davidGODag)
summary(davidGODag)
##In addition, the new nodeData attributes (term, listTotal, popHit,
##popTotal, foldEnrichment, bonferroni, benjamini, fdr) can be retrieved.
terms(davidGODag)
listTotals(davidGODag)
popHits(davidGODag)
popTotals(davidGODag)
foldEnrichments(davidGODag)
bonferronis(davidGODag)
benjaminis(davidGODag)
fdrs(davidGODag)
}
Run the code above in your browser using DataLab