queryKEGGsubgraph         package:KEGGgraph         R Documentation

_Q_u_e_r_y _t_h_e _s_u_b_g_r_a_p_h _o_f _a _g_i_v_e_n _K_E_G_G _g_r_a_p_h _w_i_t_h _E_n_t_r_e_z _G_e_n_e_I_D (_s)

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

     Given a list of genes (identified by Entrez GeneID), the function
     subsets the given KEGG gragh of the genes as nodes (and
     maintaining all the edges between).

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

     queryKEGGsubgraph(geneids, graph, organism = "hsa", addmissing = FALSE)

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

 geneids: A vector of Entrez GeneIDs 

   graph: A KEGG graph 

organism: a three-alphabet code of organism 

addmissing: logical, in case the given gene is not found in the graph,
          should it be added as single node to the subgraph?

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

     This function solves the questions like 'How is the list of gene
     interact with each other in the context of pathways?'

     Limited by the 'translateKEGGID2GeneID', this function supports
     only human for now. We are working to include other organisms.

     If 'addmissing' is set to 'TRUE', the missing gene in the given
     list will be added to the returned subgraph as single nodes.

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

     A subgraph with nodes representing genes and edges representing
     interactions.

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

     Jitao David Zhang <j.zhang@dkfz.de>

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

     'translateGeneID2KEGGID'

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

     sfile <- system.file("extdata/hsa04010.xml",package="KEGGgraph")
     gR <- parseKGML2Graph(sfile,expandGenes=TRUE)
     geneids <- c(5594, 5595, 6197, 5603, 1843,5530, 5603)
     sub <- queryKEGGsubgraph(geneids, gR)
     if(require(Rgraphviz) && interactive()) {
       plot(sub, "neato")
     }

     ## add missing nodes
     list2 <- c(geneids, 81029)
     sub2 <- queryKEGGsubgraph(list2, gR,addmissing=TRUE)
     if(require(Rgraphviz) && interactive()) {
       plot(sub2, "neato")
     }

