% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/plotCodes.R
\docType{methods}
\name{plotCodes}
\alias{plotCodes}
\alias{plotCodes,daFrame-method}
\title{tSNE and PCA on SOM codes}
\usage{
plotCodes(x, ...)

\S4method{plotCodes}{daFrame}(x, k = 20, out_path = NULL, verbose = TRUE)
}
\arguments{
\item{x}{a \code{\link{daFrame}}.}

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

\item{k}{numeric or character string. 
Specifies the clustering to use for color coding.}

\item{out_path}{character string. If specified, output will be generated in this location.}

\item{verbose}{logical. Specifies whether information on progress should be reported.}
}
\value{
a \code{ggplot} object.
}
\description{
Plots the tSNE and PCA representing the SOM codes as inferred
by \pkg{FlowSOM}. Sizes are scaled to the total number of events assigned 
to each cluster, and points are color according to their cluster ID upon 
\pkg{ConsensusClusterPlus} metaclustering into \code{k} clusters.
}
\examples{
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)
plotCodes(re)

}
\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}
}
