highlight subset of cells on tSNE plot
1
0
Entering edit mode
2.7 years ago
checkyodna ▴ 60

I am working with a single-cell Seurat object with metadata added. The object metadata contains information on patient (Sample_Name) and treatment conditions (LMO1_cells or LMO2_cells). I need a tSNE plot that shows all cells in the object but highlights the 2 treatment conditions (one in red and the other in blue) but only from Patient 1. The rest of them are grey in the background. I have a plot but it shows the 2 conditions from all patients. The Sample_Name col in metadata has Patient info but subsetting with group.by() is causing issues. Could anyone help here? thanks

> DimPlot(seurat_all, reduction = "TSNE", group.by = 'Sample_Name', 
        cells.highlight = list(LMO1_cells, LMO2_cells),
        cols.highlight = c("darkblue", "darkred"), cols = "grey")

enter image description here

enter image description here

seurat single-cell sce R • 2.3k views
ADD COMMENT
0
Entering edit mode

Try with split.by = 'Sample_Name'

ADD REPLY
0
Entering edit mode

That kind of does what I want, but makes a bunch of tSNE plots on the 1 plot

enter image description here

ADD REPLY
0
Entering edit mode

checkyodna

Why did you delete this post?

ADD REPLY
0
Entering edit mode
2.7 years ago

Make a new metadata column, then group.by with that column.

ADD COMMENT

Login before adding your answer.

Traffic: 2121 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6