createNetwork.xcmsSet: Function to create a similarity network from 'xcmsSet'...

Description Usage Arguments Details Value See Also Examples

View source: R/buildNetwork.R

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
## S3 method for class 'xcmsSet'
createNetwork(mzData, peaklist, filter = TRUE,
  mzerror = 5e-06, intdiff = 1e-04, rtdiff = 1e-04)

Arguments

mzData

A 'xcmsSet' object 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. CAMERA package has to be installed to use this method.

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.

See Also

getCliques

Examples

1
2
3
4
5
library(cliqueMS)
mzfile <- system.file("standards.mzXML", package = "cliqueMS")
msSet <- xcms::xcmsSet(files = mzfile, method = "centWave",
ppm = 15, peakwidth = c(5,20), snthresh = 10)
netlist = createNetwork.xcmsSet(msSet, msSet@peaks, filter = TRUE)

cliqueMS documentation built on May 1, 2019, 6:32 p.m.