Title: | Integrative Visualizations of the Lipidome |
---|---|
Description: | Create lipidome-wide heatmaps of statistics with the 'lipidomeR'. The 'lipidomeR' provides a streamlined pipeline for the systematic interpretation of the lipidome through publication-ready visualizations of regression models fitted on lipidomics data. With 'lipidomeR', associations between covariates and the lipidome can be interpreted systematically and intuitively through heatmaps, where lipids are categorized by the lipid class and are presented on two-dimensional maps organized by the lipid size and level of saturation. This way, the 'lipidomeR' helps you gain an immediate understanding of the multivariate patterns in the lipidome already at first glance. You can create lipidome-wide heatmaps of statistical associations, changes, differences, variation, or other lipid-specific values. The heatmaps are provided with publication-ready quality and the results behind the visualizations are based on rigorous statistical models. |
Authors: | Tommi Suvitaival [aut, cre] |
Maintainer: | Tommi Suvitaival <[email protected]> |
License: | GPL-3 |
Version: | 0.1.2 |
Built: | 2024-11-26 06:28:28 UTC |
Source: | CRAN |
This data set contains levels of 409 named lipids in 118 human breast tumor tissue samples.
data( cancerlipidome )
data( cancerlipidome )
A long-format data frame with 48262 rows and 7 variables:
Participant number
Diagnosis of the type tumor: benign, cancer, or metastasis
Ethnic background of the participant
Diagnosis of the stage of the tumor
Sub-type of the breast tumor. IDC: Invasive Ductal Carcinoma
Name of the lipid. The names are in the format 'XY(C:D)', where 'XY' is the abbreviation of the lipid class, 'C' is the total number of carbon atoms in the fatty-acid chains, and 'D' is the total number of double-bonds in the fatty acid chains.
Measured level of the lipid.
This data is available at the NIH Common Fund's National Metabolomics Data Repository (NMDR) website, the Metabolomics Workbench, https://www.metabolomicsworkbench.org, where it has been assigned Project ID PR000742. The data can be accessed directly via its Project DOI: 10.21228/M8RX01. This work was supported by NIH grant, U2C- DK119886.
Purwaha, P., et al. Unbiased lipidomic profiling of triple-negative breast cancer tissues reveals the association of sphingomyelin levels with patient disease-free survival. Metabolites 8, 41 (2018) (doi: 10.3390/metabo8030041)
# Import the data set. data( cancerlipidome ) # Convert the data into wide format, where each lipid is one column and # each sample is one row. cancerlipidome.wide <- tidyr::pivot_wider( data = cancerlipidome, names_from = Lipid_Name, values_from = Lipid_Level ) # Inspect the data frame. # View( cancerlipidome.wide ) # Create a mapping of the lipid names. names.mapping <- map_lipid_names( x = unique( cancerlipidome$"Lipid_Name" ) ) # Compute the regression models. result.limma <- compute_models_with_limma( x = cancerlipidome.wide, dependent.variables = names.mapping$"Name", independent.variables = c( "Group" ) ) # Create a figure of all lipids and factors. figure.output <- heatmap_lipidome_from_limma( x = result.limma$"model", names.mapping = names.mapping, axis.x.carbons = FALSE, class.facet = "row", plot.all = TRUE, plot.individual = FALSE, print.figure = TRUE, scales = "free", space = "free" ) # Create individual figures for each factor. figure.output <- heatmap_lipidome_from_limma( x = result.limma$"model", names.mapping = names.mapping, axis.x.carbons = FALSE, class.facet = "wrap", omit.class = "PA", plot.all = FALSE, plot.individual = TRUE, print.figure = FALSE, scales = "free", space = "free" ) # Print the figure of differences between cancer and benign tumors. print( figure.output[[ "GroupCancer" ]] )
# Import the data set. data( cancerlipidome ) # Convert the data into wide format, where each lipid is one column and # each sample is one row. cancerlipidome.wide <- tidyr::pivot_wider( data = cancerlipidome, names_from = Lipid_Name, values_from = Lipid_Level ) # Inspect the data frame. # View( cancerlipidome.wide ) # Create a mapping of the lipid names. names.mapping <- map_lipid_names( x = unique( cancerlipidome$"Lipid_Name" ) ) # Compute the regression models. result.limma <- compute_models_with_limma( x = cancerlipidome.wide, dependent.variables = names.mapping$"Name", independent.variables = c( "Group" ) ) # Create a figure of all lipids and factors. figure.output <- heatmap_lipidome_from_limma( x = result.limma$"model", names.mapping = names.mapping, axis.x.carbons = FALSE, class.facet = "row", plot.all = TRUE, plot.individual = FALSE, print.figure = TRUE, scales = "free", space = "free" ) # Create individual figures for each factor. figure.output <- heatmap_lipidome_from_limma( x = result.limma$"model", names.mapping = names.mapping, axis.x.carbons = FALSE, class.facet = "wrap", omit.class = "PA", plot.all = FALSE, plot.individual = TRUE, print.figure = FALSE, scales = "free", space = "free" ) # Print the figure of differences between cancer and benign tumors. print( figure.output[[ "GroupCancer" ]] )
Use this to achieve analysis of variance (ANOVA) or analysis of covariance
(ANCOVA). The F-test is based on a model produced by the function
compute_models_with_limma
.
To use this function, first call the function
compute_models_with_limma
.
compute_F_test_with_limma(x, p.adj.threshold = 0.05, print.table = FALSE)
compute_F_test_with_limma(x, p.adj.threshold = 0.05, print.table = FALSE)
x |
(Required) list of models for which the test will be done.
The F-test will be computed for the first independent variable that was
specified in the |
p.adj.threshold |
(Optional) numeric value specifying the threshold for statistical significance of difference after correction for multiple testing. |
print.table |
(Optional) |
List x
supplemented by the results of the F-test.
compute_models_with_limma
for the model computation
step that is required prior to calling this function.
compute_post_hoc_test_with_limma
for the pairwise
post-hoc comparisons that may follow the F-test done with this function.
Use this function to computing multiple regression models that can be directly supplied to the visualization functions of the 'lipidomeR'.
compute_models_with_limma( x, dependent.variables, independent.variables, random.effect = NULL, formula = NULL, F.test = FALSE, print.table1 = FALSE, scale.dependent.variables = TRUE, scale.independent.variables = FALSE, verbose = TRUE )
compute_models_with_limma( x, dependent.variables, independent.variables, random.effect = NULL, formula = NULL, F.test = FALSE, print.table1 = FALSE, scale.dependent.variables = TRUE, scale.independent.variables = FALSE, verbose = TRUE )
x |
(Required) data matrix. |
dependent.variables |
(Required) vector of names of dependent variables. These should be the names of the lipids. |
independent.variables |
(Required) vector of names of the independent variables. These should be the names of the variables defining the experiment design. |
random.effect |
(Optional) name of a single variable specifying
the random effect for a random-effects model.
For instance, |
formula |
(Optional) character string of model formula in the format accepted by
the function |
F.test |
(Optional) |
print.table1 |
(Optional) |
scale.dependent.variables |
(Optional) |
scale.independent.variables |
(Optional) |
verbose |
(Optional) |
List of regression results the that can be directly supplied as
an argument to the function heatmap_lipidome_from_limma
and
other visualization functions of the lipidomeR.
heatmap_lipidome_from_limma
for visualizing the
output of this function.
Use this function to achieve the post-hoc comparisons between the
multiple levels of an independent variable. These comparisons follow
analysis of variance (ANOVA) or analysis of covariance (ANCOVA).
The pairwise comparisons are based on a result of an F-test produced by
the function compute_F_test_with_limma
.
To use this function, first call the functions
compute_models_with_limma
and
compute_F_test_with_limma
consecutively.
compute_post_hoc_test_with_limma( x, p.adj.threshold = NULL, remap.level.names = FALSE )
compute_post_hoc_test_with_limma( x, p.adj.threshold = NULL, remap.level.names = FALSE )
x |
(Required) list of models for which the test will be done.
The pairwise comparisons will be computed using the levels of the first
independent variable that was specified in
the |
p.adj.threshold |
(Optional) numeric value specifying the threshold of statistical significance in the pairwise comparisons after a correction for multiple testing. We recommend to leave this argument unfilled, leading to the same threshold to be used as in the preceding F-test. |
remap.level.names |
(Optional) |
List x
supplemented by the results of the pairwise
post-hoc comparisons.
compute_models_with_limma
for the model computation
step that is required prior to calling this function.
compute_F_test_with_limma
for the F-test step that is
required prior to calling this function.
Use this function to create a heatmap of any lipid-specific values.
Note: Use the function heatmap_lipidome_from_limma
to create
heatmaps of model statistics.
heatmap_lipidome( x, names.mapping, axis.x.carbons = TRUE, class.facet = "row", fill.direction = "increasing", fill.limits = c(0, 40), fill.midpoint = 20, melt.value.name = "CV", melt.variable.name = NULL, melt.x = TRUE, range.min.N.carbons = 5, range.min.N.double.bonds = 5, scale.fill.log = NULL, scales = "free_y", space = "free", x.names = "row.names", x.variables = NULL )
heatmap_lipidome( x, names.mapping, axis.x.carbons = TRUE, class.facet = "row", fill.direction = "increasing", fill.limits = c(0, 40), fill.midpoint = 20, melt.value.name = "CV", melt.variable.name = NULL, melt.x = TRUE, range.min.N.carbons = 5, range.min.N.double.bonds = 5, scale.fill.log = NULL, scales = "free_y", space = "free", x.names = "row.names", x.variables = NULL )
x |
(Required) named vector of numeric values to create a figure of.
Names need to match to the argument names.mapping through
the function |
names.mapping |
(Required) mapping of lipid names from
the |
axis.x.carbons |
(Optional) |
class.facet |
(Optional) character string with possible values
|
fill.direction |
(Optional) |
fill.limits |
(Optional) numeric vector of length two, indicating the limits of the fill scale. |
fill.midpoint |
(Optional) numeric value specifying the midpoint of the fill scale. |
melt.value.name |
(Optional) character string, specifying the name of the variable that will be shown as fill in the heatmap. |
melt.variable.name |
(Optional) character string, specifying the name of of the variable that will be used to creating faceted sub-heatmaps. |
melt.x |
(Optional) |
range.min.N.carbons |
(Optional) numeric value to specify the minimum range of the axis showing the lipid size (number of carbon atoms in the fatty acid chains). This value can be increased from the default value to improve readability in situtions, where there are lipid classes with little or no variation in the lipid size. |
range.min.N.double.bonds |
(Optional) numeric value to specify the minimum range of the axis showing the lipid saturation (number of double bonds in the fatty acid chains). This value can be increased from the default value to improve readability in situtions, where there are lipid classes with little or no variation in the lipid saturation. |
scale.fill.log |
(Optional) numeric value specifying the base of the logarithm, which will be used to creating a logarithmic scale for the fill scale of the plot. |
scales |
(Optional) character string with possible values
|
space |
(Optional) character string with possible values
|
x.names |
(Optional) character string specifying the name of the
variable in the argument |
x.variables |
(Optional) character vector specifying the names of
the variables, which will be included as individual facets in
the figure.
Use this argument only together with |
Use this function to creating heatmaps of model statistics from
the output of the compute_models_with_limma
function or
related functions (compute_F_test_with_limma
and
compute_post_hoc_test_with_limma
).
heatmap_lipidome_from_limma( x, names.mapping = NULL, axis.x.carbons = TRUE, baseline.adjusted = FALSE, class.facet = "row", class.subset = NULL, F.test = FALSE, omit.class = NULL, omit.factor = NULL, order.factor = FALSE, p.val.thresholds = c(0.01, 0.05, 0.1), p.val.labels = c(8, 4, 3), p.val.label.bg.size = 2, p.val.label.size = 1, p.adj.method = "BH", plot.individual = FALSE, plot.all = TRUE, print.figure = TRUE, print.formula = TRUE, formula.width = 110, legend.key.size.multiplier = 2, range.min.N.carbons = 5, range.min.N.double.bonds = 5, scales = "fixed", shadowtext = FALSE, space = "free", survival = FALSE, verbose = FALSE, wrap.contrast.name = TRUE )
heatmap_lipidome_from_limma( x, names.mapping = NULL, axis.x.carbons = TRUE, baseline.adjusted = FALSE, class.facet = "row", class.subset = NULL, F.test = FALSE, omit.class = NULL, omit.factor = NULL, order.factor = FALSE, p.val.thresholds = c(0.01, 0.05, 0.1), p.val.labels = c(8, 4, 3), p.val.label.bg.size = 2, p.val.label.size = 1, p.adj.method = "BH", plot.individual = FALSE, plot.all = TRUE, print.figure = TRUE, print.formula = TRUE, formula.width = 110, legend.key.size.multiplier = 2, range.min.N.carbons = 5, range.min.N.double.bonds = 5, scales = "fixed", shadowtext = FALSE, space = "free", survival = FALSE, verbose = FALSE, wrap.contrast.name = TRUE )
x |
(Required) list of output from
the |
names.mapping |
(Optional) mapping of lipid names from
the |
axis.x.carbons |
(Optional) |
baseline.adjusted |
|
class.facet |
(Optional) character string with possible values
|
class.subset |
(Optional) character vector specifying a subset of
the lipid classes (e.g., |
F.test |
(Optional) |
omit.class |
(Optional) character vector of lipid classes omitted from
the visualization (e.g., |
omit.factor |
(Optional) character vector of lipid classes omitted from
the visualization (e.g., |
order.factor |
(Optional) |
p.val.thresholds |
(Optional) numeric vector with increasing values of
highlighting thresholds for multiple-testing-corrected p-values.
For instance, |
p.val.labels |
(Optional) numeric vector of point characters for the
p-value highlighting categories specified in the argument
|
p.val.label.bg.size |
(Optional) numeric value to scale the size of the colored background of the symbols that indicate values with statistical significance. The background is used to ensure that the white symbols are visible also when the color of a heatmap rectangle is of a bleak color. |
p.val.label.size |
(Optional) numeric value to scale the size of the symbols that indicate values with statistical significance. |
p.adj.method |
(Optional) name of the method to correct p-values for
multiple testing. Accepted values are as in the function
|
plot.individual |
(Optional) |
plot.all |
(Optional) |
print.figure |
(Optional) |
print.formula |
(Optional) |
formula.width |
(Optional) numeric value to specify the width of a line
in the model formula. Relevant only if |
legend.key.size.multiplier |
(Optional) numeric value to scale the size of the figure (key) legends. |
range.min.N.carbons |
(Optional) numeric value to specify the minimum range of the axis showing the lipid size (number of carbon atoms in the fatty acid chains). This value can be increased from the default value to improve readability in situations, where there are lipid classes with little or no variation in the lipid size. |
range.min.N.double.bonds |
(Optional) numeric value to specify the minimum range of the axis showing the lipid saturation (number of double bonds in the fatty acid chains). This value can be increased from the default value to improve readability in situtions, where there are lipid classes with little or no variation in the lipid saturation. |
scales |
(Optional) character string with possible values
|
shadowtext |
(Optional) |
space |
(Optional) character string with possible values
|
survival |
(Optional) |
verbose |
(Optional) |
wrap.contrast.name |
(Optional) |
List of 'lipidomeR' heatmap figure(s).
compute_models_with_limma
for computing the argument
x
for this function.
This data set contains concentrations of 403 named lipids in the 'National Institute of Standards and Technology Human Plasma Standard Reference Material' (NIST SRM 1950).
data( humanlipidome )
data( humanlipidome )
A data frame with 403 rows and 2 variables:
Name of the lipid. The names are in the format 'XY(C:D)', where 'XY' is the abbreviation of the lipid class, 'C' is the total number of carbon atoms in the fatty-acid chains, and 'D' is the total number of double-bonds in the fatty acid chains.
Concentration of the lipid (umol/mL)
This data is available at the NIH Common Fund's National Metabolomics Data Repository (NMDR) website, the 'Metabolomics Workbench', https://www.metabolomicsworkbench.org, where it has been assigned Project ID PR000004. The data can be accessed directly via its Project DOI: 10.21228/M8MW26. This work was supported by NIH grant, U2C- DK119886.
Quehenberger, O. et al. Lipidomics reveals a remarkable diversity of lipids in human plasma. J Lipid Res. 51, 3299-3305 (2010) (doi: 10.1194/jlr.M009449)
# Load the data set. data( humanlipidome ) # Transform the concentrations into log-10 scale. humanlipidome$"Concentration_log10_umol_per_mL" <- log10( humanlipidome$"Concentration" ) # Enumerate the lipid names into values. names.mapping <- map_lipid_names( x = humanlipidome$"Name" ) # Create the lipidomeR heatmap of lipid concentrations. heatmap_lipidome( x = humanlipidome[ , c( "Name", "Concentration_log10_umol_per_mL" ) ], names.mapping = names.mapping, class.facet = "wrap", x.names = "Name", fill.limits = range( x = humanlipidome$"Concentration_log10_umol_per_mL", na.rm = TRUE ), fill.midpoint = sum( range( x = humanlipidome$"Concentration_log10_umol_per_mL", na.rm = TRUE ) ) / 2, melt.value.name = "Concentration_umol_per_mL_log10", scales = "free" )
# Load the data set. data( humanlipidome ) # Transform the concentrations into log-10 scale. humanlipidome$"Concentration_log10_umol_per_mL" <- log10( humanlipidome$"Concentration" ) # Enumerate the lipid names into values. names.mapping <- map_lipid_names( x = humanlipidome$"Name" ) # Create the lipidomeR heatmap of lipid concentrations. heatmap_lipidome( x = humanlipidome[ , c( "Name", "Concentration_log10_umol_per_mL" ) ], names.mapping = names.mapping, class.facet = "wrap", x.names = "Name", fill.limits = range( x = humanlipidome$"Concentration_log10_umol_per_mL", na.rm = TRUE ), fill.midpoint = sum( range( x = humanlipidome$"Concentration_log10_umol_per_mL", na.rm = TRUE ) ) / 2, melt.value.name = "Concentration_umol_per_mL_log10", scales = "free" )
Run this function, if you encounter an error with missing packages, such as, limma.
install_Bioconductor_dependencies(pkgs.bioconductor = c("limma"))
install_Bioconductor_dependencies(pkgs.bioconductor = c("limma"))
pkgs.bioconductor |
Character vector of Bioconductor packages to install. |
This data set contains levels of 383 named lipids in 88 liver tissue samples.
data( liverlipidome )
data( liverlipidome )
A long-format data frame with 33704 rows and 13 variables:
Participant number
Diagnosis of the liver: normal, steatosis, non-alcoholic steatohepatitis (NASH), or cirrhosis
Gender of the participant
Body-mass-index (BMI) of the participant
Ethnicity of the participant
Age of the participant
Aspartate aminotransferase blood test (U/l)
Alanine aminotransferase blood test (U/l)
Alkaline phosphatase blood test (U/l)
Total bilirubin blood test (mg/dl)
Glucose blood test (mg/dl)
Sub-type of the breast tumor. IDC: Invasive Ductal Carcinoma
Name of the lipid. The names are in the format 'XY(C:D)', where 'XY' is the abbreviation of the lipid class, 'C' is the total number of carbon atoms in the fatty-acid chains, and 'D' is the total number of double-bonds in the fatty acid chains.
Measured level of the lipid.
This data is available at the NIH Common Fund's National Metabolomics Data Repository (NMDR) website, the 'Metabolomics Workbench', https://www.metabolomicsworkbench.org, where it has been assigned Project ID PR000633. The data can be accessed directly via its Project DOI: 10.21228/M8MW26. This work was supported by NIH grant, U2C- DK119886.
Gorden, D. Lee, et al. Biomarkers of NAFLD Progression: a Lipidomics Approach to an Epidemic. J Lip Res. 56(3) 722-36 (2015) (doi: 10.1194/jlr.P056002
# Load the data set. data( liverlipidome ) # Convert the data into wide format, where each lipid is one column and # each sample is one row. liverlipidome.wide <- tidyr::pivot_wider( data = liverlipidome, names_from = Lipid_Name, values_from = Lipid_Level ) # Create a mapping of the lipid names. names.mapping <- map_lipid_names( x = unique( liverlipidome$"Lipid_Name" ) ) # Compute the regression models. result.limma <- compute_models_with_limma( x = liverlipidome.wide, dependent.variables = names.mapping$"Name", independent.variables = c( "Diagnosis" ), F.test = TRUE # Compute an F-test for a factor variable. ) # Compute the F-test. result.limma <- compute_F_test_with_limma( x = result.limma ) # Print a figure of the F-test. figure.output <- heatmap_lipidome_from_limma( x = result.limma, names.mapping = names.mapping, F.test = TRUE, axis.x.carbons = FALSE, class.facet = "wrap", plot.all = FALSE, plot.individual = TRUE, scales = "free", space = "free" ) # Compute pairwise post-hoc comparisons between the factor levels for # the dependent variables (i.e., lipids) with a significant F-test result. result.limma <- compute_post_hoc_test_with_limma( x = result.limma, remap.level.names = TRUE ) # Print a figure of all post-hoc comparisons. figure.output <- heatmap_lipidome_from_limma( x = result.limma$"result.post.hoc.test", names.mapping = names.mapping, axis.x.carbons = FALSE, plot.all = TRUE, plot.individual = FALSE, scales = "free", space = "free" ) # Specify the contrasts of the post-hoc comparison that will be included # in the figure. contrasts.included <- c( "DiagnosisSteatosis", "DiagnosisNASH", "DiagnosisCirrhosis" ) # Get the omitted contrasts based on the above definition. contrasts.omitted <- colnames( result.limma$"result.post.hoc.test"$"p.value" )[ !( colnames( result.limma$"result.post.hoc.test"$"p.value" ) %in% contrasts.included ) ] # Find dependent variables (i.e., lipids) that have any significant # difference. has.any.significant <- apply( X = result.limma$"result.post.hoc.test"$"p.value"[ , contrasts.included ], MAR = 2, FUN = p.adjust, method = "BH" ) has.any.significant <- rownames( has.any.significant[ apply( X = has.any.significant < 0.05, MAR = 1, FUN = any ), ] ) # Include in the figure only lipid classes that have at least four # significant differences. classes.included <- names( which( table( names.mapping[ make.names( has.any.significant ), "Class" ] ) > 4 ) ) classes.omitted <- unique( names.mapping$"Class" ) classes.omitted <- classes.omitted[ !( classes.omitted ) %in% classes.included ] # Print a figure of the selected post-hoc-comparisons. figure.output <- heatmap_lipidome_from_limma( x = result.limma$"result.post.hoc.test", names.mapping = names.mapping, axis.x.carbons = FALSE, omit.class = classes.omitted, omit.factor = contrasts.omitted, plot.all = TRUE, plot.individual = FALSE, scales = "free", space = "free" )
# Load the data set. data( liverlipidome ) # Convert the data into wide format, where each lipid is one column and # each sample is one row. liverlipidome.wide <- tidyr::pivot_wider( data = liverlipidome, names_from = Lipid_Name, values_from = Lipid_Level ) # Create a mapping of the lipid names. names.mapping <- map_lipid_names( x = unique( liverlipidome$"Lipid_Name" ) ) # Compute the regression models. result.limma <- compute_models_with_limma( x = liverlipidome.wide, dependent.variables = names.mapping$"Name", independent.variables = c( "Diagnosis" ), F.test = TRUE # Compute an F-test for a factor variable. ) # Compute the F-test. result.limma <- compute_F_test_with_limma( x = result.limma ) # Print a figure of the F-test. figure.output <- heatmap_lipidome_from_limma( x = result.limma, names.mapping = names.mapping, F.test = TRUE, axis.x.carbons = FALSE, class.facet = "wrap", plot.all = FALSE, plot.individual = TRUE, scales = "free", space = "free" ) # Compute pairwise post-hoc comparisons between the factor levels for # the dependent variables (i.e., lipids) with a significant F-test result. result.limma <- compute_post_hoc_test_with_limma( x = result.limma, remap.level.names = TRUE ) # Print a figure of all post-hoc comparisons. figure.output <- heatmap_lipidome_from_limma( x = result.limma$"result.post.hoc.test", names.mapping = names.mapping, axis.x.carbons = FALSE, plot.all = TRUE, plot.individual = FALSE, scales = "free", space = "free" ) # Specify the contrasts of the post-hoc comparison that will be included # in the figure. contrasts.included <- c( "DiagnosisSteatosis", "DiagnosisNASH", "DiagnosisCirrhosis" ) # Get the omitted contrasts based on the above definition. contrasts.omitted <- colnames( result.limma$"result.post.hoc.test"$"p.value" )[ !( colnames( result.limma$"result.post.hoc.test"$"p.value" ) %in% contrasts.included ) ] # Find dependent variables (i.e., lipids) that have any significant # difference. has.any.significant <- apply( X = result.limma$"result.post.hoc.test"$"p.value"[ , contrasts.included ], MAR = 2, FUN = p.adjust, method = "BH" ) has.any.significant <- rownames( has.any.significant[ apply( X = has.any.significant < 0.05, MAR = 1, FUN = any ), ] ) # Include in the figure only lipid classes that have at least four # significant differences. classes.included <- names( which( table( names.mapping[ make.names( has.any.significant ), "Class" ] ) > 4 ) ) classes.omitted <- unique( names.mapping$"Class" ) classes.omitted <- classes.omitted[ !( classes.omitted ) %in% classes.included ] # Print a figure of the selected post-hoc-comparisons. figure.output <- heatmap_lipidome_from_limma( x = result.limma$"result.post.hoc.test", names.mapping = names.mapping, axis.x.carbons = FALSE, omit.class = classes.omitted, omit.factor = contrasts.omitted, plot.all = TRUE, plot.individual = FALSE, scales = "free", space = "free" )
Use this function to create a mapping of the lipids to values, which can be used to creating 'lipidomeR' heatmaps.
map_lipid_names(x)
map_lipid_names(x)
x |
(Required) character vector of lipid names. The names are expected in the format 'XY(C:D)', where 'XY' is the abbreviation of the lipid class, 'C' is the total number of carbon atoms in the fatty-acid chains, and 'D' is the total number of double-bonds in the fatty acid chains. |
Data frame with lipid names in various formats for R and
the enumerated values of lipid class (Class
), lipid size
(N.carbons
) and lipid unsaturation (N.double.bonds
).
heatmap_lipidome_from_limma
for creating 'lipidomeR'
heatmaps of regression model results based on the output of this function.
heatmap_lipidome
for creating 'lipidomeR' heatmaps
of any lipid-specific values based on the output of this function.