View source: R/visualization-functions.R
correlate_and_plot | R Documentation |
Identify covariates that significantly, as defined by a false discovery rate (FDR) threshold, correlate with PCs computed from gene counts. This function wraps 'plot_pcs_with_covariates()' to return a heatmap to visualize this relationship.
correlate_and_plot(
principal_components,
clean_metadata,
correlation_type,
weights = NULL,
to_plot = FALSE,
exclude_missing_data = NULL,
maximum_fdr = 0.1
)
principal_components |
Center, scaled and rotated principal components matrix. |
clean_metadata |
A data frame with sample identifiers as rownames and variables as
factors or numeric as determined by |
correlation_type |
Allowed values are "pearson", "spearman" and
"kendall". See |
weights |
A numeric vector of the proportion of variance explained (PVE). Defaults to NULL. |
to_plot |
Logical indicating whether correlation values should be plotted. Defaults to FALSE. |
exclude_missing_data |
A vector with column names to exclude from 'clean_metadata'. |
maximum_fdr |
Maximum allowable false discovery rate (FDR). Defaults to 0.1. |
A list.
plot - A customized heatmap of significant covariates and PCs correlated.
significant_covariates - A vector of covariates where correlation p-value meets the FDR threshold.
effects_significant_vars - A vector correlation values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.