GetTransferPredictions: Get the predicted identity

Description Usage Arguments Value Examples

View source: R/integration.R

Description

Utility function to easily pull out the name of the class with the maximum prediction. This is useful if you've set prediction.assay = TRUE in TransferData and want to have a vector with the predicted class.

Usage

1
2
3
4
5
6
GetTransferPredictions(
  object,
  assay = "predictions",
  slot = "data",
  score.filter = 0.75
)

Arguments

object

Seurat object

assay

Name of the assay holding the predictions

slot

Slot of the assay in which the prediction scores are stored

score.filter

Return "Unassigned" for any cell with a score less than this value

Value

Returns a vector of predicted class names

Examples

1
2
3
4
5
6
## Not run: 
  prediction.assay <- TransferData(anchorset = anchors, refdata = reference$class)
  query[["predictions"]] <- prediction.assay
  query$predicted.id <- GetTransferPredictions(query)

## End(Not run)

ibseq/scs-analysis documentation built on Feb. 27, 2021, 12:35 a.m.