rezakj / iCellR

Single (i) Cell R package (iCellR) is an interactive R package to work with high-throughput single cell sequencing technologies (i.e scRNA-seq, scVDJ-seq, scATAC-seq, CITE-Seq and Spatial Transcriptomics (ST)).
120 stars 19 forks source link

Coloring not working for TSNE and UMAP plots for option color by = "Cluster" #6

Closed IkjotSidhu closed 4 years ago

IkjotSidhu commented 4 years ago

Coloring by the cluster is not working for umap and tsne plots-

> cluster.plot(my.obj,plot.type = "umap",interactive = F)

Error: Aesthetics must be either length 1 or the same as the data (36689): colour

> cluster.plot(my.obj,plot.type = "umap",interactive = F,col.by="clusters")

Error: Aesthetics must be either length 1 or the same as the data (36689): colour

rezakj commented 4 years ago

Run clustering and UMAP again and see if you get an error. Also update iCellR from CRAN.

library(devtools)
install_github("rezakj/iCellR")

Then:

# quick example 
library(Rphenograph)
my.obj <- run.phenograph(my.obj, k = 100, dims = 1:10)

my.obj <- run.umap(my.obj, dims = 1:10, method = "umap-learn") 

Let me know if this didn't help.

IkjotSidhu commented 4 years ago

I am getting an error while trying to install another required package called - digest.

IkjotSidhu commented 4 years ago

image

I think that I found the cause of the error. It seems that even after performing batch correction using MNN and Running dimensionality reduction, the object does not contain cluster information.

rezakj commented 4 years ago

Yes, you would need to run clustering after batch correction.