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?
• 1,851 views
•
link
0 answers
No answers yet.
Log in to answer this question.
You probably need to do
goodFeatures <- rowSums(cnt2 > 0) >= 20sincemin.cellslooks 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.