孟德尔随机化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. R语言随机研究工具包(1)---friendly2MR

    2024-06-12 09:08:01       40 阅读
  2. Presto集群安装部署

    2024-06-12 09:08:01       44 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-12 09:08:01       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-12 09:08:01       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-12 09:08:01       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-12 09:08:01       18 阅读

热门阅读

  1. 前端框架是什么

    2024-06-12 09:08:01       4 阅读
  2. Apache Hadoop的核心组成及其架构

    2024-06-12 09:08:01       7 阅读
  3. AI生成沉浸式3D世界(空间照片/视频)

    2024-06-12 09:08:01       5 阅读
  4. PHP 中如何高效地处理大规模数据的排序?

    2024-06-12 09:08:01       8 阅读
  5. 【深度学习】【NLP】Bert理论,代码

    2024-06-12 09:08:01       6 阅读
  6. Python中实现高效缓存机制的探索与实践

    2024-06-12 09:08:01       8 阅读
  7. Web前端教程165:深入探索Web前端技术的奥秘

    2024-06-12 09:08:01       8 阅读
  8. Unity3D MMORPG背包系统数据获取与通讯详解

    2024-06-12 09:08:01       7 阅读
  9. 设计模式之外观模式

    2024-06-12 09:08:01       9 阅读