This function serves as a wrapper for the EnsDeconv algorithm, providing an interface for ensemble deconvolution analysis on gene expression data.

EnsDeconv(
  count_bulk,
  ref_list,
  enableFileSaving = FALSE,
  exportRef = FALSE,
  outpath = NULL,
  parallel_comp = FALSE,
  ncore = 5,
  true_frac = NULL,
  params = NULL,
  inrshiny = FALSE
)

Arguments

count_bulk

Bulk gene expression data. The count_bulk parameter expects a two-dimensional numeric matrix in a gene-by-sample format. It must be convertible using as.matrix. Optionally, the data can be in its original scale.

ref_list

Reference data list. The ref_list is a list of lists, where each sublist contains ref_matrix and meta_ref. The top-level list should be named with a vector of data_name, indicating the bulk-reference pair. The sublists should contain:

  • ref_matrixA matrix with rows as genes and columns as samples.

  • meta_refMetadata for reference data, including "SamplesName" (column names of ref_matrix) and "deconv_clust" (deconvolution clusters, e.g., cell types).

  • data_nameA description of the data, formatted as "bulk data name_reference data name".

enableFileSaving

Enable Saving of Intermediate Output (Optional) A boolean flag that controls the saving of intermediate outputs as separate files. When set to TRUE, intermediate outputs of the analysis will be saved to files. If not explicitly set, this parameter defaults to FALSE, meaning that intermediate outputs will not be saved by default.

exportRef

Enable output of reference generated per scenario (Optional) A boolean flag that controls the output of reference generated per scenario . When set to TRUE, reference generated per scenario will be output. If not explicitly set, this parameter defaults to FALSE, meaning that the results will not contain references per scenario.

outpath
parallel_comp

Use parallel computing. (Optional) A logical flag indicating whether to perform computations in parallel. Defaults to FALSE.

ncore

Number of cores for parallel execution. (Optional) Sets the number of cores for parallel processing when parallel_comp is TRUE. Default is 5. Only effective if parallel computing is enabled.

true_frac

True cell type proportions. (Optional) A two-dimensional numeric matrix indicating the true cell type proportions in the samples. The matrix should be formatted with samples as rows and cell types as columns.

params

Ensemble learning parameters. (Optional) A dataframe specifying parameters for ensemble learning. For more details, refer to the get_params function.

inrshiny

Value

A list containing two elements: - EnsDeconv: The output of the EnsDeconv algorithm. - allgene_res: A list of results from each scenario analyzed.

Examples

# Example usage
# EnsDeconv(count_bulk, ref_list)