Heatmap of differential metabolites
Usage
pHeatmap(
object,
group,
fontsize_row = 5,
fontsize_col = 4,
clustering_method = "complete",
clustering_distance_cols = "correlation",
tumor_color = "#d53e4f",
normal_color = "#7FC8A9"
)
Arguments
- object
A dataframe-like data object containing raw metabolite intensity values, with rows corresponding to differential metabolites, and the columns corresponding to the samples
- group
character vector,the data's group information, must tumor and normal
- fontsize_row
numeric, the value of row's fontsize, default is 5
- fontsize_col
numeric, the value of column's fontsize, default is 4
- clustering_method
the method for cluster,default is complete
- clustering_distance_cols
the distance for cluster,default is correlation
- tumor_color
the color for tumor, default is "#d53e4f"
- normal_color
the color for normal, default is "#7FC8A9"
Examples
library(dplyr)
if (FALSE) {
diff_result <- DM(2**meta_dat,group)
# filter the differential metabolites by default fold change >1.5 or < 1/1.5 ,fdr < 0.05 and VIP>1
diff_result_filter <- diff_result %>%
dplyr::filter(fold_change >1.3 | fold_change < 1/1.3) %>%
dplyr::filter(fdr_wilcox<0.1) %>%
dplyr::filter(vip>0.8)
meta_dat_diff <- meta_dat[rownames(meta_dat) %in% diff_result_filter$name,]
p_heatmap <- pHeatmap(meta_dat_diff,
group,
fontsize_row=5,
fontsize_col=4,
clustering_method="ward.D",
clustering_distance_cols="correlation")
}