classifyCells: classifyCells

View source: R/MULTIseq.Classification.Suite.R

classifyCells R Documentation

classifyCells

Description

'classifyCells' has four steps:
(1) Normalize MULTI-seq sample barcode UMI count matrix
(2) Define positive and background peaks for each barcode distribution PDF
(3) Set barcode-specific thresholds according to the user-defined inter-maxima quantile
(4) Classify cells depending on the number of thresholds each cell surpasses (e.g., 0 thresholds = Negative, 1 = Singlet, >1 = Doublet)

During the MULTI-seq sample classification workflow, 'classifyCells' is used first to perform a quantile-sweep, enabling the maximiation of pSinglet across all barcodes. The quantile maximizing pSinglet quantile is then used to classify cells into sample groups during each round of the workflow.

Usage

 classifyCells(barTable, q) 

Arguments

barTable

MULTI-seq sample barcode UMI count matrix, as generated by MULTIseq.align. Note: Do not include summary columns. Exclude negative cells identified during each round of the MULTI-seq sample classification workflow.

q

Quantile used to set barcode-specific thresholds during sample classification.

Details

Requires the 'KernSmooth' R package

Value

Vector of barcode classification results.

Author(s)

Chris McGinnis and Jennifer Hu

References

Wand MP & Jones MC. Kernel Smoothing. Monographs on Statistics and Applied Probability. Chapman & Hall, 1995.

Examples

  bar.table_sweep.list <- list()
  n <- 0
  for (q in seq(0.01, 0.99, by=0.02)) {
    print(q)
    n <- n + 1
    bar.table_sweep.list[[n]] <- classifyCells(data=barTable, q=q)
    names(bar.table_sweep.list)[n] <- paste("q=",q,sep="")
  }

  findThresh(bar.table_sweep.list, "round1")
  round1.calls <- classifyCells(barTable, q=findQ(res_round1, extrema_round1))

chris-mcginnis-ucsf/MULTI-seq documentation built on Nov. 22, 2023, 8:24 p.m.