spatialDeconvolution estimate cell composition across DSP samples from reference expression matrix

spatialDeconvolution(
  object,
  expr.type = "q_norm",
  prof.mtx,
  clust.rows = TRUE,
  clust.cols = TRUE,
  group.by = "none",
  plot.fontsize = 5,
  use.custom.prof.mtx = FALSE,
  discard.celltype = FALSE,
  normalize = FALSE,
  min.cell.num = 0,
  min.genes = 10,
  ref.mtx,
  ref.annot,
  cell.id.col = "CellID",
  celltype.col = "LabeledCellType"
)

Arguments

object

Nanostring object containing normalized gene expression data

expr.type

Name of slot containing normalized gene expression data

prof.mtx

Use stored profile matrix

clust.rows

Cluster rows in heatmap (Default: TRUE)

clust.cols

Cluster columns in heatmap (Default: TRUE)

group.by

Organize heatmap / barplot columns by metadata group (Default: "none")

plot.fontsize

Set size of labels on all figures (Default: 5)

discard.celltype

Remove any celltype(s) that is not of interest (Default: FALSE)

normalize

Scale profile matrix gene expression according to gene count (Default: FALSE)

min.cell.num

Prevent deconvolution of celltype(s) if number of corresponding cells is below this threshold (Default: 0)

min.genes

Filter cells based on minimum number of genes expressed (Default: 10)

ref.mtx

Custom reference expression matrix (Gene x Reference_Samples)

ref.annot

Custom reference data.frame with cell.id and celltype information

cell.id.col

Column of data.frame containing cell.id.col info

celltype.col

Column of data.frame containing celltype info

use.custom.matrix

Generate custom profile matrix (Default: FALSE)

Value

A list dsp.data containing the results of spatial deconvolution, res$beta: matrix of estimated cell abundances res$X: cell signature (gene x celltype) matrix used to generate deconvolution results res$yhat, res$resids: fitted values and log2-scale residuals from deconvolution, can be used to measure goodness of fit res$prop_of_all: res$beta scaled to proportion of celltype across sample figures: heatmap and barplot of cell profile matrix and estimated cell abundances in data

Details

Helper functions comes from https://bioconductor.org/packages/release/bioc/vignettes/SpatialDecon/inst/doc/SpatialDecon_vignette_NSCLC.html

Uses Nanostring developed functions to compute estimated cell fractions in DSP samples. Allows for users to group samples based on metadata information