barTSNE: barTSNE

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

barTSNE R Documentation

barTSNE

Description

'barTSNE' normalizes raw MULTI-seq barcode UMI count matrices and performs tSNE on the normalized data. Number of PCs used for tSNE is equal to the number of barcodes (i.e., number of columns in barcode UMI count matrix). Users should run 'barTSNE' and visually check for enrichment in barcode space prior to sample classification to ensure that missing barcodes are not utilized.

Usage

 barTSNE(barTable) 

Arguments

barTable

MULTI-seq sample barcode UMI count matrix, as generated by MULTIseq.align. Note: Do not include summary columns (e.g., nUMI, nUMI_total) in tSNE visualization.

Details

Requires 'Rtsne' R package

Value

Dataframe containing 2-D tSNE embedding coordinates and normalized barcode UMI counts for visualization purposes (i.e., spot-checking barcodes).

Author(s)

Chris McGinnis

References

van der Maaten LJP. Accelerating t-SNE using Tree-Based Algorithms. JMLR. 2014; 15:3221-45.

Examples

  bar.tsne <- barTSNE(barTable)
  pdf("barcode.space.sweep.pdf")
  for (i in 3:ncol(bar.tsne))
    ggplot(bar.tsne, aes(x=TSNE1, y=TSNE2, color=bar.tsne[,i])) +
    geom_point() +
    scale_color_gradient(low="black",high="red") +
    ggtitle(colnames(bar.tsne)[i])
  dev.off()

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