孟德尔随机化R包:TwoSampleMR和MR-PRESSO安装

1. 孟德尔随机化R包

看一篇文章,介绍孟德尔随机化分析,里面推荐了这两个R包,安装了解一下:

Methods:Genome-wide association study (GWAS) data for autoimmune diseases and AMD were obtained from the IEU Open GWAS database and the FinnGen consortium. A series of stringent SNP filtering steps was applied to ensure the reliability of the genetic instruments. MR analyses were conducted using the TwoSampleMR and MR-PRESSO packages in R. The inverse-variance weighted (IVW) method served as the primary analysis, complemented by multiple supplementary analyses and sensitivity tests.

2. R版本为4.3.1

3. 安装TwoSampleMR

最新的版本为0.6.4(2024-06-12)。下面介绍三种安装方法:

第一种:

该包没有在CRAN中,在github中,可以通过下面命令安装。

复制代码
# install.packages('devtools')
devtools::install_github("MRCIEU/TwoSampleMR")

第二种:

用remote包进行安装:

复制代码
install.packages("remotes")
remotes::install_github("MRCIEU/TwoSampleMR")

第三种:

也可以直接安装:

复制代码
install.packages("TwoSampleMR", repos = c("https://mrcieu.r-universe.dev", "https://cloud.r-project.org"))

如果让选择是否更新,可以选择1,全部更新。

然后就是漫长的等待,把每个依赖包都更新安装好:

安装成功,载入试试:

搞定。

4. 安装TwoSampleMR

安装代码:

复制代码
devtools::install_github("rondolab/MR-PRESSO")

安装成功:

后面介绍一下这两个包的使用方法。

相关推荐
麦兜*1 小时前
Swift + Xcode 开发环境搭建终极指南
开发语言·ios·swiftui·xcode·swift·苹果vision pro·swift5.6.3
萧鼎2 小时前
Python pyzmq 库详解:从入门到高性能分布式通信
开发语言·分布式·python
艾伦~耶格尔3 小时前
【集合框架LinkedList底层添加元素机制】
java·开发语言·学习·面试
yujkss3 小时前
Python脚本每天爬取微博热搜-终版
开发语言·python
yzx9910133 小时前
小程序开发APP
开发语言·人工智能·python·yolo
啊阿狸不会拉杆4 小时前
《算法导论》第 32 章 - 字符串匹配
开发语言·c++·算法
烟锁池塘柳04 小时前
【R语言】R 语言中 gsub 与正则表达式详解(含 POSIX 与 Perl 风格实例)
正则表达式·r语言·perl
武当豆豆5 小时前
C++编程学习(第25天)
开发语言·c++·学习
-Xie-7 小时前
Maven(二)
java·开发语言·maven
mftang7 小时前
Python可视化工具-Bokeh:动态显示数据
开发语言·python