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

安装成功:

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

相关推荐
wydaicls3 分钟前
十一.C++ 类 -- 面向对象思想
开发语言·c++
Biomamba生信基地36 分钟前
R语言基础| 下载、安装
开发语言·r语言·生信·医药
姜君竹37 分钟前
QT的工程文件.pro文件
开发语言·c++·qt·系统架构
奇树谦41 分钟前
使用VTK还是OpenGL集成到qt程序里哪个好?
开发语言·qt
VBA63371 小时前
VBA之Word应用第三章第十节:文档Document对象的方法(三)
开发语言
老胖闲聊1 小时前
Python Rio 【图像处理】库简介
开发语言·图像处理·python
码界奇点1 小时前
Python Flask文件处理与异常处理实战指南
开发语言·python·自然语言处理·flask·python3.11
贩卖纯净水.2 小时前
浏览器兼容-polyfill-本地服务-优化
开发语言·前端·javascript
k要开心2 小时前
C++概念以及基础框架语法
开发语言·c++
开发者工具分享2 小时前
如何应对敏捷转型中的团队阻力
开发语言