run_least_squares: deconvolute given bulk with DTD using single-cell data...

View source: R/wrapper_lsq.R

run_least_squaresR Documentation

deconvolute given bulk with DTD using single-cell data without loss function learning

Description

deconvolute given bulk with DTD using single-cell data without loss function learning

Usage

run_least_squares(
  exprs,
  pheno,
  bulks,
  exclude.from.signature = NULL,
  max.genes = 500,
  cell.type.column = "cell_type",
  patient.column = NULL,
  scale.cpm = FALSE,
  model = NULL,
  model_exclude = NULL
)

Arguments

exprs

non negative numeric matrix containing single cell profiles as columns and features as rows

pheno

data.frame, with 'nrow(pheno)' must equal 'ncol(exprs)'. Has to contain single cell labels in a column named 'cell_type'

bulks

matrix containing bulk expression profiles as columns

exclude.from.signature

vector of strings of cell types not to be included in the signature matrix

max.genes

numeric, maximum number of genes that will be included in the signature for each celltype, default 500

cell.type.column

string, which column of 'pheno' holds the cell type information? default "cell_type"

patient.column

string, which column of 'pheno' holds the patient information; optional, default NULL

scale.cpm

boolean, scale single-cell profiles to CPM? default FALSE

model

pre-trained model for LSQ deconvolution as returned by this wrapper, default NULL

model_exclude

character vector, cell type(s) to exclude from the supplied pre-trained model, default NULL

verbose

boolean, default FALSE

Value

list with three entries: 1) est.props - matrix containing for each bulk the estimated fractions of the cell types contained
2) sig.matrix - effective signature matrix used by the algorithm (features x cell types)
3) model - list containing reference.X (signature matrix) and g (weight vector, all weights 1)


MarianSchoen/DMC documentation built on Aug. 2, 2022, 3:05 p.m.