Sub clustering from Seurat Object
2
0
Entering edit mode
3 months ago
AbsaR • 0

I want to create a sub-cluster and then plot it from a Seurat Object. For example from a group of different cell types I want to plot just the dendritic cells in R-studio. How can I do that?

scRNA Trajectory seurat Pseudotime • 407 views
ADD COMMENT
0
Entering edit mode

enter image description here

want to make a graph like that

ADD REPLY
0
Entering edit mode
3 months ago
fracarb8 ▴ 760

If you are using DOHeatmap to plot, you can pass the subcluster using the WhichCells function.

# check the syntax, as I go by heart
Idents(srtObject) <- "cellID"
myDC <- WhichCells(object = srtObject, idents = "cDC2A")
DoHeatmap(srtObject, cells = myDC)

Otherwise you can use subset to obtain a seurat object only containing your cells of interest.

Idents(srtObject) <- "cellID"
newObject <- subset(srtObject, idents = "cDC2A")
ADD COMMENT
0
Entering edit mode
3 months ago
AbsaR • 0

Idents(dc) <-"CellID" newObj <- subset(dc,Idents="cDC2A") Warning: The following arguments are not used: Idents Error in CellsByIdentities(object = object, cells = cells, ...) : unused argument (Idents = "cDC2A") myDC<-WhichCells(dc,idents = "cDC2A") Error in WhichCells.Seurat(dc, idents = "cDC2A") : Cannot find the following identities in the object: cDC2A

top 10 HVG

myDC<-WhichCells(dc,idents = "cDC2") Error in WhichCells.Seurat(dc, idents = "cDC2") : Cannot find the following identities in the object: cDC2

Still facing errors, can we give cluster numbers instead of cluster identity ?

like myDC<-WhichCells(dc,idents =Cluster0)

ADD COMMENT

Login before adding your answer.

Traffic: 2068 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