蛋白组分析R包DEP的安装过程记录

安装过程是很简单的,就照着官网里面描述的,直接:

if (!requireNamespace("BiocManager", quietly=TRUE))
    install.packages("BiocManager")
BiocManager::install("DEP")

library("DEP")

但是,当我运行下面代码之后,

run_app("LFQ")

报错了: 

载入需要的程辑包:shiny

载入程辑包:‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

……

(此处省略一堆)

……

错误: 'imputeMethods' is not an exported object from 'namespace:MSnbase'

关键的是最后那一句。以前好像遇到过这种情况,大概是因为作者引用的imputeMethods方法所在的包的版本不兼容导致的。我第一个想到的解决方法,就是把对应的包更新为作者指定的版本。不过先不着急,先搜一下看看有没有更加简单的现成的解决方法,发现还真有。

在DEP的github issue里面,有人已经提问了,并且有一个人给出了解决方案:

I have found a solution to the issue. There was an issue of missing imputeMethod() in MSnbase, but no such method is available in the package.
This method is available in the MsCoreUtils package.
So, you can go to the R DEP installed directory and find "app.R" which may be available at path "~/R/x86_64-pc-linux-gnu-library/4.1/DEP/shiny_apps/LFQ".

Edit the app.R file on line no 34 from
choices = c("man", MSnbase::imputeMethods())[1:9],
to this line
choices = c("man", MsCoreUtils::imputeMethods())[1:9],

This will allow the shiny app to run.
Hope this will help.

简单来说,就是改源码。按照上面的方法修改源码之后,成功运行:

 

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值