Assign sample-of-origin for each cell, annotate doublets.
HTODemux(
object,
assay = "HTO",
positive.quantile = 0.99,
init = NULL,
nstarts = 100,
kfunc = "clara",
nsamples = 100,
seed = 42,
verbose = TRUE
)
Seurat object. Assumes that the hash tag oligo (HTO) data has been added and normalized.
Name of the Hashtag assay (HTO by default)
The quantile of inferred 'negative' distribution for each hashtag - over which the cell is considered 'positive'. Default is 0.99
Initial number of clusters for hashtags. Default is the # of hashtag oligo names + 1 (to account for negatives)
nstarts value for k-means clustering (for kfunc = "kmeans"). 100 by default
Clustering function for initial hashtag grouping. Default is "clara" for fast k-medoids clustering on large applications, also support "kmeans" for kmeans clustering
Number of samples to be drawn from the dataset used for clustering, for kfunc = "clara"
Sets the random seed. If NULL, seed is not set
Prints the output
The Seurat object with the following demultiplexed information stored in the meta data:
Name of hashtag with the highest signal
Name of hashtag with the second highest signal
The difference between signals for hash.maxID and hash.secondID
Classification result, with doublets/multiplets named by the top two highest hashtags
Global classification result (singlet, doublet or negative)
Classification result where doublet IDs are collapsed
if (FALSE) {
object <- HTODemux(object)
}