Learn R Programming

PAFway (version 0.1.3)

draw_heatmap: Draw network of enriched functional annotation pairs as a heatmap

Description

Draw network of enriched functional annotation pairs as a heatmap

Usage

draw_heatmap(
  graph,
  adjMethod = NULL,
  xlab = "downstream",
  ylab = "upstream",
  colPal = NULL
)

Arguments

graph

The output of either the pafway or pafway_edge_weight functions

adjMethod

The method for correcting for multiple hypotheses. This can be any method that is acceptable to the p.adjust function in the stats package: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr" or "none". If this is NULL, then no adjustment will be made.

xlab

The label for the x-axis of the heatmap

ylab

The label for the y-axis of the heatmap

colPal

The color palette of the heatmap

Value

A matrix that has the same number of rows and columns as length(GOtypes). This will contain p-values.

Examples

Run this code
# NOT RUN {
nodes=paste("node", c(1:300))
set.seed(123)
randomGO=c("A", "B", "C", "D", "E", "F", "G", "H", "I",
"J", "K", "L", "M", "N")[sample(c(1:14), 300, replace=TRUE)]
names(randomGO)=nodes
edgesRandom=sapply(c(1:1000), function(i){
   nodes[sample(300, 2)]
})
getBinomPvalueRandom1=pafway(randomGO, t(edgesRandom), unique(randomGO))
draw_heatmap(getBinomPvalueRandom1)
colPal1=c(colorRampPalette(c("red3", "lightpink", "white", "white"))(20),
colorRampPalette(c("white", "white", "lightgreen", "darkgreen"))(20))
draw_heatmap(getBinomPvalueRandom1, adjMethod="bonferroni", xlab="Downstream",
ylab="Upstream", colPal=colPal1)
# }

Run the code above in your browser using DataLab