Repository navigation
Expand file tree
/
Copy pathkegg_pathway.Rmd
More file actions
executable file
·93 lines (75 loc) · 2.05 KB
/
Copy pathkegg_pathway.Rmd
File metadata and controls
executable file
·93 lines (75 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
title: "KEGG pathway"
author:
- name: Xiaotao Shen (https://www.shenxt.info/)
date: "Created on 2022-05-11 and updated on `r Sys.Date()`"
output:
html_document:
df_print: paged
toc: no
pdf_document:
toc: no
vignette: >
%\VignetteIndexEntry{kegg_pathway}
%\VignettePackage{massdatabase}
% \VignetteEngine{knitr::rmarkdown}
% \usepackage[utf8]{inputenc}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE, echo=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
warning = FALSE,
message = TRUE,
out.width = "100%"
)
```
# **Request**
Get the information of all pathways in KEGG (https://www.genome.jp/kegg/pathway.html).
```{r,eval=TRUE,warning=FALSE, R.options="", message=TRUE, cache=TRUE}
library(massdatabase)
pathway_info <-
request_kegg_pathway_info(organism = "hsa")
head(pathway_info)
```
Get the information of one pathway.
```{r,eval=TRUE,warning=FALSE, R.options="", message=TRUE, cache=TRUE}
pathway <-
request_kegg_pathway(pathway_id = "hsa00010")
pathway
```
# **Download**
Download the human pathway data.
```{r,eval=TRUE,warning=FALSE, R.options="", message=TRUE, cache=TRUE}
download_kegg_pathway(path = "kegg_human_pathway",
sleep = 1,
organism = "hsa")
```
# **Read**
Read the download pathway data.
```{r,eval=TRUE,warning=FALSE, R.options="", message=TRUE, cache=TRUE}
data <-
read_kegg_pathway(path = "kegg_human_pathway")
class(data)
length(data)
data[[1]]$pathway_id
data[[1]]$pathway_name
data[[1]]$pathway_class
data[[1]]$compound_list
data[[1]]$related_module
```
# **Convert it to metpath class database**
```{r,eval=TRUE,warning=FALSE, R.options="", message=TRUE, cache=TRUE}
# kegg_human_pathway <-
# convert_kegg2metpath(data = data,
# path = "kegg_human_pathway",
# threads = 3)
```
```{r,eval=TRUE,warning=FALSE, R.options="", message=TRUE, cache=TRUE}
# kegg_human_pathway
```
# **Session information**
```{r,eval=TRUE,warning=FALSE, R.options="", message=FALSE, cache=TRUE}
sessionInfo()
```