errors in newCellDataSet Monocle function
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
• 3,687 views
•
link
1 answer
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())
• 1 views
•
link
Log in to answer this question.