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

安装成功:

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

相关推荐
光而不耀@lgy4 分钟前
C++初登门槛
linux·开发语言·网络·c++·后端
lkbhua莱克瓦249 分钟前
用C语言实现——一个中缀表达式的计算器。支持用户输入和动画演示过程。
c语言·开发语言·数据结构·链表·学习方法·交友·计算器
Mr__Miss13 分钟前
面试踩过的坑
java·开发语言
啊丢_15 分钟前
C++——Lambda表达式
开发语言·c++
Chh07151 小时前
《R语言SCI期刊论文绘图专题计划》大纲
开发语言·r语言
Yeats_Liao1 小时前
Go 语言 TCP 端口扫描器实现与 Goroutine 池原理
开发语言·tcp/ip·golang
Thomas_YXQ1 小时前
Unity3D IK解算器技术分析
开发语言·搜索引擎·unity·全文检索·unity3d·lucene
liuweidong08022 小时前
【Pandas】pandas DataFrame rsub
开发语言·python·pandas
whoarethenext2 小时前
c++的jsoncpp使用
开发语言·c++·jsoncpp
niuTaylor2 小时前
Linux驱动开发快速上手指南:从理论到实战
linux·运维·开发语言·驱动开发·c#