一.准备示例数据

下载:链接:https://pan.baidu.com/s/1_b8swSkWDqIHZi6UwKaspA 提取码:pll7

文件说明
示例数据,其中数据均为虚拟数据,与实际生物学过程无关
文件名:dataset_heatmap.txt
列分别为:基因,cell1的5个重复样本,cell2的5个重复样本
行代表:每个基因在所有样本的FPKM值

二.绘制聚类热图

1.聚类热图绘制

# 执行前设置====================================
# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 载入数据
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
cell_list=c(rep('cell_1',5),rep('cell_2',5))
annotation_c <- data.frame(cell_list)
rownames(annotation_c) <- colnames(exp_ds)# 绘制热图=====================================
pheatmap(exp_ds, #表达数据cluster_rows = T,#行聚类cluster_cols = T,#列聚类annotation_col =annotation_c, #样本分类数据annotation_legend=TRUE, # 显示样本分类show_rownames = T,# 显示行名show_colnames = T,# 显示列名scale = "row", #对行标准化color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100) # 热图基准颜色
)

2. 无分类信息热图

# 执行前设置====================================
# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 载入数据
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
cell_list=c(rep('cell_1',5),rep('cell_2',5))
annotation_c <- data.frame(cell_list)
rownames(annotation_c) <- colnames(exp_ds)# # 绘制热图=====================================1
# pheatmap(exp_ds, #表达数据
#          cluster_rows = T,#行聚类
#          cluster_cols = T,#列聚类
#          annotation_col =annotation_c, #样本分类数据
#          annotation_legend=TRUE, # 显示样本分类
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100) # 热图基准颜色
# )# 将绘制热图部分替换为下列代码
# 绘制热图=====================================2
pheatmap(exp_ds, show_rownames = T,show_colnames = T,scale = "row", color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100)
)

3. 无聚类热图

# 执行前设置====================================
# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 载入数据
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
cell_list=c(rep('cell_1',5),rep('cell_2',5))
annotation_c <- data.frame(cell_list)
rownames(annotation_c) <- colnames(exp_ds)# # 绘制热图=====================================1
# pheatmap(exp_ds, #表达数据
#          cluster_rows = T,#行聚类
#          cluster_cols = T,#列聚类
#          annotation_col =annotation_c, #样本分类数据
#          annotation_legend=TRUE, # 显示样本分类
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100) # 热图基准颜色
# )# # 将绘制热图部分替换为下列代码
# # 绘制热图=====================================2
# pheatmap(exp_ds,
#          show_rownames = T,
#          show_colnames = T,
#          scale = "row",
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100)
# )# 将绘制热图部分替换为下列代码=================3
pheatmap(exp_ds, #表达数据cluster_rows = F,cluster_cols = F,show_rownames = T,show_colnames = T,scale = "row", color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100)
)

4.分割聚类树热图

# 执行前设置====================================
# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 载入数据
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
cell_list=c(rep('cell_1',5),rep('cell_2',5))
annotation_c <- data.frame(cell_list)
rownames(annotation_c) <- colnames(exp_ds)# # 绘制热图=====================================1
# pheatmap(exp_ds, #表达数据
#          cluster_rows = T,#行聚类
#          cluster_cols = T,#列聚类
#          annotation_col =annotation_c, #样本分类数据
#          annotation_legend=TRUE, # 显示样本分类
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100) # 热图基准颜色
# )# # 将绘制热图部分替换为下列代码
# # 绘制热图=====================================2
# pheatmap(exp_ds,
#          show_rownames = T,
#          show_colnames = T,
#          scale = "row",
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100)
# )# # 将绘制热图部分替换为下列代码=================3
# pheatmap(exp_ds, #表达数据
#          cluster_rows = F,
#          cluster_cols = F,
#          show_rownames = T,
#          show_colnames = T,
#          scale = "row",
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100)
# )# 绘制热图======================================4
pheatmap(exp_ds, show_rownames = T,show_colnames = T,scale = "row", color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100),cutree_cols = 2,cutree_rows = 20
)

5.多分组聚类热图

# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 参数'./resource/dataset.txt',表示载入E:/R/WorkSpace/baimoc/visualization/resource/dataset_heatmap.txt
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
cell_type=c(rep('cell_1',5),rep('cell_2',5))
sample_calss=c(rep('normal',5),rep('cancer',5))
sample_type=c(rep('control',5),rep('case',5))
level = c(1:10)annotation_c <- data.frame(cell_type, sample_calss, sample_type, level)
rownames(annotation_c) <- colnames(exp_ds)gene_class=c(rep('good',30),rep('bad',30))
gene_type=c(rep('fat',20),rep('blood',20),rep('Immunology',20))
annotation_r <- data.frame(gene_class, gene_type)
rownames(annotation_r) <- rownames(exp_ds)
# 绘制热图=====================================
pheatmap(exp_ds, #表达数据cluster_rows = T,#行聚类cluster_cols = T,#列聚类annotation_col =annotation_c, #样本分类数据annotation_row = annotation_r,annotation_legend=TRUE, # 显示样本分类show_rownames = T,# 显示行名show_colnames = T,# 显示列名scale = "row", #对行标准化color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
)

6.分组调色

# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 参数'./resource/dataset.txt',表示载入E:/R/WorkSpace/baimoc/visualization/resource/dataset_heatmap.txt
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
sample_calss=c(rep('Normal',5),rep('Cancer',5))annotation_c <- data.frame(sample_calss)
rownames(annotation_c) <- colnames(exp_ds)gene_type=c(rep('Fat',20),rep('Blood',20),rep('Immunology',20))
annotation_r <- data.frame(gene_type)
rownames(annotation_r) <- rownames(exp_ds)annotation_colors = list(sample_calss=c(Normal='#F8EFBA', Cancer='#FD7272'),gene_type=c(Fat='#f1f2f6', Blood='#ced6e0', Immunology='#57606f'))
# 绘制热图=====================================
pheatmap(exp_ds, #表达数据cluster_rows = T,#行聚类cluster_cols = T,#列聚类annotation_col =annotation_c, #样本分类数据annotation_row = annotation_r,annotation_colors = annotation_colors,annotation_legend=TRUE, # 显示样本分类show_rownames = T,# 显示行名show_colnames = T,# 显示列名scale = "row", #对行标准化color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
)

7. 显示文本

# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 参数'./resource/dataset.txt',表示载入E:/R/WorkSpace/baimoc/visualization/resource/dataset_heatmap.txt
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
sample_calss=c(rep('Normal',5),rep('Cancer',5))annotation_c <- data.frame(sample_calss)
rownames(annotation_c) <- colnames(exp_ds)gene_type=c(rep('Fat',20),rep('Blood',20),rep('Immunology',20))
annotation_r <- data.frame(gene_type)
rownames(annotation_r) <- rownames(exp_ds)annotation_colors = list(sample_calss=c(Normal='#F8EFBA', Cancer='#FD7272'),gene_type=c(Fat='#f1f2f6', Blood='#ced6e0', Immunology='#57606f'))
# # 绘制热图=====================================6
# pheatmap(exp_ds, #表达数据
#          cluster_rows = T,#行聚类
#          cluster_cols = T,#列聚类
#          annotation_col =annotation_c, #样本分类数据
#          annotation_row = annotation_r,
#          annotation_colors = annotation_colors,
#          annotation_legend=TRUE, # 显示样本分类
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
# )# 绘制热图=====================================7
pheatmap(exp_ds, show_rownames = T,show_colnames = T,scale = "row", color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100),display_numbers = T, # 显示数值fontsize_number = 8, # 设置字体大小number_color = '#4a4a4a', #设置颜色number_format = '%.2f' # 设置显示格式
)

8.去除描边

# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 参数'./resource/dataset.txt',表示载入E:/R/WorkSpace/baimoc/visualization/resource/dataset_heatmap.txt
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
sample_calss=c(rep('Normal',5),rep('Cancer',5))annotation_c <- data.frame(sample_calss)
rownames(annotation_c) <- colnames(exp_ds)gene_type=c(rep('Fat',20),rep('Blood',20),rep('Immunology',20))
annotation_r <- data.frame(gene_type)
rownames(annotation_r) <- rownames(exp_ds)annotation_colors = list(sample_calss=c(Normal='#F8EFBA', Cancer='#FD7272'),gene_type=c(Fat='#f1f2f6', Blood='#ced6e0', Immunology='#57606f'))
# # 绘制热图=====================================6
# pheatmap(exp_ds, #表达数据
#          cluster_rows = T,#行聚类
#          cluster_cols = T,#列聚类
#          annotation_col =annotation_c, #样本分类数据
#          annotation_row = annotation_r,
#          annotation_colors = annotation_colors,
#          annotation_legend=TRUE, # 显示样本分类
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
# )# # 绘制热图=====================================7
# pheatmap(exp_ds,
#          show_rownames = T,
#          show_colnames = T,
#          scale = "row",
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100),
#          display_numbers = T, # 显示数值
#          fontsize_number = 8, # 设置字体大小
#          number_color = '#4a4a4a', #设置颜色
#          number_format = '%.2f' # 设置显示格式
# )pheatmap(exp_ds, #表达数据=======================8show_rownames = T,# 显示行名show_colnames = T,# 显示列名scale = "row", #对行标准化color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色border_color = 'NA',
)

