create.RCTD.replicates: Creates an 'RCTD.replicates' object across multiple...

View source: R/RCTDreplicates.R

create.RCTD.replicatesR Documentation

Creates an RCTD.replicates object across multiple SpatialRNA replicates

Description

Applies the create.RCTD function for each SpatialRNA replicate inputted using a scRNA-seq reference Reference object.

Usage

create.RCTD.replicates(
  spatialRNA.replicates,
  reference,
  replicate_names,
  group_ids = NULL,
  max_cores = 4,
  test_mode = FALSE,
  gene_cutoff = 0.000125,
  fc_cutoff = 0.5,
  gene_cutoff_reg = 2e-04,
  fc_cutoff_reg = 0.75,
  UMI_min = 100,
  UMI_max = 2e+07,
  UMI_min_sigma = 300,
  class_df = NULL,
  CELL_MIN_INSTANCE = 25,
  cell_type_names = NULL,
  MAX_MULTI_TYPES = 4,
  keep_reference = F,
  CONFIDENCE_THRESHOLD = 5,
  DOUBLET_THRESHOLD = 20
)

Arguments

spatialRNA.replicates

a list of multiple SpatialRNA objects to run RCTD on

reference

a Reference object scRNA-seq reference used for RCTD

replicate_names

a character vector of names for each replicate provided in spatialRNA.replicates

group_ids

(default constant across replicates) a named integer vector (length number of replicates) containing the group id for each replicate. Names represent the replicate names, and replicates of the same group will be expected to be more similar than replicates across groups

max_cores

for parallel processing, the number of cores used. If set to 1, parallel processing is not used. The system will additionally be checked for number of available cores.

gene_cutoff

minimum normalized gene expression for genes to be included in the platform effect normalization step.

fc_cutoff

minimum log-fold-change (across cell types) for genes to be included in the platform effect normalization step.

gene_cutoff_reg

minimum normalized gene expression for genes to be included in the RCTD step.

fc_cutoff_reg

minimum log-fold-change (across cell types) for genes to be included in the RCTD step.

UMI_min

minimum UMI per pixel included in the analysis

UMI_max

maximum UMI per pixel included in the analysis

UMI_min_sigma

minimum UMI per pixel for the choose_sigma_c function

class_df

(optional) if not NULL, then a dataframe mapping each cell type to a cell class, so that RCTD will report confidence on the class level.

CELL_MIN_INSTANCE

minimum number of cells required per cell type. Default 25, can be lowered if desired.

cell_type_names

A list of cell types to be included from the reference. If NULL, uses all cell types

MAX_MULTI_TYPES

(multi-mode only) Default 4, max number of cell types per pixel

keep_reference

(Default FALSE) if true, keeps the reference object stored within the RCTD object

CONFIDENCE_THRESHOLD

(Default 5) the minimum change in likelihood (compared to other cell types) necessary to determine a cell type identity with confidence

DOUBLET_THRESHOLD

(Default 20) the penalty weight of predicting a doublet instead of a singlet for a pixel

cell_type_info

Default NULL, option to pass in cell_type_info directly

Value

an RCTD.replicates object, which is ready to run the run.RCTD.replicates function


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