{
##Load the Functional Annotation Table file report for the input demo
##file 1, using data function. Then, create a DAVIDFunctionalAnnotationTable
##object using the loaded data.frame annotationTable1. In addition, the user
##can use the file name of the downloaded file report.
data(annotationTable1)
davidFunTable1<-DAVIDFunctionalAnnotationTable(annotationTable1)
##Now we can obtain the genes for the given ids, or the complete list if the
##parameter is omitted.
genes(davidFunTable1, id=c("37166_at","41703_r_at"))
##Or the main categories used on the analysis, in order to get the
##dictionary for a specific category (ID and Term fields), for the head of
##the data.frame.
categories(davidFunTable1)
head(dictionary(davidFunTable1, categories(davidFunTable1)[1]))
##And what about the membership of the genes in these terms? Just for the
##first six ids we can use:
head(membership(davidFunTable1, categories(davidFunTable1)[1]))
##Or simply plot the membership of only for the first six terms in this
##category, with only the genes of the first six terms with at least one
##evidence code.
##Category filtering...
categorySelection<-list(head(dictionary(davidFunTable1,
categories(davidFunTable1)[1])$ID))
names(categorySelection)<-categories(davidFunTable1)[1]
##Gene filter...
id<-membership(davidFunTable1, categories(davidFunTable1)[1])[,1:6]
id<-ids(genes(davidFunTable1))[rowSums(id)>0]
##Finally the membership tile plot
plot2D(davidFunTable1, category=categorySelection, id=id,
names.category=TRUE)
}
Run the code above in your browser using DataLab