This function will group, summarize and then plot data from an ArchRProject for visual comparison.

  ArchRProj = NULL,
  groupBy = "Sample",
  colorBy = "colData",
  name = "TSSEnrichment",
  imputeWeights = if (!grepl("coldata", tolower(colorBy[1])))
  maxCells = 1000,
  quantCut = c(0.002, 0.998),
  log2Norm = NULL,
  pal = NULL,
  discreteSet = "stallion",
  ylim = NULL,
  size = 0.5,
  baseSize = 6,
  ratioYX = NULL,
  ridgeScale = 2,
  plotAs = "ridges",
  threads = getArchRThreads(),



An ArchRProject object.


The name of the column in cellColData to use for grouping cells together for summarizing and plotting.


A string indicating whether the numeric values to be used in the violin plot should be from a column in cellColData ("cellColData") or from a data matrix in the ArrowFiles (i.e. "GeneScoreMatrix", "MotifMatrix", "PeakMatrix").


The name of the column in cellColData or the featureName/rowname of the data matrix to be used for plotting. For example if colorBy is "cellColData" then name refers to a column name in the cellcoldata (see getCellcoldata()). If colorBy is "GeneScoreMatrix" then name refers to a gene name which can be listed by getFeatures(ArchRProj, useMatrix = "GeneScoreMatrix").


The weights to be used for imputing numerical values for each cell as a linear combination of other cells values. See addImputationWeights() and getImutationWeights() for more information.


The maximum cells to consider when making the plot.


If this is not null, a quantile cut is performed to threshold the top and bottom of the distribution of values. This prevents skewed color scales caused by strong outliers. The format of this should be c(a,b) where a is the upper threshold and b is the lower threshold. For example, quantCut = c(0.025,0.975) will take the top and bottom 2.5 percent of values and set them to the value of the 97.5th and 2.5th percentile values respectively.


A boolean value indicating whether a log2 transformation should be performed on the values (if continuous) in plotting.


A custom palette (see paletteDiscrete or ArchRPalettes) used to override discreteSet/continuousSet for coloring vector.


The name of a discrete palette from ArchRPalettes for visualizing colorBy if a discrete color set is desired.


A vector of two numeric values indicating the lower and upper bounds of the y-axis on the plot.


The numeric size of the points to be plotted.


The base font size to use in the plot.


The aspect ratio of the x and y axes on the plot.


The scale factor for the relative heights of each ridge when making a ridgeplot with ggridges.


A string that indicates whether a rigdge plot ("ridges") should be plotted or a violin plot ("violin") should be plotted.


The number of threads to be used for parallel computing.


Additional parameters to pass to ggGroup().