This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Create subset of celltypes from scRNA

Hi everyone,

I have an scRNA dataset (10x genomics; "sce.biopsy") from a lymph node biopsy and am particularly interested in B-cells. I have clustered and performed cell type annotation, using Scran/scater/SingleR, by which I detected 19551 B-cells.

library(celldex)
ref <- BlueprintEncodeData()

library(SingleR)
cells <- SingleR(test=sce.biopsy, ref=ref, labels=ref$label.main)
table(cells$labels)

I would like to focus now on differential gene expression in B-cells, not on fibroblasts etc. which are of course also included in the biopsy. Is there a way to create a subset of these B-cells?

Thanks a lot!

rna-seq sc

You can filter a SingleCellExperiment using the standard SCE[,ColsToKeep] filtering commands. Since you have a label for every cell you can make a vector of cells to keep. Please be more specific at which step you are struggling.

Thanks a lot, this already solved the issue!!

0 answers

No answers yet.

Log in to answer this question.