当前位置:网站首页>R 语言并行计算 spearman 相关系数,加快共现网络(co- occurrence network)构建速度
R 语言并行计算 spearman 相关系数,加快共现网络(co- occurrence network)构建速度
2022-06-27 06:51:00 【Mrrunsen】
共现(co-occurrence network)网络分析日益成为微生物生态学分析中重要的
组成部分,成为目前文章发表的热点技术。利用 spearman 相关性分析是构建共现
网络的重要方法,但由于 OTU table 往往有成千上万行,用 R 自带的 corr.test()函
数计算较为费时,严重制约我们的分析速度。对 spearman 相关性分析进行并行化
运行可大大节省计算时间,为此我们手写了 spearman 相关性分析函数来实现并行
化运行。为方便讲解,本文以 OTU table 数据为例,对 OTU 进行两两 spearman 相
关 性 分 析 , 获 得 相 关 系 数 r 和 显 著 性 p 值 。 我 们 将 自 己 手 写 的 函 数
network_construct()与 psych 包中的 corr.test()函数两者运行时间和计算的结果进行
了比较,我们自己的函数 network_construct()计算时间远远少于 corr.test()函数且结
果相同,具体的 R 代码见下文
library(psych)
system.time(corr.test(otu[,1:500],use=边栏推荐
- HTAP Quick Start Guide
- 专业四第二周自测
- Interviewer: how to never migrate data and avoid hot issues by using sub database and sub table?
- IDEA连接数据库报错
- 【LeetCode】Day90-二叉搜索树中第K小的元素
- Partial function of Scala
- Vs how to configure opencv? 2022vs configuration opencv details (multiple pictures)
- vs怎么配置OpenCV?2022vs配置OpenCV详解(多图)
- Process termination (have you really learned recursion? Test your recursion Foundation)
- 2022 CISP-PTE(二)SQL注入
猜你喜欢

Coggle 30 Days of ML 7月竞赛学习

解决 Win10 Wsl2 IP 变化问题

Solve the problem of win10 wsl2 IP change

OpenCV怎么下载?OpenCV下载后怎么配置?

面试官:大量请求 Redis 不存在的数据,从而打倒数据库,你有什么方案?

【软件工程】山东大学软件工程复习提纲

内存屏障今生之Store Buffer, Invalid Queue

From 5 seconds to 1 second, the system flies

The fourth question of the 299th weekly match 6103 Minimum fraction of edges removed from the tree

MPC control of aircraft wingtip acceleration and control surface
随机推荐
webscoket 数据库监听
NoViableAltException([email protected][2389:1: columnNameTypeOrConstraint : ( ( tableConstraint ) | ( columnNameT
Redis cache penetration, cache breakdown, cache avalanche
SQL考勤查询间隔一小时
Caldera installation and simple use
2022 cisp-pte (II) SQL injection
Tidb database Quick Start Guide
用XGBoost迭代读取数据集
Tar: /usr/local: cannot find tar in the Archive: due to the previous error, it will exit in the last error state
winow10安装Nexus nexus-3.20.1-01
thrift
multiprocessing. Detailed explanation of pool
【Kevin三连弹之三】Rust真的比C慢吗?进一步分析queen微测评
一個人管理1000臺服務器?這款自動化運維工具一定要掌握
程序人生 - 程序员三十五岁瓶颈你怎么看?
【编译原理】山东大学编译原理复习提纲
Thesis reading skills
2022 cisp-pte (I) document contains
Rust中的Pin详解
MPC control of aircraft wingtip acceleration and control surface