harmonyBatchCorrect.Rd
Adjusts cell embeddings and gene expression data to account for variations due to user specified variable
harmonyBatchCorrect(
object,
nvar = 2000,
genes.to.add = c(),
group.by.var,
npc = 20
)
Number of variable genes to subset the gene expression data by (Default: 2000)
Add genes that might not be found among variably expressed genes
Which variable should be accounted for when running batch correction
Number of principal components to use when running Harmony (Default: 20)
Seurat-class object
A list: adj.object with harmony-adjusted gene expression (SCT slot) adj.tsne: harmonized tSNE plot
Runs singular value decomposition on pearson residuals (SCT scale.data) to obtain PCA embeddings. Performs harmony on decomposed embedding and adjusts decomposed gene expression values by harmonized embedding.