This is a test version of Biostars. For the public version, visit https://www.biostars.org.
FeaturePlot using metadata columns

Hello,

I have a Seurat object that has two columns of interest in its metadata. One corresponds to clonotypes (we'll call this 'clono') and the other corresponds to the number of times that clonotypes appears in the sample ('count').

I want to make a FeaturePlot where each dot is a separate clonotype and the color corresponds to how many times that clonotype appears, so that I can see the expanded ones on my UMAP plot. I tried doing something like this:

FeaturePlot(Seurat_Amgen_10XVdj_20210118, features = "clono")

But I just get the error:

All cells have the same value (NA) of clono.Error in if (unique.feature.exp == 0) { : 
missing value where TRUE/FALSE needed

Additionally

head(Seurat_Amgen_10XVdj_20210118@meta.data[,c("clono","count")])

Yields

                                             clono count
1 TGCAGCCTCTGGGTATCAGGGCCCGCCTCCTACAATGAGCAGTTCTTC    10
2       TGTGCTGTGGGTAACCGGAATAACAATGCCAGACTCATGTTT     1
3             TGTGCCTCAACAGGAGGAAGCTACATACCTACATTT     1
4       TGTGCCAGCAGTTTTGGGACAGGGGTTTATGGCTACACCTTC     1
5       TGTGCTGTGCAGGCGAATTCAGGAAACACACCTCTTGTCTTT     3

Any ideas on how to approach this? Thank you.

r seurat

You should include in your question how the 2 columns look like (e.g. head(Seurat_Amgen_10XVdj_20210118@meta.data[,c("clono","count"]))

I think the column you are trying to plot must be numeric. In your case, you can try to associate a number to each clonotype, add a column ("clono_numeric") and then plot FeaturePlot(Seurat_Amgen_10XVdj_20210118, features = "clono_numeric")

I tried that, but I still get the error

All cells have the same value (NA) of count.Error in if
(unique.feature.exp == 0) { :    missing value where TRUE/FALSE needed

Hello salber710!

We believe that this post does not fit the main topic of this site.

Included sensitive data/names

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

0 answers

No answers yet.

Log in to answer this question.