Description Usage Arguments Details Value Note See Also Examples
View source: R/evaluateParams.R
This function provides a method for guiding selection of suitable values for
A, B, & C weight arguments in the calcScores
method, based on
the similarity scores of shared identified compounds. Datasets must have at
least one identity in common (i.e. idx = idy, case-insensitive), and
preferably more than 10.
1 2 3 4 5 6 7 8 9 10 11 12 |
object |
metabCombiner object |
A |
Numeric weights for penalizing m/z differences. |
B |
Numeric weights for penalizing differences between fitted & observed retention times |
C |
Numeric weight for differences in Q (abundance quantiles). |
fit |
Character. Choice of fitted rt model, "gam" or "loess." |
usePPM |
logical. Option to use relative parts per million (ppm) as opposed to absolute) m/z differences in score computations. |
minScore |
numeric minimum score to count towards objective function calculation for known matching features (idx = idy) and mismatches. |
penalty |
numeric. Subtractive mismatch penalty. |
groups |
integer. Vector of feature groups to score. If set to NULL (default), will compute scores for all feature groups. |
brackets_ignore |
bracketed identity and adduct character strings of these types will be ignored according to this argument |
This uses an objective function, based on the accurate and inaccurate
alignments of shared pre-identified compounds. For more details, see:
objective
.
A data frame with the following columns:
A |
m/z weight values |
B |
rt weight values |
C |
Q weight values |
score |
objective function evaluation of (A,B,C) weights |
In contrast to calcScores
function, A, B, & C take numeric
vectors as input, as opposed to constants. The total number of rows in the
output will be equal to the products of the lengths of these input vectors
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(plasma30)
data(plasma20)
p30 <- metabData(plasma30, samples = "CHEAR")
p20 <- metabData(plasma20, samples = "Red", rtmax = 17.25)
p.comb = metabCombiner(xdata = p30, ydata = p20, binGap = 0.0075)
p.comb = selectAnchors(p.comb, windx = 0.03, windy = 0.02)
p.comb = fit_gam(p.comb, k = 20, iterFilter = 2)
#example 1
scores = evaluateParams(p.comb, A = seq(60,100,10), B = seq(10,15), C = 0.5,
minScore = 0.7, penalty = 10)
##example 2: using PPM mass deviation (note change to A argument)
scores = evaluateParams(p.comb, usePPM = TRUE, A = seq(0.01,0.05,0.01))
##example 3: limiting to groups 1-2000
scores = evaluateParams(p.comb, minScore = 0.5, groups = 1:2000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.