Based on estimated posterior probabilities each measured feature is assigned to the most probable theoretical feature. Measured features are removed if the maximum probability is below the specified cutoff. In rare cases, several measured features are assigned to the same theoretical feature and the measured feature with the largest number of detected peaks or highest intensity will be kept.
assign_features(post.prob, dat, cutoff.prob = 0.8)
matrix with prior probabilities for each measured feature
in rows and theoretical features in columns (e.g. as generated by the
data.frame with information about measured features with columns id (= unique identifier), mz (= measured mz value), intensity (= measured intensity).
Numeric. Probability cutoff which needs to be reached to keep the assignment of measured and theoretical feature (default = 0.8).
data.frame with the following information about each assigned feature:
f.meas: identifier of measured feature
f.theo: identifier of assigned theoretical feature
prob: posterior probability
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.