Plot mc+cells using pre-defined mc colorization, breakdown by given metadata field (e.g. patient)

mcell_mc2d_plot_by_factor(
  mc2d_id,
  mat_id,
  meta_field,
  meta_data_vals = NULL,
  single_plot = T,
  filter_values = NULL,
  filter_name = NULL,
  ncols = NULL,
  neto_points = F,
  colors = NULL,
  base_dir = NULL,
  filt_mc = NULL,
  na_color = "white"
)

Arguments

mc2d_id

mc2d object to use for plot

mat_id

mat object matching mc2d_id that contains the cells metadata information

meta_field

field name (in mat cell_metadata slot) to split cells by

meta_data_vals

actual named vector (names are cells, values are the metadata to factor on), if this is not null, the meta_field is not used

single_plot

output all panels in a single plot or plot per panel (T)

filter_values

to filter meta_field values by (NULL)

filter_name

name to add to plots (NULL)

ncols

number of panels in column (if single_plot is true), automatically calculate if NULL

neto_points

plot without a box and a title (relevant if single_plot=F)