runSingleR {singleCellTK} | R Documentation

## Label cell types with SingleR

### Description

SingleR works with a reference dataset where the cell type labeling is given. Given a reference dataset of samples (single-cell or bulk) with known labels, it assigns those labels to new cells from a test dataset based on similarities in their expression profiles.

### Usage

    runSingleR(
      inSCE,
      useAssay = "logcounts",
      useSCERef = NULL,
      labelColName = NULL,
      useBltinRef = c("hpca", "bpe", "mp", "dice", "immgen", "mouse", "zeisel"),
      level = c("main", "fine", "ont"),
      featureType = c("symbol", "ensembl"),
      labelByCluster = NULL
    )

### Arguments

`inSCE` | SingleCellExperiment inherited object. Required.
`useAssay` | character. A string specifying which assay to use for expression profile identification. Required.
`useSCERef` | SingleCellExperiment inherited object. An optional customized reference dataset. Default `NULL`.
`labelColName` | A single character. A string specifying the column in `colData(useSCERef)` that stores the cell type labeling. Default `NULL`.
`useBltinRef` | A single character. A string that specifies a reference provided by SingleR. Choose from `"hpca", "bpe", "mp", "dice", "immgen", "mouse", "zeisel"`. See detail. Default `"hpca"`.
`level` | A string for cell type labeling level. Used only when using some of the SingleR built-in references. Choose from `"main", "fine", "ont"`. Default `"main"`.
`featureType` | A string for whether to use gene symbols or Ensembl IDs when using a SingleR built-in reference. Should be set based on the type of `rownames` of `inSCE`. Choose from `"symbol", "ensembl"`. Default `"symbol"`.
`labelByCluster` | A single character. A string specifying the column name in `colData(inSCE)` that stores clustering labels. Use this when users want to only label cells on cluster level, instead of performing calculation on each cell. Default `NULL`.

### Value

Input SCE object with cell type labeling updated in `colData(inSCE)`, together with scoring metrics.

### Examples

    data("sceBatches")
    logcounts(sceBatches) <- log(counts(sceBatches) + 1)
    #sceBatches <- runSingleR(sceBatches, useBltinRef = "mp")

[Package singleCellTK version 2.2.0 Index]