Get and set feature loadings
Loadings(object, ...)
Loadings(object, ...) <- value
# S3 method for DimReduc
Loadings(object, projected = FALSE, ...)
# S3 method for DimReduc
Loadings(object, projected = TRUE, ...) <- value
# S3 method for Seurat
Loadings(object, reduction = "pca", projected = FALSE, ...)
An object
Arguments passed to other methods
Feature loadings to add
Pull the projected feature loadings?
Name of reduction to pull feature loadings for
Loadings
: the feature loadings for object
Loadings<-
: object
with the updated loadings
# Get the feature loadings for a given DimReduc
Loadings(object = pbmc_small[["pca"]])[1:5,1:5]
#> PC_1 PC_2 PC_3 PC_4 PC_5
#> PPBP 0.33832535 0.04095778 0.02926261 0.03111034 -0.09042074
#> IGLL5 -0.03504289 0.05815335 -0.29906272 0.54744454 0.21460343
#> VDAC3 0.11990482 -0.10994433 -0.02386025 0.06015126 -0.80920759
#> CD1C -0.04690284 0.19835522 -0.35090617 -0.51112169 -0.13030628
#> AKR1C3 -0.03894635 -0.42880452 0.08845847 -0.27274386 0.08779165
# Set the feature loadings for a given DimReduc
new.loadings <- Loadings(object = pbmc_small[["pca"]])
new.loadings <- new.loadings + 0.01
Loadings(object = pbmc_small[["pca"]]) <- new.loadings
# Get the feature loadings for a specified DimReduc in a Seurat object
Loadings(object = pbmc_small, reduction = "pca")[1:5,1:5]
#> PC_1 PC_2 PC_3 PC_4 PC_5
#> PPBP 0.33832535 0.04095778 0.02926261 0.03111034 -0.09042074
#> IGLL5 -0.03504289 0.05815335 -0.29906272 0.54744454 0.21460343
#> VDAC3 0.11990482 -0.10994433 -0.02386025 0.06015126 -0.80920759
#> CD1C -0.04690284 0.19835522 -0.35090617 -0.51112169 -0.13030628
#> AKR1C3 -0.03894635 -0.42880452 0.08845847 -0.27274386 0.08779165