孟德尔随机化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")

安装成功:

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

相关推荐
another heaven18 小时前
【Qt VS2022调试时无法查看QString等Qt变量信息】解决方法
开发语言·qt
A黄俊辉A18 小时前
axios+ts封装
开发语言·前端·javascript
杨福瑞19 小时前
C语⾔内存函数
c语言·开发语言
eqwaak019 小时前
科技信息差(9.12)
开发语言·python·科技·量子计算
axban19 小时前
QT M/V架构开发实战:QStringListModel介绍
开发语言·数据库·qt
刘媚-海外19 小时前
Go语言开发AI应用
开发语言·人工智能·golang·go
勇敢牛牛_20 小时前
使用Rust实现服务配置/注册中心
开发语言·后端·rust·注册中心·配置中心
catchadmin20 小时前
PHP serialize 序列化完全指南
android·开发语言·php
hzzzzzo020 小时前
微服务网关全解析:从入门到实践
java·开发语言·微服务
slandarer20 小时前
MATLAB | 这是屎吗?抱歉打错了,这是什么?
开发语言·matlab