Skip to contents

Deconvolute `scbench` object using a chosen method

Deconvolute bulk RNA-seq matrix using a chosen method

Deconvolute `Seurat` Spatial object using a chosen method

Usage

# S3 method for scbench
deconvolute(
  scbench,
  scref,
  method = deconvolution_methods()[1],
  type = c("population", "spillover", "lod")[1],
  pseudobulk_norm = c("rpm", "none", "proportional_fitting")[3],
  correct_finer = FALSE,
  ...
)

# S3 method for matrix
deconvolute(
  bulk_data,
  scref,
  method = deconvolution_methods()[1],
  bulk_norm = c("none", "rpm", "proportional_fitting")[1],
  correct_finer = FALSE,
  cache_path = ".",
  ...
)

# S3 method for Seurat
deconvolute(
  spatial_obj,
  scref,
  method = deconvolution_methods()[1],
  normalization_method = c("none", "rp10k", "proportional_fitting")[1],
  correct_finer = FALSE,
  cache_path = "deconverse_cache",
  ...
)

Arguments

scbench

an `scbench` object already processed by `pseudobulks`

scref

an `screference` object containing single-cell reference data and pre-computed references for methods that require them.

method

a string with the name of the deconvolution method. For available methods, consult `deconvolution_methods()`

type

type of mixtures to deconvolute. One of: `"population"`, `"spillover"` or `"lod"`

pseudobulk_norm

the normalization method for pseudobulk counts. One of: `"rpm"` for reads per million, `"none"` for raw counts, or `"proportional_fitting"` for using the mean library size of the pseudobulk data to normalize.

correct_finer

normalize the resulting fractions from finer-grained annotation using coarser-grained results

...

other parameters, passed to the method wrapper, enables the user to change the method parameters. See: `deconvolute_method` where `method` is the method name in lowercase for method-specific parameters

bulk_data

a count or linear-normalized (cpm, etc) matrix of genes-by-samples

bulk_norm

the normalization to be applied in the bulk data. One of: `"rp10k"` for reads per 10 thousand, `"none"` for raw counts, or `"proportional_fitting"` for using the mean library size of the pseudobulk data to normalize. If already normalized, make sure to choose `"none"` (default)

spatial_obj

an `Seurat` object with a Spatial assay

Value

an object of class `scbench`

a tibble with deconvolution results

an object of class `Seurat`, with deconverse results