add_edge_data {KEGGlincs} | R Documentation

## Annotate KEGG edge mappings with user data

### Description

Add data column[s] to object created from function expand_KEGG_edges

### Usage

    add_edge_data(expanded_edges, KEGG_mappings, user_data, map_type = "SYMBOL",
      data_column_no = 3, only_mapped = FALSE)

### Arguments

`expanded_edges` | The data frame object generated via the function expand_KEGG_edges
`KEGG_mappings` | KEGG_mappings The data.frame object generated by the function expand_KEGG_mappings
`user_data` | A data frame where in which the first two columns contain gene symbols representing an edge and any/all other column[s] contain corresponding edge data.
`map_type` | If the genes in your data set are left untranslated set to "NUMBER" (assuming numbers are gene accession numbers)
`data_column_no` | The column index for desired user data to be added
`only_mapped` | A logical indicator; if set to FALSE will return 'de-novo' edges that 'exist' in data but are not documented in KEGG

### Value

A data frame object with detailed KEGG edge mappings annotated with user data

### Examples

    p53_KGML <- get_KGML('hsa04115')
    p53_KEGG_mappings <- expand_KEGG_mappings(p53_KGML)
    p53_edges <- expand_KEGG_edges(p53_KGML, p53_KEGG_mappings)
    p53_HA1E_data <- overlap_info(p53_KGML, p53_KEGG_mappings, 'HA1E',
                                   data_type = '100_bing', only_mapped = FALSE)

    p53_edges_HA1E_ALL <- add_edge_data(p53_edges, p53_KEGG_mappings,
                                         p53_HA1E_data, c(3, 10,12))
    p53_edges_HA1E_MAPPED <- add_edge_data(p53_edges, p53_KEGG_mappings,
                                            p53_HA1E_data, c(3, 10,12),
                                            only_mapped = TRUE)

[Package KEGGlincs version 1.8.0 Index]