DAVIDClasses-plot2D: Visualization of biological relationships

Description Usage Arguments Value Author(s) See Also Examples

Description

plot2D uses a 2D tile ggplot to explore biological relationships between two variables such as annotation category and genes, for Functional Annotation Chart/Table or Term cluster results. For Gene cluster, the cluster number vs genes membership is plotted.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
  plot2D(object,...)

  ## S4 method for signature 'DAVIDResult'
plot2D(object, dataFrame)

  ## S4 method for signature 'DAVIDFunctionalAnnotationChart'
plot2D(object,color=c("FALSE"="black",
  "TRUE"="green"))

  ## S4 method for signature 'DAVIDGeneCluster'
plot2D(object,color=c("FALSE"="black","TRUE"="green"),names=FALSE)

  ## S4 method for signature 'DAVIDTermCluster'
plot2D(object,number=1,color=c("FALSE"="black","TRUE"=
  "green"))

  ## S4 method for signature 'DAVIDFunctionalAnnotationTable'
plot2D(object,
  category, id, names.genes=FALSE,
  names.category=FALSE,color=c("FALSE"="black","TRUE"="green"))

Arguments

object

DAVIDResult heirs (DAVIDFunctionalAnnotationChart/Table or DAVIDGeneCluster/TermCluster)

dataFrame

data.frame with three columns (x, y and fill) to be used in ggplot. X(Y) is a character/factor with the X(Y)-axis labels and "fill" is a the color to be used for x-y labels.

color

named character vector to indicate tile color. Default value is c("FALSE"="black", "TRUE"="green").

names

should gene names be plotted? Default value is FALSE, i.e, use ids.

number

integer to indicate which cluster to plot. Default value is 1.

category

character vector to select the main annotation categories. By default is missing in order to use all the available ones.

id

character vector to indicate which gene ids to use. By default is missing in order to use all the available ones.

names.genes,names.category

Should genes and/or category names used? Default value is FALSE, i.e., use both ids.

...

Additional parameters for heirs functions.

Value

a ggplot object if the object is not empty.

Author(s)

Cristobal Fresno and Elmer A Fernandez

See Also

Other DAVIDFunctionalAnnotationChart: DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart-class, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDGODag, DAVIDGODag, DAVIDGeneCluster, DAVIDGeneCluster, DAVIDGenes, DAVIDGenes, DAVIDGenes, DAVIDTermCluster, DAVIDTermCluster, as, as, as, categories, categories, categories, ids, ids, ids, ids, ids, initialize, initialize, initialize, initialize, initialize, initialize, initialize

Other DAVIDFunctionalAnnotationTable: DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable-class, 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, subset, subset

Other DAVIDGeneCluster: DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDGODag, DAVIDGODag, DAVIDGeneCluster, DAVIDGeneCluster, DAVIDGeneCluster-class, DAVIDGenes, DAVIDGenes, DAVIDGenes, DAVIDTermCluster, DAVIDTermCluster, as, as, as, genes, genes, genes, genes, ids, ids, ids, ids, ids, initialize, initialize, initialize, initialize, initialize, initialize, initialize

Other DAVIDResult: DAVIDResult-class, type, type

Other DAVIDTermCluster: DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationChart, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDFunctionalAnnotationTable, DAVIDGODag, DAVIDGODag, DAVIDGeneCluster, DAVIDGeneCluster, DAVIDGenes, DAVIDGenes, DAVIDGenes, DAVIDTermCluster, DAVIDTermCluster, DAVIDTermCluster-class, as, as, as, ids, ids, ids, ids, ids, initialize, initialize, initialize, initialize, initialize, initialize, initialize

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
##DAVIDFunctionalAnnotationChart example:
##Load the Functional Annotation Chart file report for the input demo
##file 2, using data function. Just to keep it simple, for the first five
##terms present in funChart2 object, create a DAVIDFunctionalAnnotationChart
##object and plot a 2D tile matrix with the reported evidence (green) or not
##(black).
data(funChart2)
plot2D(DAVIDFunctionalAnnotationChart(funChart2[1:5, ]),
color=c("FALSE"="black", "TRUE"="green"))

##DAVIDFunctionalAnnotationTable example
##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.
data(annotationTable1)
davidFunTable1<-DAVIDFunctionalAnnotationTable(annotationTable1)

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

##DAVIDGeneCluster example:
##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))

##We can inspect a 2D tile membership plot, to visual inspect for
##overlapping of genes across the clusters. Or use an 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)))

##DAVIDTermCluster example:
##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))

##Finally, we can inspect a 2D tile membership plot, to visual inspect for
##overlapping of genes across the term members of the selected cluster,
##e.g., the first cluster .
plot2D(davidTermCluster2, number=1)
}

RDAVIDWebService documentation built on Nov. 8, 2020, 8:05 p.m.