Show the effect of regressing out plate effects on the PCs

before_after_pca_and_plate_regression_plots(
  counts,
  pca_basis_data,
  x_pc,
  y_pc,
  meta,
  plate_colors,
  plot_title,
  pc_levels = NA
)

Arguments

counts

log normalized "counts"

pca_basis_data

data from which to create the PCA basis vectors

x_pc

which PC to plot on the x axis

y_pc

which PC to plot on the Y axis

meta

sample metadata. Rows should be in same order as counts

plate_colors

vector of colors for each batch

plot_title

title of plot

pc_levels

a vector of PC levels, eg 1,3,6,2,4,5 which will control the order which the PCs are plotted

Value

A list that includes plots and data