Find highly variable features by fitting a locally polynomial regression model to the log(mean) and log(variance) of downsampled features.
FitMeanVar(object, ...)
# S3 method for class 'Seurat'
FitMeanVar(
object,
assay = NULL,
layer = NULL,
nfeatures = 20000,
loess.span = 0.1,
min.cutoff = 10,
weight.mean = 0,
bins = 1000,
sample_per_bin = 50,
key = "dsLoess",
verbose = FALSE,
...
)
# S3 method for class 'StdAssay'
FitMeanVar(
object,
layer = NULL,
loess.span = 0.1,
nfeatures = 20000,
min.cutoff = 10,
weight.mean = 0,
bins = 1000,
sample_per_bin = 50,
key = "dsLoess",
verbose = FALSE,
...
)
# S3 method for class 'Assay'
FitMeanVar(
object,
layer = NULL,
loess.span = 0.1,
nfeatures = 20000,
min.cutoff = 10,
weight.mean = 0,
bins = 1000,
sample_per_bin = 50,
key = "dsLoess",
verbose = FALSE,
...
)
# Default S3 method
FitMeanVar(
object,
nfeatures = 20000,
loess.span = 0.1,
min.cutoff = 10,
weight.mean = 0,
bins = 1000,
sample_per_bin = 50,
random.seed = 1234,
verbose = FALSE,
...
)
# S3 method for class 'data.frame'
FitMeanVar(
object,
loess.span = 0.1,
weight.mean = 0,
bins = 1000,
sample_per_bin = 50,
random.seed = 1234,
verbose = FALSE,
...
)A Seurat object
Arguments passed to other methods
Name of assay to use. If NULL, use the default assay.
Name of layer to use. If NULL, use the default layer(s).
Number of features to selected as top variable features.
span parameter passed to the stats::loess() function
Minimum number of counts for a feature to be eligible for variable feature selection.
How much to weight the ranking of features according to their mean.
Setting weight.mean=0 will rank features according to their residual variance only.
Number of bins to use when downsampling features across the range of mean count values.
Number of features to select per mean count bin in feature downsampling step.
Key to use when storing the highly variable feature information in the assay.
Display messages.
Random seed to set for sampling.
Returns a SeuratObject::Seurat() object
This function is similar to the Seurat::FindVariableFeatures()
function (with selection.method="vst"), but downsamples the features
evenly across the range of mean values. This speeds up fitting of the loess
curve when the number of features is large.
The function also provides the ability to combine ranking of features
according to their mean count and their residual variance, using a weighted
rank sum with weights set by the weight.mean parameter. This can help
to avoid selecting features with high residual variance but very low mean.
FitMeanVar(atac_small)
#> An object of class Seurat
#> 1323 features across 100 samples within 3 assays
#> Active assay: peaks (323 features, 323 variable features)
#> 2 layers present: counts, data
#> 2 other assays present: bins, RNA
#> 2 dimensional reductions calculated: lsi, umap
FitMeanVar(object = atac_small[["peaks"]])
#> ChromatinAssay data with 323 features for 100 cells
#> Variable features: 323
#> Genome: hg19
#> Annotation present: TRUE
#> Motifs present: TRUE
#> Fragment files: 0