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

Description Usage Arguments Value Examples

View source: R/visualisation.R

Description

Draw network of enriched functional annotation pairs as a heatmap

Usage

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

ezer/PAFway documentation built on Dec. 11, 2019, 12:10 a.m.