Last data update: 2014.03.03

R: class "DAVIDFunctionalAnnotationTable
DAVIDFunctionalAnnotationTable-classR Documentation

class "DAVIDFunctionalAnnotationTable

Description

This class represents the output of a DAVID Functional Annotation Table report. In this class no statistical analysis is carried out.

Type

This class is a "Concrete" one.

Extends

  • DAVIDResult in the conceptual way, and to reuse some functionalities such as plot2D, type and so on.

Slots

Genes

a DAVIDGenes object with the submitted genes.

Dictionary

a look up list of data.frame of each main annotation category, where the specified IDs and Terms used can be found.

Membership

list with logical membership matrix, where gene ids are coded by rows and the respective annotation category ids as columns.

Methods

initialize

signature(.Object= "DAVIDFunctionalAnnotationTable", fileName="character"): basic Functional Annotation Table report file parser.

DAVIDFunctionalAnnotationTable

signature(fileName= "character"): high level Functional Annotation Table report file parser.

valid

signature(object= "DAVIDFunctionalAnnotationTable"):logical which checks for Membership, Dictionary and Genes cohesion.

show

signature(object="DAVIDFunctionalAnnotationTable"): returns a basic console output.

genes

signature(object="DAVIDFunctionalAnnotationTable") : returns a DAVIDGenes object.

subset

signature(object= "DAVIDFunctionalAnnotationTable", selection=c("Membership","Dictionary"), category, drop=TRUE): returns a subset list using the selection slot, looking up the category parameter if provided. Otherwise, it returns all the available main categories. Drop parameter indicates whether to drop list structure or not, if a list of length==1 is to be returned.

dictionary

signature(object= "DAVIDFunctionalAnnotationTable", category, drop=TRUE): returns subset using selection="Dictionary" and category and drop parameters.

membership

signature(object= "DAVIDFunctionalAnnotationTable", category="character", drop=TRUE): returns subset using selection="Membership" and category and drop parameters.

genes

signature(object= "DAVIDFunctionalAnnotationTable", ...): returns a DAVIDGenes object slot, according to additional ... parameters.

categories

signature(object= "DAVIDFunctionalAnnotationTable"): returns a character vector with the main annotation categories available..

plot2D

signature(object="DAVIDFunctionalAnnotationTable", category, id, names.genes=FALSE, names.category=FALSE, color=c("FALSE"="black", "TRUE"="green")): ggplot2 tile plot of genes id vs functional annotation category membership. If missing, all available data is used. In addition, names.genes and names.category parameters indicate whether to use or not, genes and category names respectively. Default value is FALSE.

Author(s)

Cristobal Fresno and Elmer A Fernandez

References

  1. The Database for Annotation, Visualization and Integrated Discovery (david.abcc.ncifcrf.gov)

  2. 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

See Also

Other DAVIDFunctionalAnnotationTable: DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDGODag, DAVIDGODag, DAVIDGeneCluster, DAVIDGeneCluster, DAVIDGenes, DAVIDGenes, DAVIDGenes, DAVIDTermCluster, DAVIDTermCluster, as, as, as, categories, categories, categories, dictionary, dictionary, genes, genes, genes, genes, initialize, initialize, initialize, initialize, initialize, initialize, initialize, membership, membership, plot2D, plot2D, plot2D, plot2D, plot2D, plot2D, subset, subset

Examples

{
##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)
}

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/DAVIDFunctionalAnnotationTable-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: DAVIDFunctionalAnnotationTable-class
> ### Title: class "DAVIDFunctionalAnnotationTable
> ### Aliases: DAVIDFunctionalAnnotationTable-class
> ### Keywords: classes
> 
> ### ** Examples
> 
> {
+ ##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)
+ }
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>