get_asso_net {PFP} | R Documentation

## merge the edges_coexp and edges_kegg

### Description

This function will remove the co-expressed edges in edges_coexp which also emerge in edges_kegg.

### Usage

    get_asso_net(
      edges_coexp,
      edges_kegg,
      file_dir = NULL,
      if_symbol = TRUE,
      trans_fun = trans_edges_id,
      from_type = "ENTREZID",
      to_type = "SYMBOL",
      gene_info_db = NULL
    )

### Arguments

`edges_coexp,` | a data.frame whose colnames is "source","target", "weight","pathway","edge_type".
`edges_kegg,` | a data.frame whose colnames is "source","target", "weight","pathway","edge_type".
`file_dir,` | a character, the root to save the result of nodes & edges.
`if_symbol,` | a logical,whether to translate the gene id type. Default is TRUE.
`trans_fun,` | a function, when `if_symbol` is TRUE,it will use the `trans_fun` function to translate the gene ids. Default is `trans_edges_id`.
`from_type,` | a character,the parameter in `trans_fun`. It is the type of gene ID, "ENSEMBL","GO","SYMBOL" and so on.
`to_type,` | a character,the parameter in `trans_fun`. It is the type of gene ID, "ENSEMBL","GO","SYMBOL" and so on.
`gene_info_db,` | an AnnotationDb-object for gene annotation, such as "org.Hs.eg.db".

### Details

This function will remove the co-expressed edges in edges_coexp which also emerge in edges_kegg. It will return a list contains two data.frames. One is the merged data. Another is the nodes information of the edges.

### Value

the nodes information of the edges.

### Examples

    data(PFPRefnet_hsa)
    data(data_std)
    data(PFP_test1)
    rank1 <- rank_PFP(object = PFP_test1,total_rank = TRUE)
    pathway_select <- refnet_info(rank1)[1,"id"]
    gene_test <- pathways_score(rank1)$genes_score[[pathway_select]]$ENTREZID
    edges_coexp <- get_exp_cor_edges(gene_test,data_std)
    gene_list2 <- unique(c(edges_coexp$source,edges_coexp$target))
    edges_kegg <- get_bg_related_kegg(gene_list2,
                                      PFPRefnet=PFPRefnet_hsa,
                                      rm_duplicated = TRUE)

[Package PFP version 1.0.0 Index]