当前位置:网站首页>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=边栏推荐
- [leetcode] day90 the element with the smallest K in the binary search tree
- guava 定时任务
- (已解决) npm突然报错 Cannot find module ‘D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js‘
- Scala之偏函数Partial Function
- postgreSQL在windows系统遇到权限否认(permission denied)
- 通过uview让tabbar根据权限显示相应数量的tabbar
- Oppo interview sorting, real eight part essay, abusing the interviewer
- Optimistic and pessimistic affairs
- 使用 Blackbox Exporter 测试网络连通性
- Ahb2apb bridge design (2) -- Introduction to synchronous bridge design
猜你喜欢

vs怎么配置OpenCV?2022vs配置OpenCV详解(多图)

Interviewer: how to never migrate data and avoid hot issues by using sub database and sub table?

解决 Win10 Wsl2 IP 变化问题

Some settings about postfix completion code template in idea

2022 cisp-pte (II) SQL injection

Interviewer: please introduce cache penetration, cache null value, cache avalanche and cache breakdown, which are easy to understand

Quick realization of Bluetooth ibeacn function

mssql如何使用语句导出并删除多表数据

The interviewer of a large front-line factory asked: do you really understand e-commerce order development?

路由器和交换机的区别
随机推荐
Fast realization of Bluetooth communication between MCU and mobile phone
multiprocessing. Detailed explanation of pool
pytorch Default process group is not initialized
Interviewer: how to never migrate data and avoid hot issues by using sub database and sub table?
When there are multiple El select, the selected value is filtered by El select, and the last selected value is filtered by the second El select
[leetcode] day90 the element with the smallest K in the binary search tree
Partial function of Scala
(已解决) npm突然报错 Cannot find module ‘D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js‘
Configuring FTP, enterprise official website, database and other methods for ECS
Yolov6's fast and accurate target detection framework is open source
面试官:用分库分表如何做到永不迁移数据和避免热点问题?
云服务器配置ftp、企业官网、数据库等方法
Scala之偏函数Partial Function
快速实现Thread Mesh组网详解
Easyexcel: read Excel data into the list set
Instance tunnel use
Ahb2apb bridge design (2) -- Introduction to synchronous bridge design
Spark SQL common time functions
获取地址url中的query参数指定参数方法
The number of query results of maxcompute SQL is limited to 1W