9.字体相关

# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 参数'./resource/dataset.txt',表示载入E:/R/WorkSpace/baimoc/visualization/resource/dataset_heatmap.txt
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
sample_calss=c(rep('Normal',5),rep('Cancer',5))annotation_c <- data.frame(sample_calss)
rownames(annotation_c) <- colnames(exp_ds)gene_type=c(rep('Fat',20),rep('Blood',20),rep('Immunology',20))
annotation_r <- data.frame(gene_type)
rownames(annotation_r) <- rownames(exp_ds)annotation_colors = list(sample_calss=c(Normal='#F8EFBA', Cancer='#FD7272'),gene_type=c(Fat='#f1f2f6', Blood='#ced6e0', Immunology='#57606f'))
# # 绘制热图=====================================6
# pheatmap(exp_ds, #表达数据
#          cluster_rows = T,#行聚类
#          cluster_cols = T,#列聚类
#          annotation_col =annotation_c, #样本分类数据
#          annotation_row = annotation_r,
#          annotation_colors = annotation_colors,
#          annotation_legend=TRUE, # 显示样本分类
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
# )# # 绘制热图=====================================7
# pheatmap(exp_ds,
#          show_rownames = T,
#          show_colnames = T,
#          scale = "row",
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100),
#          display_numbers = T, # 显示数值
#          fontsize_number = 8, # 设置字体大小
#          number_color = '#4a4a4a', #设置颜色
#          number_format = '%.2f' # 设置显示格式
# )# pheatmap(exp_ds, #表达数据=======================8
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
#          border_color = 'NA',
# )pheatmap(exp_ds, #表达数据=========================9show_rownames = T,# 显示行名show_colnames = T,# 显示列名scale = "row", #对行标准化color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色fontsize = 10, # 全局字体大小,会被后边设置所覆盖fontsize_row = 8, # 行字体大小fontsize_col = 12, # 列字体大小angle_col = 45, # 设置列偏转角度,可选 270, 0, 45, 90, 315,gaps_row = T
)

10.调整树高

# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 参数'./resource/dataset.txt',表示载入E:/R/WorkSpace/baimoc/visualization/resource/dataset_heatmap.txt
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
sample_calss=c(rep('Normal',5),rep('Cancer',5))annotation_c <- data.frame(sample_calss)
rownames(annotation_c) <- colnames(exp_ds)gene_type=c(rep('Fat',20),rep('Blood',20),rep('Immunology',20))
annotation_r <- data.frame(gene_type)
rownames(annotation_r) <- rownames(exp_ds)annotation_colors = list(sample_calss=c(Normal='#F8EFBA', Cancer='#FD7272'),gene_type=c(Fat='#f1f2f6', Blood='#ced6e0', Immunology='#57606f'))
# # 绘制热图=====================================6
# pheatmap(exp_ds, #表达数据
#          cluster_rows = T,#行聚类
#          cluster_cols = T,#列聚类
#          annotation_col =annotation_c, #样本分类数据
#          annotation_row = annotation_r,
#          annotation_colors = annotation_colors,
#          annotation_legend=TRUE, # 显示样本分类
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
# )# # 绘制热图=====================================7
# pheatmap(exp_ds,
#          show_rownames = T,
#          show_colnames = T,
#          scale = "row",
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100),
#          display_numbers = T, # 显示数值
#          fontsize_number = 8, # 设置字体大小
#          number_color = '#4a4a4a', #设置颜色
#          number_format = '%.2f' # 设置显示格式
# )# pheatmap(exp_ds, #表达数据=======================8
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
#          border_color = 'NA',
# )
#
# pheatmap(exp_ds, #表达数据=========================9
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
#          fontsize = 10, # 全局字体大小,会被后边设置所覆盖
#          fontsize_row = 8, # 行字体大小
#          fontsize_col = 12, # 列字体大小
#          angle_col = 45, # 设置列偏转角度,可选 270, 0, 45, 90, 315,
#          gaps_row = T
# )#============================10
pheatmap(exp_ds, show_rownames = T,show_colnames = T,scale = "row", color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100),treeheight_row = 50,treeheight_col = 30
)

