% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_single_cell.R
\name{print_tsne}
\alias{print_tsne}
\title{Plot tSNE}
\usage{
print_tsne(i, factorisation = SDAresults, cell_metadata = cell_data,
  jitter = 0, colourscale = "diverging", expression_matrix = data,
  princurves = principal_curves, dim1 = "Tsne1_QC1",
  dim2 = "Tsne2_QC1", flip = FALSE, predict = FALSE, curve = FALSE,
  stages = FALSE, point_size = 1, log = FALSE,
  principal_curve = "df_9", curve_width = 0.5)
}
\arguments{
\item{i}{; either a numeric value corresponding to the component to plot, a gene name,
or the name of a variable stored in cell_data such as "group", "PseudoTime", or "library_size"}

\item{factorisation}{SDA factorisation object, output of SDAtools::load_results()}

\item{cell_metadata}{data.table with columns cell, Tsne1_QC1, Tsne2_QC2, and components V1, V2 etc.}

\item{expression_matrix}{cell by gene matrix of expression values}

\item{princurves}{list of outputs of princurve()}

\item{dim1}{string; name of variable in cell_metadata of the x axis to be used for the plot}

\item{dim2}{string; name of variable in cell_metadata of the y axis to be used for the plot}

\item{flip}{logical; should the cell scores be multiplied by -1 (score/gene loading sign combination are arbitrary like PCA scores).}

\item{predict}{logical; Should gene expression be the predicted (imputed) values or raw normalised}

\item{curve}{logical; Should principal curve (pseudotime) by plotted on top of the tSNE plot}

\item{stages}{logical; Should the stages be annotated}

\item{point_size}{numeric; size of point}

\item{log}{logical; should the varible mapped to the colour of the points be log transformed, default: F}

\item{principal_curve}{string; name of list entry in principal_curves object, to use for pseudotime line}

\item{curve_width}{numeric; width of the pseudotime curve}
}
\value{
The Y matrix from Rtsne output, rotated by angle
}
\description{
Plot tSNE
}
\details{
will add titles if you run load_component_orderings()
}
