misalignDetect: Detect misaligned peak groups in xcmsSet object of XCMS

Description Usage Arguments Details Value Examples

View source: R/misalignDetect.R

Description

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

Usage

1
2
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

1
2
3
4
5
6
7
8
# obtain data
data('xcmsExamples')
xcmsLargeWin <- xcmsExamples$xcmsLargeWin
xcmsSmallWin <- xcmsExamples$xcmsSmallWin
ppm <- xcmsExamples$ppm

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

ChiungTingWu/ncGTW documentation built on Dec. 30, 2019, 10:12 p.m.