View source: R/Seurat.utils.less.used.R
regress_out_and_recalculate_seurat | R Documentation |
The function performs a series of calculations and manipulations on a Seurat object, including identifying variable features, scaling data, running PCA, setting up reductions, finding neighbors, and finding clusters. It optionally performs t-SNE and saves the object.
regress_out_and_recalculate_seurat(
obj,
n.var.features = p$n.var.genes,
features.scale = n.var.features,
vars.to.regress,
suffix,
nPCs = p$n.PC,
clust_resolutions = p$snn_res,
calc_tSNE = FALSE,
plot_umaps = TRUE,
save_obj = TRUE,
assayX = "RNA"
)
obj |
The Seurat object. |
n.var.features |
The number of variable features to use. Default: the 'n.var.genes' element from a list 'p'. |
features.scale |
A logical value indicating whether to scale the data. Default: |
vars.to.regress |
A vector of variable names to be regressed out. |
suffix |
A character string to be used as a suffix when saving the object. |
nPCs |
The number of principal components to use. Default: the 'n.PC' element from a list 'p'. |
clust_resolutions |
The resolution for clustering. Default: the 'snn_res' element from a list 'p'. |
calc_tSNE |
Logical, if TRUE, t-SNE will be performed. Default: |
plot_umaps |
Logical, if TRUE, UMAP plots will be generated. Default: |
save_obj |
Logical, if TRUE, the object will be saved. Default: |
assayX |
The assay to be used in scaling data. Default: 'RNA'. |
Seurat object after calculations and manipulations.
## Not run:
# Assuming 'seurat_obj' is a valid Seurat object and 'vars' is a vector of variable names to be regressed out.
result <- regress_out_and_recalculate_seurat(seurat_obj, vars, suffix = "_regressed")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.