r包调用legend函数_在Julia语言中调用R包”ComplexHeatmap“进行画图

本文介绍了如何在Julia语言环境中调用R包ComplexHeatmap来绘制复杂的热图。通过读取数据并设置各种颜色映射,创建了多个热图层,包括甲基化、表达量、基因类型等信息,并展示了详细的绘图配置和注释设置。
摘要由CSDN通过智能技术生成

在这里我打算复现一下ComplexHeatmap说明文件里的一个热图。R的代码如下:

res_list = readRDS("meth.rds")

type = res_list$type

mat_meth = res_list$mat_meth

mat_expr = res_list$mat_expr

direction = res_list$direction

cor_pvalue = res_list$cor_pvalue

gene_type = res_list$gene_type

anno_gene = res_list$anno_gene

dist = res_list$dist

anno_enhancer = res_list$anno_enhancer

column_tree = hclust(dist(t(mat_meth)))

column_order = column_tree$order

library(circlize)

meth_col_fun = colorRamp2(c(0, 0.5, 1), c("blue", "white", "red"))

direction_col = c("hyper" = "red", "hypo" = "blue")

expr_col_fun = colorRamp2(c(-2, 0, 2), c("green", "white", "red"))

pvalue_col_fun = colorRamp2(c

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值