SDAScoreMeta2Reduction: Create a new dimension reduction object using SDA scores

View source: R/SDA_Seurat.R

SDAScoreMeta2ReductionR Documentation

Create a new dimension reduction object using SDA scores

Description

This function creates a new dimension reduction object using SDA scores from a Seurat object, and adds it to the Seurat object as a new assay.

Usage

SDAScoreMeta2Reduction(
  SerObj,
  loadingMat = NULL,
  sdaComps = NULL,
  reduction.key = "SDA_",
  assayName = "RNA",
  reduction.name = "SDA",
  includeLoading = F
)

Arguments

SerObj

A Seurat object containing SDA scores to use for the reduction.

loadingMat

A matrix of loadings to use for the reduction. If not specified, the loadings will be calculated from the SDA scores.

sdaComps

A vector of column names or indices from SerObj@meta.data that correspond to the SDA scores to use for the reduction.

reduction.key

A prefix string to use for the key of the new dimension reduction object.

assayName

The name of the assay in SerObj to use for the reduction.

reduction.name

The name to use for the new reduction in the Seurat object.

Value

A modified Seurat object with a new dimension reduction object added.

Examples

## Create a new SDA dimension reduction object from a Seurat object
my_seurat <- SDAScoreMeta2Reduction(SerObj = my_seurat, sdaComps = c("SDA_1", "SDA_2"))


eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.