11. 聚类方法选择

# 清空暂存数据
rm(list=ls())
# 载入R包
library(pheatmap)
# 设置工作目录
setwd("D:/R")# 整理数据集====================================
# 参数'./resource/dataset.txt',表示载入E:/R/WorkSpace/baimoc/visualization/resource/dataset_heatmap.txt
dataset <- read.table('resource/dataset_heatmap.txt',header = TRUE, row.names = 1)
# 截取表达矩阵的一部分数据来绘制热图
exp_ds = dataset[c(1:60),c(1:10)]
# 构建样本分类数据
sample_calss=c(rep('Normal',5),rep('Cancer',5))annotation_c <- data.frame(sample_calss)
rownames(annotation_c) <- colnames(exp_ds)gene_type=c(rep('Fat',20),rep('Blood',20),rep('Immunology',20))
annotation_r <- data.frame(gene_type)
rownames(annotation_r) <- rownames(exp_ds)annotation_colors = list(sample_calss=c(Normal='#F8EFBA', Cancer='#FD7272'),gene_type=c(Fat='#f1f2f6', Blood='#ced6e0', Immunology='#57606f'))
# # 绘制热图=====================================6
# pheatmap(exp_ds, #表达数据
#          cluster_rows = T,#行聚类
#          cluster_cols = T,#列聚类
#          annotation_col =annotation_c, #样本分类数据
#          annotation_row = annotation_r,
#          annotation_colors = annotation_colors,
#          annotation_legend=TRUE, # 显示样本分类
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
# )# # 绘制热图=====================================7
# pheatmap(exp_ds,
#          show_rownames = T,
#          show_colnames = T,
#          scale = "row",
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100),
#          display_numbers = T, # 显示数值
#          fontsize_number = 8, # 设置字体大小
#          number_color = '#4a4a4a', #设置颜色
#          number_format = '%.2f' # 设置显示格式
# )# pheatmap(exp_ds, #表达数据=======================8
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
#          border_color = 'NA',
# )
#
# pheatmap(exp_ds, #表达数据=========================9
#          show_rownames = T,# 显示行名
#          show_colnames = T,# 显示列名
#          scale = "row", #对行标准化
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100), # 热图基准颜色
#          fontsize = 10, # 全局字体大小,会被后边设置所覆盖
#          fontsize_row = 8, # 行字体大小
#          fontsize_col = 12, # 列字体大小
#          angle_col = 45, # 设置列偏转角度,可选 270, 0, 45, 90, 315,
#          gaps_row = T
# )
#                        #============================10
# pheatmap(exp_ds,
#          show_rownames = T,
#          show_colnames = T,
#          scale = "row",
#          color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100),
#          treeheight_row = 50,
#          treeheight_col = 30
# )#============================11
pheatmap(exp_ds, show_rownames = T,show_colnames = T,scale = "row", color =colorRampPalette(c("#8854d0", "#ffffff","#fa8231"))(100),clustering_distance_rows = 'euclidean', # 计算聚类间距的算法,可选'correlation', 'euclidean', 'maximum', 'manhattan', 'canberra', 'binary', 'minkowski'clustering_method = 'complete', # 聚类方法, 可选'ward', 'ward.D', 'ward.D2', 'single', 'complete', 'average', 'mcquitty', 'median' or 'centroid'
)

