Deleting cells from seurat object
0
0
Entering edit mode
12 weeks ago
odi ▴ 10

I am attempting to delete PBMC cells from my seurat object. I would like to use the WhichCells function to identify the cells that contain these features. Here is my code:

WhichCells(OC_s, slot = 'counts', expression = PTPRC > 0 & CD3E > 0 & CD19 > 0 & MS4A1 > 0 
                   & CD3D > 0 & CD4 > 0 & CD8A > 0 & CD3E > 0 & NKG7 > 0 & IL7R > 0 
                   & CD19 > 0 & MS4A1 > 0 & CD79A > 0 & JCHAIN > 0 & IGHG3 > 0 
                   & IGKC > 0 & CD14 > 0 & LYZ > 0 & CD14 > 0 & CD68 > 0 & AIF1 > 0 
                   & C1QA  > 0 & CD1C > 0 & CD1A > 0 & CLEC9A > 0 & LILRA4 > 0 
                   & CXCR3 > 0 & CLEC9A > 0 & CD1C > 0 & CD1A > 0)

After this, I am hoping to filter out the cells above from my seurat object OC_s. I'm stuck at this point and I don't know if I'm doing this right. Can someone help me?

seurat • 297 views
ADD COMMENT
0
Entering edit mode

once you identify the cells, you can subset the seurat object

colnames(pbmc3k) %>% head()

[1] "AAACATACAACCAC" "AAACATTGAGCTAC" "AAACATTGATCAGC" "AAACCGTGCTTCCG" "AAACCGTGTATGCG" "AAACGCACTGGTAC"

cells<- colnames(pbmc3k) %>% head()

pbmc3k[, cells] An object of class Seurat 13714 features across 6 samples within 1 assay

It may be better to cluster the cells and find the PBMC clusters and remove them that way.

ADD REPLY
0
Entering edit mode

Yes your suggestion was my original thought but unfortunately the way the experiment was done.... you had PBMC + tumor cells. So, they are mixed together and you are stuck trying to use the markers to identify the PBMC from tumor cells. Suggestions are appreciated.

ADD REPLY

Login before adding your answer.

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