Skip to contents

Takes Coereba_MarkerExpressions data.frame and returns Marker Expression Beeswarm plots

Usage

Utility_MarkerPlots(
  data,
  panel,
  myfactor,
  shape_palette,
  fill_palette,
  cex = 1,
  size = 1.5,
  corral.width = 1,
  crossbar = "median",
  XAxisLevels = NULL,
  savePlot = FALSE,
  outpath = NULL,
  filename = NULL,
  dpi = 600,
  width = 9,
  height = 3,
  filterForThese = NULL,
  combinatorialStartsWith = NULL,
  style = "overlap"
)

Arguments

data

A data.frame of metadata and summarized markers from Utility_MarkerExpressions

panel

A .csv or data.frame containing Fluorophore and Marker columns of your panel markers.

myfactor

The column name by which you want to group outputs in the plot

shape_palette

A scale manual list assigning shape to factor level

fill_palette

A scale fill list assigning fill to factor level

cex

geom_beeswarm argument, default 1

size

geom_beeswarm argument, default 1.5

corral.width

geom_beeswarm argument, default 1

crossbar

geom_boxplot argument, default "median"

XAxisLevels

Provide list marker names correct order for x-axis reordering, default NULL

savePlot

Whether to save ggplot object to outfolder, default = FALSE

outpath

Specify file.path to desired storage location

filename

Specify desired filename

dpi

Specify desired pixel resolution

width

Specify desired width inches

height

Specify desired height inches

filterForThese

A list containing names of markers desire to include final plot, default NULL

combinatorialStartsWith

Default NULL, if aggregated data is combinatorial, starting string of characters (ex. CD45)

style

Default is "overlap", alternatively "separate" returns individual geom_boxplots

Value

Returns a ggplot object to R or designated Folder

Examples


shape_ptype <- c("HU" = 22, "HEU-lo" = 21, "HEU-hi" = 21)
fill_ptype <- c("HU" = "white", "HEU-lo" = "darkgray", "HEU-hi" = "black")

File_Location <- system.file("extdata", package = "Coereba")
panelPath <- file.path(File_Location, "ILTPanelTetramer.csv")
binaryPath <- file.path(File_Location, "HeatmapExample.csv")
dataPath <- file.path(File_Location, "ReadyFileExample.csv")
panelData <- read.csv(panelPath, check.names=FALSE)
binaryData <- read.csv(binaryPath, check.names=FALSE)
dataData <- read.csv(dataPath, check.names=FALSE)

All <- Coereba_MarkerExpressions(data=dataData, binary=binaryData,
 panel=panelData, starter="SparkBlue550")
#> Error in Coereba_MarkerExpressions(data = dataData, binary = binaryData,     panel = panelData, starter = "SparkBlue550"): unused arguments (data = dataData, binary = binaryData, panel = panelData, starter = "SparkBlue550")

ThePlot <- Utility_MarkerPlots(data=All, panel=panelData,
 myfactor="ptype", shape_palette = shape_ptype,
 fill_palette = fill_ptype, filterForThese=c("CD7", "CD4", "CD8"),
 XAxisLevels = c("CD7", "CD4", "CD8"))
#> Error: object 'All' not found