draw_heatmap: draw a heatmap plot

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plots.R

Description

print a heatmap plot for expression matrix and group by group_list paramter

Usage

1
draw_heatmap(n, group_list, scale_before = F, n_cutoff = 2)

Arguments

group_list

A vector with duplicated character or factor

scale_before

logical,if TRUE ,scale before plot,if FALSE,ues scale = "row" param form pheatmap

n_cutoff

2 by defalut , scale before plot and set a cutoff,usually 2 or 1.6

Value

a heatmap plot according to exp and grouped by group.

Author(s)

Xiaojie Sun

See Also

draw_pca;draw_volcano;draw_venn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#use your example data
exp = matrix(abs(rnorm(60,sd = 16)),nrow = 10)
exp[,1:3] <- exp[,1:3]+20
colnames(exp) <- paste0("sample",1:6)
rownames(exp) <- paste0("gene",1:10)
exp[1:4,1:4]
group_list = rep(c("A","B"),each = 3)
draw_heatmap(exp,group_list)
#use iris
n = t(iris[,1:4]);colnames(n) = 1:150
group_list = iris$Species
draw_heatmap(n,group_list)

xjsun1221/tinyplanet documentation built on April 2, 2020, 4:51 a.m.