Skip to contents

This function provides a summary by correlation coefficient of the relationship between clinical features and lipid species or characteristics, indicating its strength and whether it is positive or negative.

Usage

corr_DE_heatmap(
  processed_se,
  char = NULL,
  condition_col,
  side_color_char = NULL,
  significant = "pval",
  p_cutoff = 1,
  ParametricTest = TRUE,
  adjust_p_method = "BH",
  distfun = "spearman",
  hclustfun = "average",
  transform = "log10",
  type = "Sp"
)

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 returned by list_lipid_char.

condition_col

Character.The column names used to extract the condition table from the group information table, including clinical conditions such as disease status or gene dependency scores.

side_color_char

Character. A lipid characteristic used for plotting the side color of heatmap. It must be selected from the common list returned by list_lipid_char.

significant

Character. The p-value to be used for the statistically significant. Must be one of "pval" or "padj". Default is 'pval'.

p_cutoff

Numeric. Significant level. Default is 1.

ParametricTest

Logical. Whether to use parametric tests for differential expression analysis. If TRUE (default), uses t-test for two-group comparison and One-way ANOVA for multi-group comparison. If FALSE, uses Wilcoxon test for two-group comparison and Kruskal-Wallis test for multi-group comparison.

adjust_p_method

Character. The correction method of p-value. Allowed methods include "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", and "none". Default is 'BH'.

distfun

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

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'.

transform

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

type

Character. Specifies the correlation type: 'Sp' for lipid species correlation and 'Char' for lipid characteristic correlation. Default is 'Sp'.

Value

Return a SummarizedExperiment object containing analysis results.

Examples

data("corr_data")
processed_se <- data_process(
    corr_data, exclude_missing=TRUE, exclude_missing_pct=70, replace_na_method='min',
    replace_na_method_ref=0.5, normalization='Percentage', transform='log10')
result <- corr_DE_heatmap(
    processed_se, char=NULL, condition_col=c('Sex', 'Smoking', 'Exacerbations'),
    adjust_p_method='BH', significant='pval', p_cutoff=1, side_color_char=NULL,
    distfun='spearman', hclustfun='average', transform='log10', type='Sp')
#> No adjusted variables is selected.