The correlation heatmap illustrates the correlation between lipid classes or samples and depicts the patterns in each group.

heatmap_correlation(
  processed_se,
  char,
  transform = c("none", "log10", "square", "cube"),
  correlation = c("pearson", "spearman"),
  distfun = c("pearson", "spearman", "kendall", "euclidean", "maximum", "manhattan",
    "canberra", "binary", "minkowski"),
  hclustfun = c("ward.D", "ward.D2", "single", "complete", "average", "mcquitty",
    "median", "centroid"),
  type = c("sample", "class")
)

Arguments

processed_se

A SummarizedExperiment object constructed by as_summarized_experiment and processed by data_process.

char

Character. A lipid characteristic selected from the common list r eturned by list_lipid_char.

transform

Character. Method for data transformation. Allowed methods include "none", "log10", "square", and "cube". Select 'none' to skip data transformation. Default is 'log10'.

correlation

Character. The method for computing correlation coefficient. Allowed methods includes "pearson" and "spearman". Default is 'pearson'.

distfun

Character. The distance measure for computing correlation coefficient (or covariance). Allowed methods include "pearson", "spearman", "kendall", euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski". Default is 'maximum'.

hclustfun

Character. The agglomeration method. This should be (an unambiguous abbreviation of) one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). Default is 'average'.

type

Character. It must be 'sample' or 'class'. 'sample' outputs the correlation results of samples, and 'class' outputs output the correlation results of lipid class.

Value

Return a list of 1 interactive plot, 1 static plot, and 1 table.

  1. interactive_heatmap & static_heatmap: heatmaps illustrate the correlation between samples or lipid class

  2. corr_coef_matrix: the matrix of the heatmap.

Examples

data("profiling_data")
processed_se <- data_process(
    profiling_data, exclude_missing=TRUE, exclude_missing_pct=70,
    replace_na_method='min', replace_na_method_ref=0.5, normalization='Percentage')
result <- heatmap_correlation(processed_se, char=NULL, transform='log10',
    correlation='pearson', distfun='maximum', hclustfun='average', type='sample')