Skip to contents

This function computes a reference signature matrix from a `screference` object using the method implemented in the Python `cell2location` package.

Usage

cell2location_scref(
  scref,
  cache_path = NULL,
  cell_count_cutoff = 5,
  cell_percentage_cutoff = 0.03,
  nonz_mean_cutoff = 1.2,
  max_epochs = 1000,
  categorical_covariates = NULL,
  continuous_covariates = NULL
)

Arguments

scref

An object of class `screference` containing the reference single-cell RNA-seq data.

cache_path

A string specifying the path to save the computed reference results. Default is `NULL`.

cell_count_cutoff

An integer specifying the cutoff for the number of cells expressing a gene. Default is 5.

cell_percentage_cutoff

A numeric value specifying the cutoff for the percentage of cells expressing a gene. Default is 0.03.

nonz_mean_cutoff

A numeric value specifying the cutoff for the mean expression of non-zero genes. Default is 1.2.

max_epochs

An integer specifying the maximum number of epochs for model training. Default is 1000.

categorical_covariates

A character vector of categorical covariates. Default is `NULL`.

continuous_covariates

A character vector of continuous covariates. Default is `NULL`.

Value

A matrix of inferred average expression values per cluster.