kegg_process: Interactions from KGML

kegg_processR Documentation

Interactions from KGML

Description

Processes KEGG Pathways data extracted from a KGML file. Joins the entries and relations into a single data frame and translates the Gene Symbols to UniProt IDs.

Usage

kegg_process(entries, relations, max_expansion = NULL, simplify = FALSE)

Arguments

entries

A data frames with entries extracted from a KGML file by kegg_pathway_download.

relations

A data frames with relations extracted from a KGML file by kegg_pathway_download.

max_expansion

Numeric: the maximum number of relations derived from a single relation record. As one entry might represent more than one molecular entities, one relation might yield a large number of relations in the processing. This happens in a combinatorial way, e.g. if the two entries represent 3 and 4 entities, that results 12 relations. If NULL, all relations will be expanded.

simplify

Logical: remove KEGG's internal identifiers and the pathway annotations, keep only unique interactions with direction and effect sign.

Value

A data frame (tibble) of interactions. In rare cases when a pathway doesn't contain any relation, returns NULL.

See Also

  • kegg_pathway_download

  • kegg_pathways_download

  • kegg_pathway_list

Examples

hsa04350 <- kegg_pathway_download('hsa04350', process = FALSE)
tgf_pathway <- kegg_process(hsa04350$entries, hsa04350$relations)
tgf_pathway
# # A tibble: 50 x 12
#    source target type  effect arrow relation_id kegg_id_source
#    <chr>  <chr>  <chr> <chr>  <chr> <chr>       <chr>
#  1 51     49     PPrel activ. -->   hsa04350:1  hsa:7040 hsa:.
#  2 57     55     PPrel activ. -->   hsa04350:2  hsa:151449 hs.
#  3 34     32     PPrel activ. -->   hsa04350:3  hsa:3624 hsa:.
#  4 20     17     PPrel activ. -->   hsa04350:4  hsa:4838
#  5 60     46     PPrel activ. -->   hsa04350:5  hsa:4086 hsa:.
# # . with 45 more rows, and 5 more variables: genesymbol_source <chr>,
# #   uniprot_source <chr>, kegg_id_target <chr>,
# #   genesymbol_target <chr>, uniprot_target <chr>


saezlab/OmnipathR documentation built on Oct. 16, 2024, 11:49 a.m.