GetCTP: Return cell type proportions from bulk

Description Usage Arguments Value

View source: R/marker_based.R

Description

Calculate cell type proportions from a data frame containing bulk expression values. Uses PCA (weighted or regular) to estimate relative proportions within each cell type.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
GetCTP(
  bulk,
  cell_types,
  markers,
  ct_col,
  gene_col,
  min_gene,
  max_gene,
  weighted,
  w_col,
  verbose
)

Arguments

bulk

Expression Set containing bulk data

cell_types

Character vector. Names of cell types.

markers

Data frame with columns specifying cluster and gene, and optionally a column for weights, typically the fold-change of the gene. Important that the genes for each cell type are row-sorted by signficance.

ct_col

Character string. Column name specifying cluster/cell type corresponding to each marker gene in markers.

gene_col

Character string. Column name specifying gene names in markers.

min_gene

Numeric. Min number of genes to use for each cell type.

max_gene

Numeric. Max number of genes to use for each cell type.

weighted

Boolean. Whether to use weights for gene prioritization

w_col

Character string. Column name for weights, such as "avg_logFC", in markers

verbose

Boolean. Whether to print log info during decomposition. Errors will be printed regardless.

Value

A List. Slot cors contains list of vectors with correlation coefficients. Slot ctps contains list of CTP objects returned by GetCTP


BisqueRNA documentation built on May 24, 2021, 1:06 a.m.