Monocle中的plot_genes_branched_pseudotime报错

Monocle中的plot_genes_branched_pseudotime报错exprs_data

代码:plot_genes_branched_pseudotime(CDS[‘Sell’,],
branch_point=1,
color_by=“cluster”,
ncol=2)
报错:Error in if (nrow(ancestor_exprs) == 1) exprs_data <- t(as.matrix(ancestor_exprs)) else exprs_data <- ancestor_exprs: argument is of length zero
Traceback:

plot_genes_branched_pseudotime(CDS[“Sell”, ], branch_point = 1,
. color_by = “cluster”, ncol = 2)
buildBranchCellDataSet(cds = cds, branch_states = branch_states,
. branch_point = branch_point, branch_labels = branch_labels,
. progenitor_method = “duplicate”, …)
可能是输入了单个基因名字,建议输入双数个feature,可解决报错
————————————————
Monocle 2 中 orderCells () 报错问题

1. download monocle from https://www.bioconductor.org/packages/3.15/bioc/src/contrib/Archive/monocle/

2. decompress the package 'monocle_2.24.0.tar.gz', and get a 'monocle' folder.

3. open the folder 'monocle/R', change the code in function 'project2MST()' in the 'order_cell.R' file: change from

if(class(projection) != 'matrix')
projection <- as.matrix(projection)

to

projection <- as.matrix(projection)

4. save the 'order_cell.R' file.

5. windows 安装 7-Zip 软件,先压缩成tar文件,再压缩成gz文件。

6. 安装monocle_2.24.0.tar.gz软件。

7.Done. and managed to run the 'orderCells(cds)'.

注意!! 在第5步,压缩的时候要选择替换,不然一个tar.gz里会有两个monocle ,会安装不成功

你可能感兴趣的:(Monocle中的plot_genes_branched_pseudotime报错)