misalignDetect {ncGTW} | R Documentation

## Detect misaligned peak groups in xcmsSet object of XCMS

### Description

This function detects the misaligned peak groups with two `xcmsSet-class` object with two different values of `bw` parameter in `group`.

### Usage

    misalignDetect(xcmsLargeWin, xcmsSmallWin, ppm, qThre = 0.05,
      overlapRate = 0, maxRtWin = 50)

### Arguments

`xcmsLargeWin` | A `xcmsSet-class` object with a larger `bw`, usually the maximum expected retension time drift.
`xcmsSmallWin` | A `xcmsSet-class` object with a smaller `bw`, usually the resolution of the retension time.
`ppm` | Should be set as same as the one when performing the peak detection function in `xcms`.
`qThre` | The threshould of the p-value after multiple test correction. The default is 0.05.
`overlapRate` | The threshould of the overlapping rate of sample index. The default is 0.
`maxRtWin` | The threshould of the maximum retension time range. This is for filtering out some bad groups. The default is 50 (seconds).

### Details

This function includes two major steps to determine a peak group is misaligned or not. The first step calculates the p-value of each peak group in xcmsSmallWin, and find the corresponding peak group in xcmsLargeWin. The second step is to find the exclusive peak groups (the groups with no overlapping samples) with adjsted p-values smaller than `qThre`.

### Value

A matrix with all detected misaligned peak groups. The column names are the same as `group` slot in `xcmsSet-class`, but the first column is the group index.

### Examples

    # obtain data
    data('xcmsExamples')
    xcmsLargeWin <- xcmsExamples$xcmsLargeWin
    xcmsSmallWin <- xcmsExamples$xcmsSmallWin
    ppm <- xcmsExamples$ppm

    # detect misaligned features
    excluGroups <- misalignDetect(xcmsLargeWin, xcmsSmallWin, ppm)

[Package ncGTW version 1.6.0 Index]