process_data: Runs RCTD in full mode on 'puck'

View source: R/runRCTD.R

process_dataR Documentation

Runs RCTD in full mode on puck

Description

Renormalizes cell_type_means to have average the same as the puck if proportions is given. Then, computes cell type proportions for each pixel in puck.

Usage

process_data(
  puck,
  gene_list,
  cell_type_info,
  proportions = NULL,
  trust_model = FALSE,
  constrain = T,
  OLS = F
)

Arguments

puck

an object of type SpatialRNA, the target dataset

gene_list

a list of genes to be used for RCTD

cell_type_info

cell type information and profiles of each cell, calculated from the scRNA-seq reference (see get_cell_type_info)

proportions

(optional) If given, a named list (for each cell type) of proportion of the cell type on the bulk dataset (not constrained to sum to 1)

constrain

logical whether to constrain the weights to sum to one on each pixel

Value

Returns test_results, a list of three items: (1) conf_mat a confusion matrix (not relevant) (2) weights a dataframe of predicted weights (3) a named list of predicted cell types


dmcable/RCTD documentation built on Feb. 24, 2024, 11:03 p.m.