monocle error at orderCells
Entering edit mode
444579004 • 0
Last seen 2.4 years ago

hi! I use monocle to make a pseudotime anlysis with my single cell sequencing data. After dimension reduction and cluster, when I try to order cells using the function "orderCells",the error occurred. The error is: "Error in graph.adjacency.dense(adjmatrix, mode = mode, weighted = weighted, : long vectors not supported yet: ../../src/include/Rinlinedfuns.h:519"

The code i use is showed below: library(dplyr) library(Seurat) library(monocle) library(Biobase) library(knitr) library(reshape2) library(ggplot2) library(HSMMSingleCell) library( t <- readRDS(file = "/home/zhangs/t20190829.rds")

import our data as a celldataset

the matrix including data of genes and cells

matrix <- as.matrix(t@data)

the data of cells

pd <- new('AnnotatedDataFrame', data =

the data of genes

fdata <- data.frame(geneshortname = row.names(matrix), row.names = row.names(matrix)) fd <- new('AnnotatedDataFrame', data = fdata)

whole dataset

monocle <- newCellDataSet(matrix, phenoData = pd, featureData = fd, expressionFamily=negbinomial.size())

this row is to decide the distribution of data

look at the cell data and change the name of upstream cluster information

head(pData(monocle)) names(pData(monocle))[names(pData(monocle)) == "res.1"] = "seucluster"

this step will help us with differentied gene expression

monocle <- estimateSizeFactors(monocle) monocle <- estimateDispersions(monocle) monocle <- detectGenes(monocle, minexpr = 0.1) expressedgenes <- row.names(subset(fData(monocle), numcellsexpressed >= 10))

disptable <- dispersionTable(monocle) orderinggenes <- subset(disptable, meanexpression >= 0.5 & dispersionempirical >= 1 * dispersionfit)$geneid monocle <- setOrderingFilter(monocle, orderinggenes) plotorderinggenes(monocle) plotpcvarianceexplained(monocle, returnall = F) monocle <- reduceDimension(monocle, maxcomponents = 2, numdim = 10, reductionmethod = 'tSNE', verbose = T) monocle <- clusterCells(monocle) plotcellclusters(monocle, 1, 2, colorby= "Cluster", showcellnames = T, cellsize = 0.5) difftestres <- differentialGeneTest(monocle[expressedgenes,], fullModelFormulaStr="~Cluster") monocleorderinggenes <- row.names(difftestres)[order(difftestres$qval)][1:1000]

monocle <- setOrderingFilter(monocle, orderinggenes = monocleordering_genes)

monocle <- reduceDimension(monocle, method = 'DDRTree')

monocle <- orderCells(monocle)

plotcelltrajectory(monocle, color_by = "Hours")

monocle <- setOrderingFilter(monocle, unsupclusteringgenes$geneid) orderinggenes <- row.names (subset(difftestres, qval < 0.01)) monocle <- setOrderingFilter(monocle, orderinggenes) plotordering_genes(monocle)

monocle <- reduceDimension(monocle, maxcomponents=2) monocle <- orderCells(monocle) colnames(pData(monocle)) plotcelltrajectory(monocle, colorby="Cluster")

I have never met this error before,can anyone used to this packages tell me what it means and how can i fix it?

scRNA monocle packages Tutorial • 1.4k views
Entering edit mode

It looks from the developer's website that the Bioconductor version of Monocle (aka Monocle 2) is deprecated, and you should move to the newer version Monocle 3:


Login before adding your answer.

Traffic: 275 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6