Deconvolution
deconvolute(
bulk_gene_expression,
signature,
method = deconvolution_methods,
single_cell_object = NULL,
cell_type_annotations = NULL,
batch_ids = NULL,
cell_type_column_name = NULL,
normalize_results = FALSE,
verbose = FALSE,
assay_name = NULL,
...
)
A matrix or dataframe with the bulk data. Rows are genes, columns are samples.
The signature matrix.
A string specifying the method. Supported methods are 'bisque', 'momf', 'dwls', 'scaden', 'cibersortx', 'autogenes' and 'bayesprism'
Needed for deconvolution with MOMF, Bisque and BayesPrism. Defaults to NULL. Alternatively a SingleCellExperiment or an AnnData object can be provided. In that case, note that cell-type labels need to be indicated either directly providing a vector (cell_type_annotations) or by indicating the column name that indicates the cell-type labels (cell_type_column_name). (Anndata: obs object, SingleCellExperiment: colData object)
Needed for deconvolution with Bisque, MuSiC, SCDC and BayesPrism Defaults to NULL.
A vector of the ids of the samples or individuals. Defaults to NULL.
Name of the column in (Anndata: obs, SingleCellExperiment: colData), that contains the cell-type labels. Is only used if no cell_type_annotations vector is provided.
Whether the deconvolution results should be normalized. Negative values will be put to 0, and the estimates will be normalized to sum to 1. Defaults to NULL.
Whether to produce an output on the console.
Name of the assay/layer of the single_cell_object that should be used to extract the data
Additional parameters, passed to the algorithm used.
A matrix with the probabilities of each cell-type for each individual. Rows are individuals, columns are cell types.
# More examples can be found in the unit tests at tests/testthat/test-c-deconvolute.R
data("single_cell_data_1")
data("cell_type_annotations_1")
data("batch_ids_1")
data("bulk")
single_cell_data <- single_cell_data_1[1:2000, 1:500]
cell_type_annotations <- cell_type_annotations_1[1:500]
batch_ids <- batch_ids_1[1:500]
bulk <- bulk[1:2000, ]
deconv_bisque <- deconvolute(
bulk, NULL, "bisque", single_cell_data,
cell_type_annotations, batch_ids
)