-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Hi,
I am trying to use cell router for trajectory analysis with Seurat object. Here are the commands and the errors that I am getting.
intestinal_organoids_corrected_metadata <- intestinal_organoids_corrected@meta.data
intestinal_organoids_corrected_data <- as.data.frame(as.matrix(intestinal_organoids_corrected@data))
intestinal_organoids_corrected_cellrouter <- CellRouter(rawdata=as.data.frame(intestinal_organoids_corrected_data), min.cells=0,min.genes=0)
intestinal_organoids_corrected_cellrouter <- addInfo(intestinal_organoids_corrected_cellrouter, metadata = intestinal_organoids_corrected_metadata, colname = 'res.0.9', metadata.column='res.0.9')
intestinal_organoids_corrected_cellrouter <- addInfo(intestinal_organoids_corrected_cellrouter, metadata = intestinal_organoids_corrected_metadata, colname = 'class', metadata.column='class')
plotReducedDimension(intestinal_organoids_corrected_cellrouter, reduction.type = 'tsne', dims.use =
c(1,2), annotation = "res.0.9", annotation.color ='res.0.9_color', showlabels = TRUE, 4.5, 3.5,
filename='intestinal_organoids_corrected_tsne_seurat_clusters_cellrouter.pdf')
Error in names(x) <- value :
'names' attribute [2] must be the same length as the vector [0]
#for trajectory analysis:
intestinal_organoids_corrected_cellrouter <- buildKNN(intestinal_organoids_corrected_cellrouter, k = 10, column.ann = 'res.0.9',
num.pcs = 20, sim.type = 'jaccard')
Error in dist(matrix) :
Can only handle data frames, vectors, matrices, and lists!
plotKNN(cellrouter, reduction.type = 'tsne', column.ann = 'res.0.9',
column.color = 'res.0.9_color', width = 5, height = 4,
filename='results/knn_tsne_original_clusters.pdf')
Appreciate your help.
Thanks,
Bibaswan