This function generates a heatmap showing the correlation between the double bond and chain length of lipids.

heatmap_chain_db(
  processed_se,
  char,
  char_feature = NULL,
  ref_group,
  test = c("t-test", "Wilcoxon test", "One-way ANOVA", "Kruskal–Wallis test"),
  significant = c("pval", "padj"),
  p_cutoff = 0.05,
  FC_cutoff = 1,
  transform = c("none", "log10", "square", "cube")
)

Arguments

processed_se

A SummarizedExperiment object constructed by as_summarized_experiment and processed by data_process.

char

Character. A lipid characteristic selected from the chain_db list returned by list_lipid_char.

char_feature

Character/NULL. A feature selected by users from char to visualize the specific plot for the selected category of that characteristic. For example, if char is 'class' and char_feature is 'Cer', the resulting plots will display data for 'Cer' within the 'class' category. Set NULL to prevent selecting any feature as char_feature.

ref_group

Character. Group name of the reference group. It must be one of the group names in the group information table's group column.

test

Character. The method to use for comparing means. Allowed method include "t-test", "Wilcoxon test", "One-way ANOVA", and "Kruskal–Wallis test". "t-test", "Wilcoxon test" are for two-group data, and "One-way ANOVA" and "Kruskal–Wallis test" are for multi-group data. Default is 't-test'.

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

FC_cutoff

Numeric. Significance of the fold-change, which is only applicable for the two-group data. Default is 1.

transform

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

Value

Return a list of 2 lists.

  1. total_chain: the result list of total chain.

  2. each_chain: the result list of fatty acids chain.

Examples

data("de_data_twoGroup")
processed_se_twoGroup <- data_process(
    se=de_data_twoGroup, exclude_missing=TRUE, exclude_missing_pct=70,
    replace_na_method='min', replace_na_method_ref=0.5,
    normalization='Percentage')
char_list <- list_lipid_char(processed_se_twoGroup)$chain_db_list
#> There are 4 ratio characteristics that can be converted in your dataset.
print(char_list)
#>            Lipid classification            Lipid classification 
#>                      "Category"                    "Main.Class" 
#>            Lipid classification            Lipid classification 
#>                     "Sub.Class"                         "class" 
#> Physical or chemical properties Physical or chemical properties 
#>             "Bilayer.Thickness"                     "Bond.type" 
#> Physical or chemical properties Physical or chemical properties 
#>              "Headgroup.Charge"           "Intrinsic.Curvature" 
#> Physical or chemical properties Physical or chemical properties 
#>             "Lateral.Diffusion"        "Transition.Temperature" 
#>              Cellular component                        Function 
#>            "Cellular.Component"                      "Function" 
heatmap_all_twoGroup <- heatmap_chain_db(
    processed_se_twoGroup, char='class', char_feature=NULL, ref_group='ctrl',
    test='t-test', significant='pval', p_cutoff=0.05, FC_cutoff=1, transform='log10')
heatmap_one_twoGroup <- heatmap_chain_db(
    processed_se_twoGroup, char='class', char_feature='PC', ref_group='ctrl',
    test='t-test', significant='pval', p_cutoff=0.05, FC_cutoff=1, transform='log10')

data("se_multiGroup")
processed_se_multiGroup <- data_process(
    se=se_multiGroup, exclude_missing=TRUE, exclude_missing_pct=70,
    replace_na_method='min', replace_na_method_ref=0.5,
    normalization='Percentage')
char_list <- list_lipid_char(processed_se_multiGroup)$chain_db_list
#> There are 4 ratio characteristics that can be converted in your dataset.
print(char_list)
#>            Lipid classification            Lipid classification 
#>                      "Category"                    "Main.Class" 
#>            Lipid classification            Lipid classification 
#>                     "Sub.Class"                         "class" 
#> Physical or chemical properties Physical or chemical properties 
#>             "Bilayer.Thickness"                     "Bond.type" 
#> Physical or chemical properties Physical or chemical properties 
#>              "Headgroup.Charge"           "Intrinsic.Curvature" 
#> Physical or chemical properties Physical or chemical properties 
#>             "Lateral.Diffusion"        "Transition.Temperature" 
#>              Cellular component                        Function 
#>            "Cellular.Component"                      "Function" 
heatmap_all_multiGroup <- heatmap_chain_db(
    processed_se_multiGroup, char='class', char_feature=NULL, ref_group='ctrl',
    test='One-way ANOVA', significant='pval', p_cutoff=0.05, FC_cutoff=NULL,
    transform='log10')
heatmap_one_multiGroup <- heatmap_chain_db(
    processed_se_multiGroup, char='class', char_feature='PC', ref_group='ctrl',
    test='One-way ANOVA', significant='pval', p_cutoff=0.05, FC_cutoff=NULL,
    transform='log10')