R/visualization-functions.R
plot_pcs_with_covariates.Rd
Explore relationship between principal components (PCs) and covariates
plot_pcs_with_covariates(correlation_values, note_threshold = NULL)
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.
A customized string to note method used to adjust p-values for multiple comparisons. Defaults to NULL.
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"
}