ruv_cancorplot function

RUV Canonical Correlation Plot

RUV Canonical Correlation Plot

Canonical correlation plot

ruv_cancorplot(Y, X, ctl, W1 = NULL, W2 = NULL)

Arguments

  • Y: The data matrix. Rows are observations and columns are features (e.g. genes).
  • X: Factor(s) of interest. Can be a vector, factor, matrix, or dataframe. Must have the same length (or number of rows) as the number of row of Y.
  • ctl: Index of negative controls.
  • W1: Optional. The left singular vectors of Y. Can be included to speed up execution.
  • W2: Optional. The left singular vectors of Y[,ctl]. Can be included to speed up execution.

Details

Plots, as a function of k, the square of of the first canonical correlation of X and the first k left singular vectors of Y (and also, similarly, Y[,ctl]).

Returns

A ggplot.

Author(s)

Johann Gagnon-Bartsch