This is a test version of Biostars. For the public version, visit https://www.biostars.org.
min.cells in CreateSeuratObject

I am creating a Seurat object with:
obj1 = CreateSeuratObject( obj10X, min.cells=20, min.features = 0)
and comparing with:
obj2 = CreateSeuratObject( obj10X, min.cells=0, min.features = 0)
cnt2 = GetAssayData( obj2, slot="counts")
goodFeatures = rowSums( cnt2 ) >= 20
and sub-setting obj2 with goodFeatures

The number of features in obj1 and obj2 are not the same. Specifically, I see some features with cell count of 20, 21 and 22 that are not included in obj1.

Any ideas?

seurat

You probably need to do goodFeatures <- rowSums(cnt2 > 0) >= 20 since min.cells looks for a minimum number of cells with at least a count of 1 for that feature. In your code right now you could for example have a single cell in your dataset with a count of 20 for that feature and it would survive the filtering.

0 answers

No answers yet.

Log in to answer this question.