man/plotSCEDimReduceColData.Rd
f976af1d
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/ggPlotting.R
 \name{plotSCEDimReduceColData}
 \alias{plotSCEDimReduceColData}
 \title{Dimension reduction plot tool for colData}
 \usage{
 plotSCEDimReduceColData(
   inSCE,
2b1d02d2
   sample = NULL,
cc57a72f
   colorBy,
42b943b7
   groupBy = NULL,
f976af1d
   conditionClass = NULL,
cc57a72f
   shape = NULL,
   reducedDimName = NULL,
f976af1d
   xlab = NULL,
   ylab = NULL,
   dim1 = NULL,
   dim2 = NULL,
cc57a72f
   bin = NULL,
   binLabel = NULL,
bc6984ea
   dotSize = 2,
f976af1d
   transparency = 1,
b2b63db0
   colorLow = "white",
   colorMid = "gray",
   colorHigh = "blue",
f976af1d
   defaultTheme = TRUE,
   title = NULL,
   titleSize = 15,
   labelClusters = TRUE,
   legendTitle = NULL
 )
 }
 \arguments{
3fcae1c4
 \item{inSCE}{Input \linkS4class{SingleCellExperiment} object with saved
 dimension reduction components or a variable with saved results. Required}
f976af1d
 
2b1d02d2
 \item{sample}{Character vector. Indicates which sample each cell belongs to.}
 
cc57a72f
 \item{colorBy}{Color by a condition(any column of the annotation data).
 Required.}
 
42b943b7
 \item{groupBy}{Group by a condition(any column of the annotation data).
 Default NULL.}
 
cc57a72f
 \item{conditionClass}{Class of the annotation data used in colorBy.
 Options are NULL, "factor" or "numeric". If NULL, class will default to the
 original class. Default NULL.}
f976af1d
 
cc57a72f
 \item{shape}{Add shapes to each condition.}
f976af1d
 
3fcae1c4
 \item{reducedDimName}{Saved dimension reduction matrix name in the
 \linkS4class{SingleCellExperiment} object. Required.}
f976af1d
 
cc57a72f
 \item{xlab}{Character vector. Label for x-axis. Default NULL.}
 
 \item{ylab}{Character vector. Label for y-axis. Default NULL.}
f976af1d
 
cc57a72f
 \item{dim1}{1st dimension to be used for plotting. Can either be a string which specifies
 the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
 the index of the dimension to be plotted. Default is NULL.}
f976af1d
 
cc57a72f
 \item{dim2}{2nd dimension to be used for plotting. Can either be a string which specifies
 the name of the dimension to be plotted from reducedDims, or a numeric value which specifies
 the index of the dimension to be plotted. Default is NULL.}
f976af1d
 
cc57a72f
 \item{bin}{Numeric vector. If single value, will divide the numeric values into the `bin` groups.
 If more than one value, will bin numeric values using values as a cut point.}
f976af1d
 
cc57a72f
 \item{binLabel}{Character vector. Labels for the bins created by the `bin` parameter.
 Default NULL.}
f976af1d
 
bc6984ea
 \item{dotSize}{Size of dots. Default 2.}
f976af1d
 
cc57a72f
 \item{transparency}{Transparency of the dots, values will be 0-1. Default 1.}
f976af1d
 
b2b63db0
 \item{colorLow}{Character. A color available from `colors()`.
 The color will be used to signify the lowest values on the scale.
 Default 'white'.}
 
 \item{colorMid}{Character. A color available from `colors()`.
 The color will be used to signify the midpoint on the scale.
 Default 'gray'.}
 
 \item{colorHigh}{Character. A color available from `colors()`.
 The color will be used to signify the highest values on the scale.
 Default 'blue'.}
 
f976af1d
 \item{defaultTheme}{adds grid to plot when TRUE. Default TRUE.}
 
cc57a72f
 \item{title}{Title of plot. Default NULL.}
f976af1d
 
cc57a72f
 \item{titleSize}{Size of title of plot. Default 15.}
f976af1d
 
 \item{labelClusters}{Logical. Whether the cluster labels are plotted.}
 
 \item{legendTitle}{title of legend. Default NULL.
 Default FALSE.}
 }
 \value{
 a ggplot of the reduced dimensions.
 }
 \description{
 Plot results of reduced dimensions data and
  colors by annotation data stored in the colData slot.
 }
 \examples{
 plotSCEDimReduceColData(
   inSCE = mouseBrainSubsetSCE, colorBy = "tissue",
cc57a72f
   shape = NULL, conditionClass = "factor",
f976af1d
   reducedDimName = "TSNE_counts",
   xlab = "tSNE1", ylab = "tSNE2", labelClusters = TRUE
 )
cc57a72f
 
 plotSCEDimReduceColData(
   inSCE = mouseBrainSubsetSCE, colorBy = "age",
   shape = NULL, conditionClass = "numeric",
bc6984ea
   reducedDimName = "TSNE_counts", bin = c(-Inf, 20, 25, +Inf),
cc57a72f
   xlab = "tSNE1", ylab = "tSNE2", labelClusters = FALSE
 )
f976af1d
 }