Explore relationship between principal components (PCs) and covariates

plot_pcs_with_covariates(correlation_values, note_threshold = NULL)

Arguments

correlation_values

A data frame that includes the p-value of the correlation of a covariate to a PC as `pvalue`. Additionally, the data frame should include a logical column `significant_correlations` to indicate whether the FDR threshold is met for that variable.

note_threshold

A customized string to note method used to adjust p-values for multiple comparisons. Defaults to NULL.

Examples

if (FALSE) {
correlation_values <- data.frame(
  compare = "PC1 (23.16%)",
  covariates = "batch",
  pvalue = 0.56519736,
  r = "0.05729811",
  significant_correlations = FALSE
  )
note_threshold <- "FDR <= 0.1"
}