reanalyzeFailpeaks {RMassBank} | R Documentation

## Reanalyze unmatched peaks

### Description

Reanalysis of peaks with no matching molecular formula by allowing additional elements (e.g. "N2O").

### Usage

    reanalyzeFailpeaks(aggregated, custom_additions, mode, filterSettings =
    				getOption("RMassBank")$filterSettings, progressbar = "progressBarHook")
    reanalyzeFailpeak(custom_additions, mass, cpdID, counter, pb = NULL, mode,
    				filterSettings = getOption("RMassBank")$filterSettings)

### Arguments

`custom_additions` | The allowed additions, e.g. "N2O".
`mode` | Processing mode (`"pH", "pNa", "mH"` etc.)
`filterSettings` | Settings for filtering data. Refer to`analyzeMsMs` for settings.
`progressbar` | The progress bar callback to use. Only needed for specialized applications. Cf. the documentation of `progressBarHook` for usage.
`aggregated` | A peake aggregate table (`w@aggregate`) (after processing electronic noise removal!)
`mass` | (Usually recalibrated) m/z value of the peak.
`cpdID` | Compound ID of this spectrum.
`counter` | Current peak index (used exclusively for the progress indicator)
`pb` | A progressbar object to display progress on, as passed by `reanalyzeFailpeaks` to `reanalyzeFailpeak`. No progress is displayed if NULL.

### Details

`reanalyzeFailpeaks` examines the `unmatchedPeaksC` table in `specs` and sends every peak through `reanalyzeFailpeak`.

### Value

The aggregate data frame extended by the columns: #'

`reanalyzed.???` | If reanalysis (step 7) has already been processed: matching values from the reanalyzed peaks
`matchedReanalysis` | Whether reanalysis has matched (`TRUE`), not matched(`FALSE`) or has not been conducted for the peak(`NA`).

It would be good to merge the analysis functions of `analyzeMsMs` with the one used here, to simplify code changes.

### Author(s)

Michael Stravs

### See Also

`analyzeMsMs`, `msmsWorkflow`

### Examples

    ## As used in the workflow:
    ## Not run:
    	reanalyzedRcSpecs <- reanalyzeFailpeaks(w@aggregated, custom_additions="N2O", mode="pH")
    # A single peak:
    reanalyzeFailpeak("N2O", 105.0447, 1234, 1, 1, "pH")

    ## End(Not run)

[Package RMassBank version 3.2.0 Index]