get_bg_related_kegg {PFP} | R Documentation |
This function will select all genes in all kegg pathways which
are directly connected with the genes in gene_list
get_bg_related_kegg(gene_list, PFPRefnet, rm_duplicated = FALSE)
gene_list, |
a vector of characters, refers to genes ids |
PFPRefnet, |
an object of PFPRefnet class, it contains all kegg pathways. |
rm_duplicated, |
a logical, whether to remove the duplicated kegg edges in different pathways. Defalut is FALSE |
It will return a data.frame which can be translated a graph or
network.
In the data.frame, source
refers to the genes in gene_list
,
target
refers to the directly connected genes in kegg, weight
is 0.5, no real means, pathway
refers to the pathway which the edge
emerge and edge_type
is "kegg".Note, if rm_duplicated
is
FALSE, it may return many duplicated edges,which will be complex when
plotting a network. If rm_duplicated
is TRUE,it will retain the
first pathway which contains the duplicated edge.
the related kegg network.
data(PFPRefnet_hsa) data(gene_list_hsa) edges_kegg <- get_bg_related_kegg(gene_list_hsa, PFPRefnet=PFPRefnet_hsa, rm_duplicated = TRUE)