PomaCorr: Correlation Analysis

View source: R/PomaCorr.R

PomaCorrR Documentation

Correlation Analysis

Description

PomaCorr computes all pairwise correlations in the data and generates a correlation plot.

Usage

PomaCorr(
  data,
  method = "pearson",
  cluster = TRUE,
  corrplot_shape = "square",
  sig_level = 1
)

Arguments

data

A SummarizedExperiment object.

method

Character. Indicates which correlation coefficient has to be computed. Options are "pearson" (default), "kendall", and "spearman".

cluster

Logical. Indicates whether the correlation plot will be ordered using the hclust function. Default is TRUE.

corrplot_shape

Character. Indicates the visualization method of the correlation plot to be used. Allowed values are "square" (default) and "circle".

sig_level

Numeric. Indicates the significance level. If the correlation p-value exceeds this threshold, the corresponding correlation coefficient is considered insignificant, and that pair will be hidden in the correlation plot. The default is 1, meaning all correlations are included in the plot. For datasets with more than 500 features, this threshold is ignored, and all pairwise correlations are displayed in the plot.

Value

A list with the results.

Author(s)

Pol Castellano-Escuder

Examples

## Output is a list with objects `correlations` (tibble) and `corrplot` (ggplot2 object)
data <- POMA::st000284 # Example SummarizedExperiment object included in POMA

data %>% 
  PomaCorr(method = "pearson")

pcastellanoescuder/POMA_package documentation built on Oct. 13, 2024, 8:47 p.m.