generateBatchShifts: Simulate batch shifts for each cell state

Description Usage Arguments Value

View source: R/generatePCs.R

Description

This function generates linear shifts in each batch for each cell state. These shifts contribute to the adjusted centroid that is used for simulating PC locations

Usage

1
generateBatchShifts(batch_list, batch_vars, b_scale)

Arguments

batch_list

A named list of the batch names e.g. batch1, batch 2, etc.

batch_vars

A matrix containing the batch_associated variance for each cell state in each PC. These are obtained as output from the "estimatePCVar" function.

b_scale

The magnitude of batch-associated gene expression variation the simulated dataset will exhibit. Setting b_scale = 1 will result in realistic levels of batch-associated variation (as derived from parameter estimation of the input dataset). Increasing b_scale results in higher variation, while decreasing b_scale results in lower variation.

Value

Returns a matrix containing the batch shift for each cell state in each PC


immunogenomics/scpost documentation built on July 28, 2021, 4:03 a.m.