mergeKEGGgraphs          package:KEGGgraph          R Documentation

_M_e_r_g_e _K_E_G_G _g_r_a_p_h_s, _a_l_s_o _m_e_r_g_i_n_g _K_E_G_G_N_o_d_e _a_n_d _K_E_G_G_E_d_g_e _a_t_t_r_i_b_u_t_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     'mergeKEGGgraphs' extends function 'mergeGraphs' and merges a list
     of KEGG graphs. Both 'mergeGraphs' and 'mergeKEGGgraphs' can be
     used to merge graphs, while the latter form is able to merge the
     nodes and edges attributes from KEGG, so that the nodes and edges
     have a one-to-one mapping to the results from 'getKEGGnodeData'
     and 'getKEGGEdgeData'.

     See details below.

_U_s_a_g_e:

     mergeKEGGgraphs(list, edgemode = "directed")

_A_r_g_u_m_e_n_t_s:

    list: A list of named KEGG graphs

edgemode: character, 'directed' by default

_D_e_t_a_i_l_s:

     'mergeGraphs' discards the node or edge attributes, hence
     'getKEGGnodeData' or 'getKEGGedgeData' will return 'NULL' on the
     resulting graph.

     'mergeKEGGgraphs' calls 'mergeGraphs' first to merge the graphs,
     then it also merges the KEGGnodeData and KEGGedgeData.so that they
     are one-to-one mapped to the nodes and edges in the merged graph.

_V_a_l_u_e:

     A graph with nodeData and edgeData

_A_u_t_h_o_r(_s):

     Jitao David Zhang <URL: mailto:j.zhang@dkfz.de>

_S_e_e _A_l_s_o:

     'mergeGraphs'

_E_x_a_m_p_l_e_s:

     sfile <- system.file("extdata/hsa04010.xml",package="KEGGgraph")
     gR <- parseKGML2Graph(sfile,expandGenes=TRUE)

     wntfile <- system.file("extdata/hsa04310.xml",package="KEGGgraph")
     wntR <- parseKGML2Graph(wntfile, expandGenes=TRUE)

     graphlist <- list(mapkG=gR, wntG=wntR)
     mergedKEGG <- mergeKEGGgraphs(graphlist)

     mergedKEGG

