安装 pRRophetic 包

作者: 王诗翔 | 来源:发表于2020-04-12 15:52 被阅读0次

该包的 GitHub 项目地址:https://github.com/paulgeeleher/pRRophetic2

从文档看这个包可以用基因表达数据预测表型和药物反应。

这是一个感觉有点古老的包,特别大。

我们先安装它的依赖包:

BiocManager::install(c('sva', 'car', 'genefilter', 'preprocessCore', 'ridge'))

这里 BiocManager 包需要提前安装好,使用 install.packages("BiocManager") 即可。

搞定之后我们需要把这个包下载下来,网页在 https://osf.io/5xvsg/wiki/home/,使用命令:

wget -O pRRophetic_0.5.tar.gz  https://osf.io/dwzce/?action=download

有 500+MB,我把它存在坚果云了,可以使用 https://www.jianguoyun.com/p/DdY8HJAQ6uuVCBjljo4D (微信推文点击原文链接)点击下载。

下载之后进行安装,在 R 控制台运行命令:

install.packages("pRRophetic_0.5.tar.gz", repos = NULL, dependencies = TRUE)

测试

安装好之后我们需要测试下包能不能正常使用,这里就跟着文档做个几步看看。

先载入包和进行设置:

> library(pRRophetic)
Warning message:
replacing previous import ‘car::Anova’ by ‘genefilter::Anova’ when loading ‘pRRophetic’ 
> set.seed(1234)

载入数据,画个图看看:

> data("bortezomibData")
> pRRopheticQQplot("Bortezomib")

五折交叉验证,这一点我的电脑有点 hold 不住:

> cvOut <- pRRopheticCV("Bortezomib", cvFold=5, testExprData=exprDataBortezomib)

 11683  gene identifiers overlap between the supplied expression matrices... 
 
Found2batches
Adjusting for0covariate(s) or covariate level(s)
Standardizing Data across genes
Fitting L/S model and finding priors
Finding parametric adjustments
Adjusting the Data


1 of 5 iterations complete.
2 of 5 iterations complete.
3 of 5 iterations complete.
4 of 5 iterations complete.
5 of 5 iterations complete.

画个结果图:

> plot(cvOut)

一般般的效果:

模型结果还是显著的:

> summary(cvOut)

Summary of cross-validation results:

Pearsons correlation: 0.4 , P =  4.45287272844977e-12 
R-squared value: 0.16
Estimated 95% confidence intervals: -4.23, 4.23
Mean prediction error: 1.64

有了模型就可以做预测了:

> predictedPtype <- pRRopheticPredict(exprDataBortezomib, "Bortezomib",
+                                     selection=1)

 11683  gene identifiers overlap between the supplied expression matrices... 
 
Found2batches
Adjusting for0covariate(s) or covariate level(s)
Standardizing Data across genes
Fitting L/S model and finding priors
Finding parametric adjustments
Adjusting the Data


 2324 low variabilty genes filtered.
Fitting Ridge Regression model... Done

Calculating predicted phenotype...Done

其他的我就不说了,感兴趣的读者可以把文档代码过一遍。这个是一个读者的问题,但我自己走下来发现没有难点,可能就这个包有点大。如果读者不会安装 R 包建议看下我在教程里写的有关 R 包安装的内容:https://shixiangwang.gitee.io/geek-r-tutorial/

相关文章

  • 安装 pRRophetic 包

    该包的 GitHub 项目地址:https://github.com/paulgeeleher/pRRopheti...

  • 基因相关性+药物敏感性分析

    ①高低风险组某基因表达量差异分析 ②药物敏感性分析 安装 pRRophetic 包,首先要安装它的依赖包 依赖包安...

  • 01.初始化环境

    初始化项目 安装需要的包 安装基础包 安装和配置babel 安装处理css包 安装处理html包 安装处理图片的包

  • 2017-12-29 技术笔记

    centos 安装包类型 yum包安装rpm包安装源码包安装 rpm安装的几个命令 yum安装的几个命令 cent...

  • 构建CentOS httpd RPM包

    安装依赖包 下载apr及httpd源码包 编译apr rpm包 安装apr包 编译http包 安装http包

  • npm包管理工具使用指南(npm使用教程)

    以下使用package表示包名称 更新npm 全局安装包 本地安装(局部安装) 查看已经安装的包 查看包信息 安装...

  • python之munch使用

    一、包安装 1. 检查包是否已经安装 说明munch包未安装 2. 安装munch包 3. 验证安装结果 二、方法...

  • Ubuntu16.04安装nfs的两种方式

    一、安装包安装二、docker安装 一、安装包安装。 步骤:安装相关的包,配置,挂载。 1、安装 sudo apt...

  • 学习R包

    安装和加载R包 1. 镜像设置 2. 安装 R包安装命令是install.packages(“包”) 安装的包...

  • R包的4种安装方式

    R包的4种安装方式 在线安装 安装bioconductor的包 离线安装 命令安装 修改R包的加载路径

网友评论

    本文标题:安装 pRRophetic 包

    本文链接:https://www.haomeiwen.com/subject/drtbmhtx.html