-
Notifications
You must be signed in to change notification settings - Fork 0
/
curate_signatures.R
66 lines (39 loc) · 2.45 KB
/
curate_signatures.R
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
library(tidyverse)
carbetocin <- read_tsv("signature_data/Carbetocin-Signatures.tsv")
desmopressin <- read_tsv("signature_data/Desmopressin-Signatures.tsv")
hydroxychloroquine <- read_tsv("signature_data/Hydroxychloroquine-Signatures.tsv")
chloroquine <- read_tsv("signature_data/Chloroquine-Signatures.tsv")
bupropion <- read_tsv("signature_data/Bupropion-Signatures.tsv")
lopinavir <- read_tsv("signature_data/Lopinavir-Signatures.tsv")
ritonavir <- read_tsv("signature_data/Ritonavir-Signatures.tsv")
benazepril <- read_tsv("signature_data/Benazepril-Signatures.tsv")
captopril <- read_tsv("signature_data/Captopril-Signatures.tsv")
enalapril <- read_tsv("signature_data/Enalapril-Signatures.tsv")
fosinopril <- read_tsv("signature_data/Fosinopril-Signatures.tsv")
lisinopril <- read_tsv("signature_data/Lisinopril-Signatures.tsv")
moexipril <- read_tsv("signature_data/Moexipril-Signatures.tsv")
olmesartan <- read_tsv("signature_data/Olmesartan-Signatures.tsv")
perindopril <- read_tsv("signature_data/Perindopril-Signatures.tsv")
quinapril <- read_tsv("signature_data/Quinapril-Signatures.tsv")
ramipril <- read_tsv("signature_data/Ramipril-Signatures.tsv")
telmisartan <- read_tsv("signature_data/Telmisartan-Signatures.tsv")
valsartan <- read_tsv("signature_data/Valsartan-Signatures.tsv")
losartan <- read_tsv("signature_data/Losartan-Signatures.tsv")
candesartan <- read_tsv("signature_data/Candesartan-Signatures.tsv")
drugs_list <- list(bupropion, carbetocin, chloroquine, desmopressin, lopinavir, ritonavir,
benazepril, captopril, enalapril, fosinopril, lisinopril, moexipril,
olmesartan, perindopril, quinapril, ramipril, telmisartan, valsartan,
hydroxychloroquine, losartan, candesartan)
selected_lines <- list()
for (i in 1:length(drugs_list)) {
selected_lines[[i]] <- drugs_list[[i]]$CellLine
}
cell_lines <- reduce(selected_lines, union)
drugs <- bind_rows(bupropion, carbetocin, chloroquine, desmopressin, lopinavir, ritonavir,
benazepril, captopril, enalapril, fosinopril, lisinopril, moexipril,
olmesartan, perindopril, quinapril, ramipril, telmisartan, valsartan,
hydroxychloroquine, losartan, candesartan) %>%
filter(CellLine %in% cell_lines)
write_file(paste(drugs$SignatureId, collapse = "\n"), "drugs_signature_ids")
drugs %>% select(SignatureId, Perturbagen, CellLine) %>%
write_csv("signature_data/id-name-cellline_mapping.csv")