简体   繁体   English

基因表达和蛋白质表达之间具有Spearman相关系数的热图

[英]Heatmap with Spearman correlation coefficient between gene expression and protein expression

I am interested to correlate 2 variables like gene expression (gene symbols and fold change) and protein expression (gene symbols and fold change) using Spearman correlation coefficient analysis as depicted in Fig. A ( Int. J. Mol. Sci. 2018, 19 (12), 3836; https://doi.org/10.3390/ijms19123836 ).我有兴趣使用 Spearman 相关系数分析来关联 2 个变量,如基因表达(基因符号和倍数变化)和蛋白质表达(基因符号和倍数变化),如图 A 所示(Int. J. Mol. Sci. 2018, 19 (12), 3836; https://doi.org/10.3390/ijms19123836 )。 I searched on the net to see the code for correlation but these codes give the heatmaps with Spearman correlation with same X and Y axis variables as can be seen in Fig. B. ( ggplot2: Quick correlation matrix heatmap - R software and data visualization - Easy Guides - Wiki - STHDA. I need a heatmap showing variables from gene expression data on 1 axis (var 1) and protein expression on other axis (var 2). Thanks in advance:! Image link: https://community.rstudio.com/t/heatmap-with-correlation-coefficient/100543我在网上搜索以查看相关代码,但这些代码给出了具有 Spearman 相关性的热图,具有相同的 X 和 Y 轴变量,如图 B 所示。 Easy Guides - Wiki - STHDA。我需要一个热图,显示 1 轴 (var 1) 上的基因表达数据和其他轴 (var 2) 上的蛋白质表达的变量。提前致谢:!图片链接: https://community.rstudio .com/t/heatmap-with-correlation-coefficient/100543

Would this work for you?这对你有用吗? The example is taken from Introduction to the hearmaply package.该示例取自对 heartmaply package 的介绍。

library(dplyr)
library(heatmaply)
library(dendextend)

x  <- mtcars %>%
  head() %>%
  as.matrix()

row_dend  <- x %>% 
  dist %>% 
  hclust %>% 
  as.dendrogram %>%
  set("branches_k_color", k = 3) %>% 
  set("branches_lwd", c(1, 3)) %>%
  ladderize
# rotate_DendSer(ser_weight = dist(x))
col_dend  <- x %>% 
  t %>% 
  dist %>% 
  hclust %>% 
  as.dendrogram %>%
  set("branches_k_color", k = 2) %>% 
  set("branches_lwd", c(1, 2)) %>%
  ladderize
#    rotate_DendSer(ser_weight = dist(t(x)))

heatmaply(
  percentize(x),
  Rowv = row_dend,
  Colv = col_dend
)

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何计算Spearman对40000个排列的差异表达数据的相关性的p值和相关系数? - How to calculate p value and correlation coefficient for Spearman’s correlation of differential expression data with 40000 permutations? 基因表达数据中基因的皮尔逊相关性 - pearson correlation for genes in gene expression data 基因表达中的相关病例与对照 - Correlation Case vs Control in gene expression R中的加权Spearman等级相关系数 - Weighted Spearman rank correlation coefficient in R 来自R中微阵列表达数据的基因子集的热图 - Heatmap of gene subset from microarray expression data in R 如何通过计算相关系数来缩小基因表达矩阵的维数? - How to reduce dimension of gene expression matrix by calculating correlation coefficients? 如何通过相关值正确过滤出基因表达矩阵? - How to correctly filter out gene expression matrix by correlation value? 如何将spearman相关p值与相关系数一起添加到ggpairs? - How to add the spearman correlation p value along with correlation coefficient to ggpairs? 在 plot 中添加 Spearman 相关系数和 RMSE,并更改 plot 大小 - Add Spearman Correlation Coefficient and RMSE in a plot, and change the plot size 如何在R中将函数应用于Spearman秩相关系数? - How to apply a function for Spearman's rank correlation coefficient in R?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM