% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/plotSNE.R
\docType{methods}
\name{plotSNE}
\alias{plotSNE}
\alias{plotSNE,daFrame-method}
\title{plot t-SNE}
\usage{
plotSNE(x, ...)

\S4method{plotSNE}{daFrame}(x, color_by = 20, facet = NULL)
}
\arguments{
\item{x}{a \code{\link{daFrame}}.}

\item{...}{optional arguments.}

\item{color_by}{numeric value or character string specifying a clustering
OR a character string specifying an antibody whose expression to color by.}

\item{facet}{a character string specifying a factor to subset the data by.
One of \code{names(rowData(x))}. Defaults to NULL.}
}
\value{
a \code{ggplot} object.
}
\description{
t-SNE plot colored by marker expression or clustering.
}
\examples{
# construct daFrame
data(PBMC_fs, PBMC_panel, PBMC_md)
re <- daFrame(PBMC_fs, PBMC_panel, PBMC_md)

# run clustering
lineage <- c("CD3", "CD45", "CD4", "CD20", "CD33", 
    "CD123", "CD14", "IgM", "HLA_DR", "CD7")
re <- cluster(re, cols_to_use=lineage)

# run t-SNE
re <- tSNE(re, n=50)

# color by clustering
plotSNE(re, color_by=12)

# color by marker expression
plotSNE(re, color_by="pNFkB", facet="condition")

}
\references{
Nowicka M, Krieg C, Weber LM et al. 
CyTOF workflow: Differential discovery in 
high-throughput high-dimensional cytometry datasets.
\emph{F1000Research} 2017, 6:748 (doi: 10.12688/f1000research.11622.1)
}
\author{
Helena Lucia Crowell \email{crowellh@student.ethz.ch}
}
