evaluateParams {metabCombiner} | R Documentation

## Evaluate Similarity Score Parameters

### Description

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.

### Usage

    evaluateParams(
      object,
      A = seq(60, 150, by = 10),
      B = seq(6, 15),
      C = seq(0.1, 0.5, by = 0.1),
      fit = c("gam", "loess"),
      usePPM = FALSE,
      minScore = 0.5,
      penalty = 5,
      groups = NULL,
      brackets_ignore = c("(", "[", "{")
    )

### Arguments

`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

### Details

This uses an objective function, based on the accurate and inaccurate alignments of shared pre-identified compounds. For more details, see: `objective`.

### Value

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

### Note

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

### See Also

`calcScores`, `objective`

### Examples

    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)

[Package metabCombiner version 1.4.0 Index]