-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.Rmd
44 lines (35 loc) · 1.05 KB
/
index.Rmd
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
---
title: "Parsing PREDICT indications"
output:
html_document:
theme: cosmo
highlight: pygments
---
```{r, message=FALSE}
library(dplyr)
library(DT)
options(stringsAsFactors = FALSE)
```
Indications from [PREDICT](https://dx.doi.org/10.1038/msb.2011.26)
```{r}
# map.df from msb201126-s4.xls
map.df <- file.path('data', 'omim-to-umls.tsv') %>%
read.delim(check.names=FALSE) %>%
dplyr::transmute(omim_id = `OMIM ID`,
umls_cui = `UMLS concept ID`,
umls_name = `UMLS concept name`)
# indication.df from a processed version msb201126-s1.xls
indication.df <- file.path('data', 'indications.tsv') %>%
read.delim()
# add umls_ids to indications
indication.df <- indication.df %>%
dplyr::left_join(map.df) %>%
dplyr::select(drugbank_id, drugbank_name, umls_cui, umls_name, omim_id, omim_name) %>%
dplyr::distinct(drugbank_id, umls_cui, omim_id)
DT::datatable(indication.df)
```
```{r}
indication.df %>%
write.table(file.path('data', 'indications-umls.tsv'),
sep='\t', row.names=FALSE, quote=FALSE)
```