Home >
Community >
How to highlight specific cells in Seurat 2.4
Upvote
27
Downvote
+ Bioinformatics
+ Biochemistry
Posted by
Michael Tam
How to highlight specific cells in Seurat 2.4
You can "highlight" any cells you'd like by creating a new column (or modifying an existing column) in the meta data slot within the Seurat object. From there you can modify the contents of that vector to your liking and plot the results.
It's not clear if you've been successful in obtaining the barcodes for the subpopulation to begin with, because that's a separate issue all together, and you need to clarify what attribute you are trying to subset the cells on because there are a number of ways to accomplish that. If you've already obtained the barcodes then I'll describe how you would plot the results below.
Let's assume you'd like to keep the original cluster IDs for all other cells. We'll start off by duplicating the cluster ID column (this isn't necessary, but it's good practice to preserve the original IDs).
n <- seurat_obj@meta.data # for convenience
n$new_column <- n$res.1.0
Now you need to modify the ids for cluster 5 to break them up into 2 populations.
You can plot the new column using DimPlot with the argument group.by = "new_column", which will make the subpopulation stand out from the rest of the cells in cluster 5.
You can "highlight" any cells you'd like by creating a new column (or modifying an existing column) in the meta data slot within the Seurat object. From there you can modify the contents of that vector to your liking and plot the results.
It's not clear if you've been successful in obtaining the barcodes for the subpopulation to begin with, because that's a separate issue all together, and you need to clarify what attribute you are trying to subset the cells on because there are a number of ways to accomplish that. If you've already obtained the barcodes then I'll describe how you would plot the results below.
Let's assume you'd like to keep the original cluster IDs for all other cells. We'll start off by duplicating the cluster ID column (this isn't necessary, but it's good practice to preserve the original IDs).
n <- seurat_obj@meta.data # for convenience n$new_column <- n$res.1.0
Now you need to modify the ids for cluster 5 to break them up into 2 populations.
You can plot the new column using DimPlot with the argument group.by = "new_column", which will make the subpopulation stand out from the rest of the cells in cluster 5.
You can "highlight" any cells you'd like by creating a new column (or modifying an existing column) in the meta data slot within the Seurat object. From there you can modify the contents of that vector to your liking and plot the results.
It's not clear if you've been successful in obtaining the barcodes for the subpopulation to begin with, because that's a separate issue all together, and you need to clarify what attribute you are trying to subset the cells on because there are a number of ways to accomplish that. If you've already obtained the barcodes then I'll describe how you would plot the results below.
Let's assume you'd like to keep the original cluster IDs for all other cells. We'll start off by duplicating the cluster ID column (this isn't necessary, but it's good practice to preserve the original IDs).
Now you need to modify the ids for cluster 5 to break them up into 2 populations.
You can plot the new column using DimPlot with the argument
group.by = "new_column", which will make the subpopulation stand out from the rest of the cells in cluster 5.You can "highlight" any cells you'd like by creating a new column (or modifying an existing column) in the meta data slot within the Seurat object. From there you can modify the contents of that vector to your liking and plot the results.
It's not clear if you've been successful in obtaining the barcodes for the subpopulation to begin with, because that's a separate issue all together, and you need to clarify what attribute you are trying to subset the cells on because there are a number of ways to accomplish that. If you've already obtained the barcodes then I'll describe how you would plot the results below.
Let's assume you'd like to keep the original cluster IDs for all other cells. We'll start off by duplicating the cluster ID column (this isn't necessary, but it's good practice to preserve the original IDs).
Now you need to modify the ids for cluster 5 to break them up into 2 populations.
You can plot the new column using DimPlot with the argument
group.by = "new_column", which will make the subpopulation stand out from the rest of the cells in cluster 5.More
VOTE