Skip to contents

WHY BOTH PANELS: the scatter is what a reader will look at anyway and it shows WHERE any batch structure sits; the LISI distribution is what says whether the pattern the eye finds is more than chance. Neither alone is enough – a scattered-looking plot can still be significantly structured at these n, and a significant score with no visible pattern is usually one small batch.

Usage

fig_batch_diagnostic(
  cells,
  report,
  outfile,
  batch_col,
  facet_col = NULL,
  panel_label = "",
  dpi = 200,
  colors = fcs_colors()
)

Arguments

cells

Embedded cell table: one row per cell, carrying umap_1/umap_2, sample_id, population_label and one column per marker.

report

The report.

outfile

Path to write the figure to.

batch_col

Column naming the acquisition batch.

facet_col

Column of cells splitting the embedding panel into one UMAP per level – the timepoint, typically. NULL, or a column with fewer than two levels, draws the single pooled embedding. Default NULL.

panel_label

Marker-panel name added to the figure title; empty for none. Default "".

dpi

Resolution in dots per inch. May be reduced automatically to respect the raster ceiling; see safe_ggsave(). Default 200.

colors

Named list of colours; defaults to the package palette. See fcs_colors(). Default fcs_colors().