After subsetting a seurat object number of variable features is wrong.
0
0
Entering edit mode
11 weeks ago
Assa Yeroslaviz ★ 1.9k

When I subset a seurat object and start to reanalyze it, I can't change the number of variable features from the older (bigger object).

seuObj
An object of class Seurat 
26379 features across 56411 samples within 1 assay 
Active assay: RNA (26379 features, 2000 variable features)
 3 layers present: data, counts, scale.data
 3 dimensional reductions calculated: pca, umap, tsne

After subsetting and cleaning the object, I re-do also the normalization and finding the variable features, but it stays at 2000, even though I can see in the plot, that I have a lot more.

export <- subset(x = seuObj, idents = c(1,2,11) )
export <- NormalizeData(export, normalization.method  ="LogNormalize", scale.factor = 10000) 
export <- FindVariableFeatures(export, selection.method = "mean.var.plot", mean.cutoff = c(0.0125, 3), dispersion.cutoff = c(0.5, Inf))
export
An object of class Seurat 
26379 features across 13384 samples within 1 assay 
Active assay: RNA (26379 features, 2000 variable features)
 2 layers present: counts, data

subset

How can I reset (change)this value?

FindVariableFeatures seurat subset • 511 views
ADD COMMENT
1
Entering edit mode

It might just be an issue of update in the printing of the class Seurat

2000 variable features

Double check the actual number of variable features you actually have in the object

length(VariableFeatures(export))
ADD REPLY
0
Entering edit mode

Did you find a workaround for this?

ADD REPLY

Login before adding your answer.

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