perform.singleR.annotation: Performs automated cell annotation on query datasets using...

View source: R/perform.singleR.annotation.R

perform.singleR.annotationR Documentation

Performs automated cell annotation on query datasets using reference data

Description

SingleR iterates through singular cells and iterates through probabilitiy comparisons to identify which cell type the query cell is likely to be. If a probably cell type cannot be discovered then

Usage

perform.singleR.annotation(
  object,
  assay = "RAW",
  slot = "counts",
  ref,
  log.transform.query = TRUE,
  tpm.transform.query = FALSE,
  log.transform.ref = TRUE,
  tpm.transform.ref = FALSE,
  ref.labels,
  column.suffix = "1",
  verbose = FALSE,
  seed = 1234,
  ...
)

Arguments

object

IBRAP S4 class object

assay

Character. String containing indicating which assay to use

slot

Character. String indicating which slot within the assay should be sourced

ref

AnyMatrix. A matrix of the reference datasets, if data is end-bias then it should be log normalised, if it is full-length then it requires tpm normalisation. Both can be completed within this function.

ref.labels

Vector. The cluster assignments for the reference data. Default = NULL

column.suffix

Character. A suffix to append the end of the new metadata columns if this functiuons is to be used multiple times. Default = '1'

verbose

Logical Should function messages be printed?

seed

Numeric. What should the seed be set as. Default = 1234

...

arguments to be passed to singleR::SingleR

log.transform

Boolean. Should the reference data be log transformed. Default = TRUE

tpm.transform

Boolean. Should the reference data be tpm normalised. Default = FALSE

Value

Produces a new 'methods' assay containing normalised, scaled and HVGs.

Examples


object <- perform.singleR.annotation(object = object, ref = reference_matrix, ref.labels = metadata_reference$celltype)


connorhknight/IBRAP documentation built on March 9, 2023, 7:01 p.m.