Description Usage Arguments Details Value References Examples

View source: R/spearman.group.R

This function forms metabolite-sets based on pairwise Spearman correlation between different metabolites.

1 | ```
spearman.group(data, threshold)
``` |

`data` |
a matrix with each row being a metabolite and each column being a sample. |

`threshold` |
a threshold value for correlation coeffients. |

The input data is a matrix with each row denoting a metabolites. This function groups different rows of the data matrix together based on the Spearman correlation coefficients between two rows. It works in the following way.

First, each row in the data matrix is treated as a node. If the Spearman correlation coefficient between two nodes is larger than the threshold value, then an edge is added between this two nodes. Second, all nodes which are connected (not necessary to be pairwisely connected) form a group. At the end, a vector of group labels can be obtained. The length of this vector is the same as the number of rows in the data matrix. Different rows with the same group label are in the same group. The number of distinct values in this label-vector is the number of groups.

A vector of group labels, of the same length as the number of rows in the data matrix.

Zhan, X., Patterson, A. D., & Ghosh, D. (2015). Kernel approaches for differential expression analysis of mass spectrometry-based metabolomics data. BMC Bioinformatics, 16(1), 77.

1 2 3 4 5 |

```
[1] 1 2 3 4 1 6 7 7 9 7 6 12 13 7 2 1 7 18 7 2
```

KMDA documentation built on May 30, 2017, 8:11 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.