estimateFreqVar: Estimate the mean and variation in each cell state's...

Description Usage Arguments Value

View source: R/parameterEstimation.R

Description

Given a metadata table containing each cell's sample identity and assigned cell state, this function will return a list containing: a vector containing the mean frequency of each cell state (in linear space) and a variance-covariance matrix containing the covariances between each cell state (log space by default). Both of these elements are used as direct inputs to our dataset generation functions.

Usage

1
estimateFreqVar(meta, clusCol, sampleCol, logCov = TRUE)

Arguments

meta

A metadata table that should include named columns containing: Cell IDs, cell state assignments, and sample identities for each cell.

clusCol

The name of the metadata column containing the cell state cluster assignments for each cell.

sampleCol

The name of the metadata column containing the sample identities of each cell.

logCov

Boolean designating whether you want the variance-covariance matrix in log space (default) or in linear space. The log space matrix is used as input to our simulation functions; only use linear space for visualization.

Value

Returns a list containing: a vector containing the mean frequency of each cell state (in linear space) and a variance-covariance matrix containing the covariances between each cell state (log space by default). The mean frequency vector will be transformed into log space during data simulation.


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