object_ref: Function to convert labelled object to avg expression matrix

View source: R/object_access.R

object_refR Documentation

Function to convert labelled object to avg expression matrix

Description

Function to convert labelled object to avg expression matrix

Usage

object_ref(input, ...)

## Default S3 method:
object_ref(
  input,
  cluster_col = NULL,
  var_genes_only = FALSE,
  assay_name = NULL,
  method = "mean",
  lookuptable = NULL,
  if_log = TRUE,
  ...
)

## S3 method for class 'Seurat'
object_ref(
  input,
  cluster_col = NULL,
  var_genes_only = FALSE,
  assay_name = NULL,
  method = "mean",
  lookuptable = NULL,
  if_log = TRUE,
  ...
)

## S3 method for class 'SingleCellExperiment'
object_ref(
  input,
  cluster_col = NULL,
  var_genes_only = FALSE,
  assay_name = NULL,
  method = "mean",
  lookuptable = NULL,
  if_log = TRUE,
  ...
)

Arguments

input

object after tsne or umap projections and clustering

...

additional arguments

cluster_col

column name where classified cluster names are stored in seurat meta data, cannot be "rn"

var_genes_only

whether to keep only var.genes in the final matrix output, could also look up genes used for PCA

assay_name

any additional assay data, such as ADT, to include. If more than 1, pass a vector of names

method

whether to take mean (default) or median

lookuptable

if not supplied, will look in built-in table for object parsing

if_log

input data is natural log, averaging will be done on unlogged data

Value

reference expression matrix, with genes as row names, and cell types as column names

Examples

so <- so_pbmc()
object_ref(
    so,
    cluster_col = "seurat_clusters"
)

NCBI-Hackathons/RClusterCT documentation built on Aug. 30, 2024, 2:05 a.m.