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

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)
#> Error in is(object, "IBRAP"): object 'object' not found