errors in newCellDataSet Monocle function
1
1
Entering edit mode
6.6 years ago
jonessara770 ▴ 240

Hi I am newbie in using Monocle. Would you please help me with this error? The author said I should not use as.matrix for sparse matrix but the function will not work otherwise.

HSMM <- newCellDataSet(as(expr_matrix, "sparseMatrix"), phenoData = pd1, featureData = fd1, expressionFamily=negbinomial.size()) Error in as(from, "CsparseMatrix") : no method or default for coercing “data.frame” to “CsparseMatrix”

Thanks

single cell RNA-Seq • 3.1k views
ADD COMMENT
0
Entering edit mode
6.5 years ago
Batu ▴ 290

Hello, seems like there is a missing part where you introduce a sparse matrix. Maybe it can be fixed when you change your code like this:

HSMM <- newCellDataSet(as(as.matrix(expr_matrix), "sparseMatrix"), phenoData = pd1, featureData = fd1, expressionFamily=negbinomial.size())
ADD COMMENT

Login before adding your answer.

Traffic: 2688 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6