Cell-type deconvolution of tumor bulk RNA-seq with one function
Source:R/bulkdeconv.R
bulkdeconv.RdRuns one published deconvolution or cell-abundance method on a gene-by-sample
table. The input layout is the one rsemverse::rsem_read() returns: the
first column holds gene symbols and every other column is one sample.
The method runs in a separate R process. External methods use the original
package at the version recorded in the registry (see bulkdeconv_install()).
Arguments
- data
A data frame whose first column is the gene symbol (character) and whose other columns are samples (numeric). A numeric matrix with gene symbols as row names is also accepted. Gene symbols must be unique and every sample must contain at least one nonzero value.
- expr
"count"or"tpm": the scale of the values indata. Each method accepts one scale (seeexpr_acceptedinbulkdeconv_methods()):"count"for seqimmucc,"tpm"for the others. The wrong one is refused with a message that says so.- species
"human"or"mouse".- method
A method ID; see
bulkdeconv_methods().- ...
Method-specific options, named:
preset(xcell2),cancer_type(consensus_tme; required for timer),tissue(immucellai2, ssmd),n_permutationsandseed(base). Unknown or invalid options are errors.
Value
An object of class bulkdeconv_result, a list with
score: numeric matrix, samples in rows, features in columns;metadata: method, species, expr, options, what kind of value the method returns (output_class) and how it can be compared (comparability), licence, package versions, runtime;qc: gene and sample counts, signature coverage when the method exposes its genes, and the notes and warnings raised.
Details
Use bulkdeconv_methods() to check the input scale, minimum sample count
and output class. Scores from different methods can have different units.
Cohort-dependent scores are interpreted within the run.
All reference data the methods need are installed with the package.