createNetwork: Generic function to create a similarity network from...

Description Usage Arguments Details Value Methods (by class) See Also Examples

Description

This function creates a similarity network with nodes as features and weighted edges as the cosine similarity between those nodes. Edges with weights = 0 are not included in the network. Nodes without edges are not included in the network. This network will be used to define clique groups and find annotation within this groups.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
createNetwork(mzdata, peaklist, filter = TRUE, mzerror = 5e-06,
    intdiff = 1e-04, rtdiff = 1e-04)

## S4 method for signature 'xcmsSet'
createNetwork(mzdata, peaklist, filter = TRUE,
    mzerror = 5e-06, intdiff = 1e-04, rtdiff = 1e-04)

## S4 method for signature 'XCMSnExp'
createNetwork(mzdata, peaklist, filter = TRUE,
    mzerror = 5e-06, intdiff = 1e-04, rtdiff = 1e-04)

Arguments

mzdata

An object of class 'xcmsSet' or 'XCMSnExp' with processed m/z data.

peaklist

Is a data.frame feature info for m/z data. put each feature in a row and a column 'mz' for mass data, retention time column 'rt' and intensity in column 'maxo'.

filter

If TRUE, filter out very similar features that have a correlation similarity > 0.99 and equal values of m/z, retention time and intensity.

mzerror

Relative error for m/z, if relative error between two features is below that value that features are considered with similar m/z value.

intdiff

Relative error for intensity, if relative error between two features is below that value that features are considered with similar intensity

rtdiff

Relative error for retention time, if relative error between two features is below that value that features are considered with similar retention time

Details

Signal processing algorithms may output artefact features. Sometimes they produce two artefact features which are almost identical This artefacts may lead to errors in the computation of the clique groups, so it is recommended to set 'filter' = TRUE to drop repeated features.

Value

This function returns a list with the similarity network and the filtered peaklist if 'filter' = TRUE. If filter = FALSE the peaklist is returned unmodified.

Methods (by class)

See Also

getCliques

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Using a 'xcmsSet' object
mzfile <- system.file("standards.mzXML", package = "cliqueMS")
require(xcms)
rawMS <- readMSData(files = mzfile, mode = "onDisk")
cpw <- CentWaveParam(ppm = 15, peakwidth = c(5,20), snthresh = 10)
mzData <- findChromPeaks(rawMS, cpw)
peaklist = as.data.frame(chromPeaks(mzData))
netlist = createNetwork(mzData, peaklist, filter = TRUE)

## Using a 'XCMSnExp' object
require(xcms)
mzfile <- system.file("standards.mzXML", package = "cliqueMS")
rawMS <- readMSData(files = mzfile, mode = "onDisk")
cpw <- CentWaveParam(ppm = 15, peakwidth = c(5,20), snthresh = 10)
mzData <- findChromPeaks(rawMS, cpw)
peaklist = as.data.frame(chromPeaks(mzData))
netlist = createNetwork(mzData, peaklist, filter = TRUE)

cliqueMS documentation built on Nov. 8, 2020, 7:36 p.m.