de_analysis | R Documentation |
de_analysis
and de_design
perform differential analysis of measured
lipids that are associated with a sample group (annotation). de_analysis
accepts a list of contrasts, while de_design
allows users to define a
design matrix, useful for complex experimental designs or for adjusting
possible confounding variables.
de_analysis(data, ..., measure = "Area", group_col = NULL) de_design(data, design, ..., coef = NULL, measure = "Area") significant_molecules(de.results, p.cutoff = 0.05, logFC.cutoff = 1) plot_results_volcano(de.results, show.labels = TRUE)
data |
LipidomicsExperiment object, should be normalized and log2 transformed. |
... |
Expressions, or character strings which can be parsed to
expressions, specifying contrasts. These are passed to
|
measure |
Which measure to use as intensity, usually Area (default). |
group_col |
Name of the column containing sample groups. If not provided, defaults to first sample annotation column. |
design |
Design matrix generated from |
coef |
Column number or column name specifying which coefficient of the linear model is of interest. |
de.results |
Output of |
p.cutoff |
Significance threshold. Default is |
logFC.cutoff |
Cutoff limit for log2 fold change. Default is |
show.labels |
Whether labels should be displayed for
significant lipids. Default is |
TopTable as returned by limma package
significant_molecules
returns a character vector with names of
significantly differentially changed lipids.
plot_results_volcano
returns a ggplot object.
significant_molecules
: gets a list of significantly changed lipids for
each contrast.
plot_results_volcano
: plots a volcano chart for differential analysis
results.
# type ?normalize_pqn to see how to normalize and log2-transform your data data(data_normalized) # Specifying contrasts de_results <- de_analysis( data_normalized, HighFat_water - NormalDiet_water, measure = "Area" ) # Using formula de_results_formula <- de_design( data = data_normalized, design = ~group, coef = "groupHighFat_water", measure = "Area" ) # Using design matrix design <- model.matrix(~group, data = colData(data_normalized)) de_results_design <- de_design( data = data_normalized, design = design, coef = "groupHighFat_water", measure = "Area" ) significant_molecules(de_results) plot_results_volcano(de_results, show.labels = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.