convertCellTypes: Convert results from an arbitrary training matrix to our...

Description Usage Arguments Value

View source: R/convertCellTypes.R

Description

Takes betas from a decon run, using any cell type names whatsoever, and maps them back to the "official" cell types we use. Allows for multiple rows of beta to map to the same official cell type, in which case those rows will be added up.

Usage

1
convertCellTypes(beta, matching, stat = sum, na.rm = FALSE, sigma = NULL)

Arguments

beta

K * n matrix of estimated beta values (cell type abundances)

matching

A list object holding the mapping from beta's cell names to official cell names. See str(safeTME.matches) for an example.

stat

The function used to combine related cell types. Defaults to sum.

na.rm

Whether to ignore NAs while computing stat

sigma

A list of covariance matrices of beta estimates, in the format output by spatialdecon.

Value

A list with two elements:


SpatialDecon documentation built on Nov. 8, 2020, 6 p.m.