Search code examples
rseurat

FeaturePlot of Seurat Metadata


Say I have a Seurat object called seur whose metadata includes a column named "count" (list of doubles) that displays how many time a certain cell appears. I want to use the FeaturePlot tool to plot the counts on my UMAP so I can see where the high counts are via the color gradient.

Yet, when I do:

FeaturePlot(seur, features = "count")

I get the error:

count.Error in if (unique.feature.exp == 0) { : 
 missing value where TRUE/FALSE needed

How do I solve this error and/or correctly use FeaturePlot?


Solution

  • It should work, check you have Seurat 3 or Seurat 4, I am on using Seurat_3.2.2 below:

    library(Seurat)
    seur = pbmc_small
    eur$count = rpois(ncol(seur),5)
    FeaturePlot(seur,features="count")
    

    enter image description here