当前位置: 首页 > news >正文

ilr normalize isometric log-ratio transformation

visium_heart/st_snRNAseq/05_colocalization/create_niches_ct.R at 5b30c7e497e06688a8448afd8d069d2fa70ebcd2 · saezlab/visium_heart (github.com) 更多内容,关注微信:生信小博士

The ILR (Isometric Log-Ratio) transformation is used in the analysis of compositional data. Any given observation is a set of positive values summing to unity, such as the proportions of chemicals in a mixture or proportions of total time spent in various activities. The sum-to-unity invariant implies that although there may be k≥2�≥2 components to each observation, there are only k−1�−1 functionally independent values. (Geometrically, the observations lie on a k−1�−1-dimensional simplex in k�-dimensional Euclidean space Rk��. This simplicial nature is manifest in the triangular shapes of the scatterplots of simulated data shown below.)

Typically, the distributions of the components become "nicer" when log transformed. This transformation can be scaled by dividing all values in an observation by their geometric mean before taking the logs.

ilr数据输入要求:

 baseILR <- ilrBase(x = integrated_compositions,method = "basic")head(  baseILR)cell_ilr <- as.matrix(ilr(integrated_compositions, baseILR))colnames(cell_ilr) <- paste0("ILR_", 1:ncol(cell_ilr))print(head(cell_ilr)[,1:9])

 

 umap图

comp_umap <- umap(cell_ilr, n_neighbors = 30, n_epochs = 1000) %>%as.data.frame() %>%mutate(row_id = rownames(cell_ilr))head(atlas_meta)comp_umap %>%left_join(atlas_meta, by = c("row_id")) %>%ggplot(aes(x = V1, y = V2, color = opt_clust_integrated)) +ggrastr::geom_point_rast(size = 0.3) +theme_classic() +xlab("UMAP1") +ylab("UMAP2")+theme(legend.text = element_text(size = 14))

 
comp_umap %>%
  left_join(atlas_meta, by = c("row_id")) %>%
  ggplot(aes(x = V1, y = V2, 
             color = orig.ident)) +
  ggrastr::geom_point_rast(size = 0.3) +
  theme_classic() +
  xlab("UMAP1") +
  ylab("UMAP2")+
  
  theme(legend.text = element_text(size = 14))

http://www.lryc.cn/news/204474.html

相关文章:

  • el表单的简单查询方法
  • 【USRP】通信总的分支有哪些
  • 关于服务器网络代理解决方案(1024)
  • Linux下 /etc/shadow内容详解
  • Go学习第二章——变量与数据类型
  • 【剑指Offer】:循环有序列表的插入(涉及链表的知识)
  • 【Django 04】Django-DRF(ModelViewSet)
  • ubuntu命令
  • C++学习之强制类型转换
  • 在Linux中,可以使用以下命令来查看进程
  • 【算法训练-动态规划 一】【应用DP问题】零钱兑换、爬楼梯、买卖股票的最佳时机I、打家劫舍
  • 2023年中职组“网络安全”赛项云南省竞赛任务书
  • Modeling Deep Learning Accelerator Enabled GPUs
  • 《动手学深度学习 Pytorch版》 9.5 机器翻译与数据集
  • 网络入门基础
  • Towards a Rigorous Evaluation of Time-series Anomaly Detection(论文翻译)
  • 理解Python装饰器
  • VR智慧景区,为游客开启智慧旅游新时代
  • 蓝桥杯 Java 青蛙过河
  • 雷达图应该如何去绘制?
  • 1024 蓝屏漏洞攻防战(第十九课)
  • 短视频矩阵系统软件源码
  • 内网穿透的应用-如何通过TortoiseSVN+内网穿透,实现公网提交文件到内网SVN服务器?
  • 有没有PC端的配音软件推荐?(免下载)
  • clickhouse
  • linux下创建文件夹软链接
  • 常用的工具网站
  • 号外!百度Comate代码助手全新上线SaaS服务 - 免费申请试用+深入教程解读!
  • AUTOSAR通信篇 - CAN网络通信(七:Nm)
  • CentOS 7 中安装Kafka