m0_72923218 2022-07-23 09:31 采纳率: 0%
浏览 3110

使用monocle进行拟时序分析时,在细胞排序orderCells时报错怎么办

问题:
在用R语言中的monocle进行拟时序分析时,在画拟时许图的前一步细胞排序时报错,怎么办?
问题相关代码:
**sc_cds2 <- orderCells(sc_cds2)**
运行结果及报错内容
Error in if (class(projection) != "matrix") projection <- as.matrix(projection) :
the condition has length > 1
In addition: Warning message:
In graph.dfs(dp_mst, root = root_cell, neimode = "all", unreachable = FALSE, :
Argument neimode' is deprecated; use mode' instead

前边的步骤也报错过,就是建立monocle的对象newCellDataSet,也报错过,后来问了别人是因为matrix构建的不对,代码如下
sc_cds_2 <- newCellDataSet(matrix, phenoData = pd,featureData =fd,expressionFamily = negbinomial.size(),lowerDetectionLimit=0.01)

把matrix<-as.sparse(mmt@assays$RNA@counts)
改成matrix<-as.sparse(mmt@assays$RNA@counts)
后就好了。据说因为R版本的问题,函数的功能有些变动。

  • 写回答

7条回答 默认 最新

  • weixin_41631339 2022-12-02 00:30
    关注

    I attach a modified version of Monocle (2.26.0) according to the discussion. One can install it locally. I hope this one helps somebody.

    https://github.com/cole-trapnell-lab/monocle-release/files/10134172/monocle_2.26.0.tar.gz

    评论

报告相同问题?

问题事件

  • 创建了问题 7月23日