Skip to contents

Compute area under curve (AUC) for each subject and feature. Creates a pseudo SummarizedExperiment or MetaboSet object, where the "samples" are subjects (or subject/group combinations in case the same subjects are submitted to different treatments) and the "abundances" are AUCs. This object can then be used to compute results of e.g. t-tests of AUCs between groups.

Usage

perform_auc(object, time, subject, group, assay.type = NULL)

Arguments

object

a SummarizedExperiment or MetaboSet object

time, subject, group

column names of pheno data holding time, subject and group labels

assay.type

character, assay to be used in case of multiple assays

Value

A pseudo SummarizedExperiment or MetaboSet object with the AUCs.

See also

Examples

data(example_set)
# Drop QC samples before computing AUCs
aucs <- perform_auc(drop_qcs(example_set), time = "Time", 
                    subject = "Subject_ID", group = "Group")
#> INFO [2025-06-23 22:37:08] Starting AUC computation
#> INFO [2025-06-23 22:37:12] AUC computation finished
# t-test with the AUCs
t_test_results <- perform_t_test(aucs, formula_char = "Feature ~ Group")
#> The functionality of this function has changed. It now encompasses pairwise and paired t-tests.
#> Remember that t.test returns difference between group means in different order than lm.
#> This function mimics this behavior, so the effect size is mean of first level minus mean of second level.
#> INFO [2025-06-23 22:37:12] Starting tests for A & B
#> INFO [2025-06-23 22:37:12] Tests performed