Hi,
I upgraded my Seurat version to 2.3.0 and I was trying out the cells.highlight param added to DimPlot. Its a very simple tSNE plot.
cells=rownames([email protected])[1:200]
TSNEPlot(object = scrna,pt.size = 2.5,cells.highlight=cells,cols.use=c("red","lightgray"))
It works great. But is there some way to change the color ? I tried cols.use parameter and I am getting this error
Error in DimPlot(object = object, reduction.use = "tsne", cells.use = cells.use, :
formal argument "cols.use" matched by multiple actual arguments
Also, is there a way to highlight the cells in Featureplot in case you want to look at cells that fall within a UMI range that might not very easily distinguishable with the color gradient ?
Hi Aproova,
For the TSNEPlot error, pass the colors you want as colors.use, not cols.use
data('pbmc_small')
cols <- sample(x = colors(), size = length(x = unique(x = pbmc_small@ident)))
TSNEPlot(object = pbmc_small, colors.use = cols)
For the FeaturePlot question, you can't do that directly within FeaturePlot. However, if you want to see only cells that fall within a certain range for nUMI, you can achieve this by getting the cells that fall within the range of UMI counts that you desire and highlighting said cells with DimPlot
data('pbmc_small')
cells.use <- [email protected][which(x = [email protected]$nUMI > 200 & [email protected]$nUMI < 300)]
DimPlot(object = pbmc_small, reduction.use = 'tsne', cells.highlight = cells.use)
Most helpful comment
Hi Aproova,
For the TSNEPlot error, pass the colors you want as
colors.use, notcols.useFor the FeaturePlot question, you can't do that directly within FeaturePlot. However, if you want to see only cells that fall within a certain range for nUMI, you can achieve this by getting the cells that fall within the range of UMI counts that you desire and highlighting said cells with DimPlot