R 生信数据可视化(聚类热图)相关推荐

  1. 怎么让热图显示基因名_R 生信数据可视化 01 | 聚类热图

    一. 示例数据准备 下载:链接:https://pan.baidu.com/s/1_b8swSkWDqIHZi6UwKaspA 提取码:pll7 文件说明 示例数据,其中数据均为虚拟数据,与实际生物学 ...

  2. 生信分析-TBtools绘制热图

    配色 数据标准化 离散色阶 行列注释 面积映射大小 着色指定 准备一个颜色指定的文件,文件有两列列,第一列是gene,第二列是RGB的颜色代码,三个代码用英文逗号隔开 组合热图 圆圈是原始数值,方框颜 ...

  3. 【R语言】——聚类热图行列分组信息注释热图2

    上一期"[R语言]--聚类热图绘制(pheatmap)"介绍了R语言pheatmap包绘制聚类热图的基础代码,本期介绍当需要同时在热图上显示分组情况时,可利用pheatmap包构建 ...

  4. R语言绘制圈图、环形热图可视化基因组实战:展示基因数据比较

    最近我们被客户要求撰写关于基因组的研究报告,包括一些图形和统计输出. 可以使用环状图形展示基因数据比较.可以添加多种图展信息,如热图.散点图等. 本文目标: 可视化基因组数据 制作环形热图 环形热图很 ...

  5. 如何在R语言中建立六边形矩阵热图heatmap可视化

    原文链接:http://tecdat.cn/?p=18879 这是一个六边形热图可视化程序,主要用到的知识RColorBrewer,fields,也就是R中的可视化绘图库(点击文末"阅读原文 ...

  6. 【R语言】——pheatmap包绘制聚类热图1(保姆级教程)

    一.前言 1 热图介绍 通常,热图是对所获得的数据或其他因素进行归一化处理后,用颜色的变化来直观表示不同样本间的变化情况.本质上其是由一个个用预设颜色表示数值大小的小方格组成的数据矩阵,并通过对因子或 ...

  7. r语言热图对列不进行聚类_R语言 Pheatmap 画非聚类 热图

    python pandas 加 R Pheatmap 画非聚类热图 最近需求一个需求图 f9cb530a4fb553c2f42fd8f157cd451.png 上面的annotation部分用作临床注 ...

  8. 聚类热图分类注释_Python可视化matplotlibamp;seborn15-聚类热图clustermap(建议收藏)...

    聚类热图可以简单理解为:使用距离算法将距离相近的东西成簇聚为一类. 本篇使用python中seaborn.clustermap绘制聚类热图(clustermap). 本文将了解到什么? 欢迎随缘关注@ ...

  9. R 数据可视化 02 | 火山图

    R 数据可视化 02 | 火山图 文章目录 R 数据可视化 02 | 火山图 一. 示例数据准备 二. 环境需求 三. 绘制火山图 1. 火山图 2. 标记基因的火山图 四. 保存为图片 五. 详细参 ...

最新文章

  1. nodejs 获取post数据
  2. VMWare12 安装 OSX 10.10
  3. verilog 计数器_HDLBits: 在线学习 Verilog ()
  4. 源码网站都有哪些_一个网站都包括哪些费用?
  5. python zipfile_Python中的zipfile模块使用详解
  6. pyecharts学习(part5)--散点图,地图,词云图
  7. 詹金斯搭建_与詹金斯一起将GitLab中的Gradle项目发布到Artifactory
  8. flush python_带有示例的Python File flush()方法
  9. 帝国cms 多语言_多语言组织应在CMS中寻找的8个功能
  10. 测试化验加工费云服务器文献信息,监管▕ 科研经费使用中的 “红线”和“禁区”典型问题自查清单...
  11. 判断并输出打印前一百个回文素数,每行10个
  12. 尝试登录 VMware vCenter Server 5.5 时,“别名”值为空如何解决
  13. 欧几里得和扩展欧几里得
  14. Linq实战 之 Linq to Sql及Entity Framework操作详解
  15. WordPress初学者入门教程-WordPress的网页
  16. SDF 还能这样用?Cocos Creator 基于 SDF 实现多种 Shader 特效
  17. 基于SSM实现的健身房俱乐部管理系统-JAVA【数据库设计、论文、源码、开题报告】
  18. 永磁同步电机控制系列
  19. java io 对象_JAVA基础知识之IO——对象序列化
  20. 十年后的自己会怎样?

热门文章

  1. python有什么用处案例_用实例解释Python中的继承和多态的概念
  2. 保护隐私的 Structure-from-Motion (SfM)
  3. 相机标定的基本原理与经验分享
  4. React 中报错:Unexpected reserved word ‘await‘
  5. NeuIPS | 蛋白设计新方法?基于图的蛋白生成模型
  6. Android类动态加载技术
  7. NetLogo入门(一)——熟悉操作界面
  8. python如何自定义函数_python基础之函数(自定义函数)
  9. 在线绘图|差异分析——在线做时序分析
  10. 零基础入门学习Python(16)-函数1,Python的乐高积木