summarize_metabolites: Summarize feature based data into metabolite based data

Description Usage Arguments Value Examples

View source: R/annotate_features.R

Description

Combine the feature based metabolomics data to metabolite data by summing up the intensitites of all features assigned to a particular metabolite.

Usage

1

Arguments

info.assigned

data.frame with information about assignment of measured and theoretical features (e.g. as generated by the function assign_features).

info.features

data.frame with information about theoretical possible features (e.g. as generated by the function chem_formula_2_adducts).

se

RangedSummarizedExperiment-class object with feature based metabolomics data.

Value

RangedSummarizedExperiment-class object with metabolite based metabolomics data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
data("se.example")
data("info.features")

dat = prepare_data_for_annotation(se = se.example)
hits.m = find_hits(info.features = info.features,
                   dat = dat,
                   ppm = 20)

prior.prob = compute_prior_prob(hits.m = hits.m,
                                info.features = info.features,
                                dat = dat,
                                ppm = 20)
add.m = generate_connectivity_matrix(info.features = info.features,
                                     type = "adducts")

set.seed(20200402)
post.prob = compute_posterior_prob(prior.prob = prior.prob,
                                   dat = dat,
                                   add.m = add.m,
                                   delta.add = 0.1)

info.assigned.use = assign_features(post.prob = post.prob,
                                    dat = dat)

se.example.met = summarize_metabolites(info.assigned = info.assigned.use,
                                       info.features = info.features,
                                       se = se.example)

szymczak-lab/preprocessHighResMS documentation built on Oct. 6, 2020, 12:50 a.m.