multidensity: Density plots with expression values overlapped

View source: R/multidensity.R

multidensityR Documentation

Density plots with expression values overlapped

Description

This function draws multidensity plot with all FCS files included in a fcs.SCE object. If there are more files than limit specified in ridgeline.lim, instead of plottting density in a ridge-way all density lines will be overlapped.

Usage

multidensity(
  fcs.SCE,
  assay.i,
  show.markers = "all",
  color.by = NULL,
  subsampling = NULL,
  interactive = F,
  ridgeline.lim = 15,
  colors = NULL
)

Arguments

fcs.SCE

A fcs.SCE object generated through FlowCT::fcs.SCE().

assay.i

Name of matrix stored in the fcs.SCE object from which calculate correlation. Default = "normalized".

show.markers

Vector with markers to plot. Default = "all".

color.by

Variable name (from colData(fcs.SCE)) for lines coloring.

subsampling

Numeric value indicating how many events use to calculate density lines and speed up plotting. Default = NULL.

interactive

Logical indicating if the user can interact with the (only overlapping-lines) plot. Default = FALSE.

ridgeline.lim

Numeric value specifying the limit for shifting from ridgeline-mode to overlapping-lines plot. Default = 15.

colors

Vector with colors for plotting (only available for no-ridgeline plot). Default = NULL (i.e., it will choose automatically a vector of colors according to FlowCT::div.colors()).

Examples

## Not run: 
multidensity(fcs.SCE = fcs, assay.i = "normalized", subsampling = 1000)
multidensity(fcs, assay.i = 2, color.by = "file_name", ridgeline.lim = 0, 
     show.markers = c("CD62L", "CD4"), interactive = T)

## End(Not run)

jgarces02/FlowCT documentation built on March 28, 2023, 12:42 p.m.