min.cells in CreateSeuratObject
0
0
Entering edit mode
15 months ago
jomo018 ▴ 720

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 • 1.0k views
ADD COMMENT
1
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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