object_ref {clustifyr} | R 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 '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

    object_ref(
        s_small3,
        cluster_col = "RNA_snn_res.1"
    )

[Package clustifyr version 1.0.0 Index]