当前位置:网站首页>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=边栏推荐
- 仙人掌之歌——投石问路(1)
- tracepoint
- Bean拷贝详解
- 2022 le fichier CISP - Pte (i) contient:
- Ahb2apb bridge design (2) -- Introduction to synchronous bridge design
- 如何优雅的写 Controller 层代码?
- POI replacing text and pictures in docx
- 请问如何在网页通过excel文件的形式向后段数据库添加数据
- thrift
- DMU software syntax highlighting VIM setting -- Learning Notes 6
猜你喜欢

thrift

2022 cisp-pte (II) SQL injection

从5秒优化到1秒,系统飞起来了...

2022 CISP-PTE(一)文件包含

Xiaomi Interviewer: let's talk about the proficient Registration Center for three days and three nights

面试官:请你介绍一下缓存穿透、缓存空值、缓存雪崩、缓存击穿的,通俗易懂

Centos7.9 install MySQL 5.7 and set startup

Idea one click log generation

OPPO面试整理,真正的八股文,狂虐面试官

2022 le fichier CISP - Pte (i) contient:
随机推荐
Ahb2apb bridge design (2) -- Introduction to synchronous bridge design
POI export excle
内存屏障今生之Store Buffer, Invalid Queue
面试官:大量请求 Redis 不存在的数据,从而打倒数据库,你有什么方案?
MySQL
[graduation season] graduation is the new beginning of your life journey. Are you ready
从5秒优化到1秒,系统飞起来了...
Instance tunnel use
How to write controller layer code gracefully?
Interviewer: you use Lombok every day. What is its principle? I can't answer
解决 Win10 Wsl2 IP 变化问题
Xiaomi Interviewer: let's talk about the proficient Registration Center for three days and three nights
Optimistic and pessimistic affairs
用XGBoost迭代读取数据集
Cloud-Native Database Systems at Alibaba: Opportunities and Challenges
Process termination (have you really learned recursion? Test your recursion Foundation)
Talk about Domain Driven Design
How to download opencv? How to configure opencv after downloading?
postgreSQL在windows系统遇到权限否认(permission denied)
2022 CISP-PTE(二)SQL注入