MS_replaceNode: Replace nodes of the network

Description Usage Arguments Value Examples

View source: R/Find_support_functions.R

Description

This function allows replacing node IDs of a network-table. It can be used to cluster the IDs of chemical isomers (e.g. alpha-D-glucose ("cpd:C00267"), D-glucose ("cpd:C00031"), and beta-D-glucose ("cpd:C00021")) into a single ID.

Usage

1
MS_replaceNode(node1, node2, network_table)

Arguments

node1

character vector containing the node IDs to be replaced.

node2

character vector containing the ID that will be used as a replacement.

network_table

three-column matrix where each row represents and edge between two nodes. See function "MS_keggNetwork( )".

Value

A three-column matrix corresponding to the input network-table with replaced nodes.

Examples

1
2
3
4
5
6
data(MetaboSignal_table)

# Cluster D-glucose isomers ("cpd:C00267","cpd:C00221","cpd:C00031")

glucoseClustered <- MS_replaceNode(node1 = c("cpd:C00267", "cpd:C00221"),
                                   node2 = "cpd:C00031", MetaboSignal_table)

MetaboSignal documentation built on Nov. 8, 2020, 6 p.m.