get_densities: Scale deconvoluted cell fractions to cell densities

View source: R/quantiseqr_helpers.R

get_densitiesR Documentation

Scale deconvoluted cell fractions to cell densities

Description

Scale deconvoluted cell fractions to cell densities

Usage

get_densities(DCres, density_info)

Arguments

DCres

Data.frame of deconvoluted cell fractions computed with the run_quantiseq() function, with sample identifiers as row names.

density_info

Named numeric vector of total cell densities per sample. The vector names should match the sample identifiers specified in DCres. These values are derived from the quantitative analysis of imaging data.

Value

A data.frame of cell densities, samples by cell types.

Examples

data(dataset_racle)
mixture <- dataset_racle$expr_mat

res_quantiseq_run <- quantiseqr::run_quantiseq(
  expression_data = dataset_racle$expr_mat,
  signature_matrix = "TIL10",
  is_arraydata = FALSE,
  is_tumordata = TRUE,
  scale_mRNA = TRUE
)

totcells <- rnorm(n = ncol(mixture), mean = 1e4)
names(totcells) <- colnames(mixture)
celldens <- get_densities(res_quantiseq_run, totcells)

federicomarini/quantiseqr documentation built on May 7, 2024, 9:50 a.m.