Skip to content

Commit 7fd1d76

Browse files
committed
more ICI categories
1 parent 9a4991a commit 7fd1d76

File tree

6 files changed

+106
-18
lines changed

6 files changed

+106
-18
lines changed

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Version 1.8.7
2+
3+
* NCI Thesaurus update (24.11d)
4+
* CIViC update (20241218)
5+
* New custom drug categories
6+
- ICIs - CTLA4 inhibitors
7+
- ICIs - TIGIT inhibitors
8+
- ICIs - LAG3 inhibitors
9+
110
# Version 1.8.1
211

312
* CIViC update (20241107)

R/sysdata.rda

-10 Bytes
Binary file not shown.

data-raw/data-raw.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ biomarkers[['metadata']] <- metadata$biomarkers
207207
# substr(as.character(packageVersion("pharmOncoX")),1,4),
208208
# as.character(as.integer(substr(as.character(packageVersion("pharmOncoX")),5,5)) + 1))
209209

210-
version_bump <- "1.8.6"
210+
version_bump <- "1.8.7"
211211

212212
db <- list()
213213
db[['biomarkers']] <- biomarkers

data-raw/drug_utilities.R

Lines changed: 85 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -499,13 +499,31 @@ get_atc_drug_classification <- function(
499499
dplyr::arrange(atc_code_level3) |>
500500
dplyr::distinct() |>
501501
dplyr::mutate(atc_code_level3 = dplyr::case_when(
502-
atc_drug_entry == "ipilimumab" ~ "L01FXA",
503-
atc_drug_entry == "tremelimumab" ~ "L01FXA",
502+
## JAK inhibitors (assigned to both L01EJ and L04AF,
503+
## stick to L01EJ for consistency with other kinase inhibitors)
504+
atc_code_level3 == "L04AF" ~ "L01EJ",
505+
## mTOR inhibitors (assigned to both L04AH and L01EG,
506+
## stick to L01EG for consistency with other kinase inhibitors)
507+
atc_code_level3 == "L04AH" ~ "L01EG",
508+
atc_drug_entry == "ipilimumab" |
509+
atc_drug_entry == "tremelimumab" ~ "L01FXA",
510+
atc_drug_entry == "epcoritamab" |
511+
atc_drug_entry == "glofitamab" |
512+
atc_drug_entry == "mosunetuzumab" |
513+
atc_drug_entry == "talquetamab" |
514+
atc_drug_entry == "teclistamab" ~ "L01FXE",
504515
TRUE ~ as.character(atc_code_level3)
505516
)) |>
506517
dplyr::mutate(atc_level3 = dplyr::case_when(
507-
atc_drug_entry == "ipilimumab" ~ "Other ICIs - CTLA4 inhibitors",
508-
atc_drug_entry == "tremelimumab" ~ "Other ICIs - CTLA4 inhibitors",
518+
atc_code_level3 == "L01EJ" ~ "JAK inhibitors",
519+
atc_code_level3 == "L01EG" ~ "mTOR inhibitors",
520+
atc_drug_entry == "ipilimumab" |
521+
atc_drug_entry == "tremelimumab" ~ "Other ICIs - CTLA4 inhibitors",
522+
atc_drug_entry == "epcoritamab" |
523+
atc_drug_entry == "glofitamab" |
524+
atc_drug_entry == "mosunetuzumab" |
525+
atc_drug_entry == "talquetamab" |
526+
atc_drug_entry == "teclistamab" ~ "T-cell Engagers",
509527
TRUE ~ as.character(atc_level3)
510528
))
511529

@@ -1196,7 +1214,20 @@ map_curated_targets <- function(gene_info = NULL,
11961214
paste0(drug_action_type,"_OTHER"),
11971215
as.character(drug_action_type)
11981216
))
1199-
1217+
1218+
1219+
duplicated_drugs <- ot_nci_drugs_curated |>
1220+
dplyr::group_by(nci_cd_name) |>
1221+
dplyr::summarise(drug_cancer_relevance = paste(
1222+
sort(unique(drug_cancer_relevance)), collapse="@")) |>
1223+
dplyr::filter(stringr::str_detect(drug_cancer_relevance,"@")) |>
1224+
tidyr::separate_rows(drug_cancer_relevance, sep = "@") |>
1225+
dplyr::filter(!stringr::str_detect(drug_cancer_relevance,"otp"))
1226+
1227+
ot_nci_drugs_curated <- ot_nci_drugs_curated |>
1228+
dplyr::anti_join(duplicated_drugs,
1229+
by = c("nci_cd_name","drug_cancer_relevance"))
1230+
12001231
return(list('curated' = ot_nci_drugs_curated,
12011232
'nonmapped' = inhibitors_no_target_nonmapped))
12021233
}
@@ -1243,7 +1274,8 @@ assign_drug_category <- function(drug_df = NULL,
12431274
drugs_non_classified <- drug_df |>
12441275
dplyr::mutate(drug_entry = tolower(nci_cd_name)) |>
12451276
dplyr::anti_join(
1246-
classified_drugs[['pre_classified_atc']], by = "drug_entry") |>
1277+
classified_drugs[['pre_classified_atc']],
1278+
by = "drug_entry") |>
12471279
dplyr::distinct()
12481280

12491281
custom_target_classifications <- drugs_non_classified |>
@@ -1323,12 +1355,25 @@ assign_drug_category <- function(drug_df = NULL,
13231355
target_symbol, "^FGFR[1-4]{1}") ~ "L01EN",
13241356
stringr::str_detect(
13251357
target_symbol, "^IDH[1-2]{1}") ~ "L01XXD",
1358+
stringr::str_detect(
1359+
target_symbol, "^((IGF1\\|)|IGF1R)") ~ "L01XXN",
1360+
!is.na(drug_name) &
1361+
stringr::str_detect(
1362+
tolower(drug_name), "^aberaterone") ~ "L02BX",
1363+
!is.na(drug_name) &
1364+
stringr::str_detect(
1365+
tolower(drug_name), "^(gemcitabine)") ~ "L01BC",
1366+
!is.na(drug_name) &
1367+
stringr::str_detect(
1368+
tolower(drug_name), "^(fludarabine)") ~ "L01BB",
13261369
stringr::str_detect(
13271370
target_symbol, "^(K|N|H)RAS") ~ "L01XXC",
13281371
stringr::str_detect(
13291372
target_symbol, "^MET$") ~ "L01EXA",
13301373
stringr::str_detect(
1331-
target_symbol, "^(AKT[0-9](\\|)?){1,}$") |
1374+
target_symbol, "^(CD3D\\|CD3E\\|CD3G)") ~ "L01FXE",
1375+
stringr::str_detect(
1376+
target_symbol, "^(AKT[0-9](\\|)?){1,}") |
13321377
(!is.na(drug_name) &
13331378
stringr::str_detect(
13341379
drug_name, "GSK-690693")) ~ "L01EXC",
@@ -1360,10 +1405,14 @@ assign_drug_category <- function(drug_df = NULL,
13601405
(!is.na(drug_name) &
13611406
(drug_name == "PRALSETINIB" |
13621407
drug_name == "SELPERCATINIB")) ~ "L01EXL",
1408+
stringr::str_detect(
1409+
target_symbol, "^MTOR$") ~ "L01EG",
13631410
stringr::str_detect(
13641411
target_symbol, "^(KDR|FLT1|FLT3|FLT4)") ~ "L01EK",
13651412
stringr::str_detect(
13661413
target_symbol, "^(MS4A1)") ~ "L01FA",
1414+
stringr::str_detect(
1415+
target_symbol, "^(ESR1)") ~ "L02BA",
13671416
stringr::str_detect(
13681417
target_symbol, "^(CD38)") ~ "L01FC",
13691418
stringr::str_detect(
@@ -1499,21 +1548,45 @@ assign_drug_category <- function(drug_df = NULL,
14991548
drug_n_indications > 2) &
15001549
(!is.na(drug_frac_cancer_indications) &
15011550
drug_frac_cancer_indications > 0.4))) ~ "L01XX",
1502-
1503-
15041551
TRUE ~ as.character(atc_code_level3)
15051552
)) |>
15061553
dplyr::distinct() |>
15071554
dplyr::group_by(dplyr::across(-c("atc_code_level3"))) |>
15081555
dplyr::summarise(atc_code_level3 = paste(unique(atc_code_level3), collapse="|"),
1509-
.groups = "drop")
1556+
.groups = "drop") |>
1557+
dplyr::mutate(atc_code_level3 = dplyr::case_when(
1558+
stringr::str_detect(
1559+
atc_code_level3, "^(L0[A-Z0-9]{1,}\\|((S|M)01(XA|LA|AH)))$") ~
1560+
stringr::str_replace_all(
1561+
atc_code_level3, "(\\|((S|M)01(XA|LA|AH)))$", ""),
1562+
stringr::str_detect(
1563+
atc_code_level3, "L0[A-Z0-9]{1,}\\|L01XX") ~
1564+
stringr::str_replace_all(
1565+
atc_code_level3, "\\|L01XX", ""),
1566+
atc_code_level3 == "D11AH|L01EJ" |
1567+
atc_code_level3 == "D11AH|L01XF" |
1568+
atc_code_level3 == "G03DA|L02AB" |
1569+
atc_code_level3 == "D10AD|L01XF" |
1570+
atc_code_level3 == "D11AH|L04AD" ~
1571+
stringr::str_replace_all(
1572+
atc_code_level3, "^(D10AD|G03DA|D11AH)\\|", ""),
1573+
atc_code_level3 == "L01FG|S01LA" |
1574+
atc_code_level3 == "L01EG|S01XA" |
1575+
atc_code_level3 == "L01BB|L04AA" |
1576+
atc_code_level3 == "L01BA|L04AX" |
1577+
atc_code_level3 == "L01XX|M01AH" ~
1578+
stringr::str_replace_all(
1579+
atc_code_level3, "\\|(S01LA|S01XA|L04AA|L04AX|M01AH)", ""),
1580+
TRUE ~ atc_code_level3
1581+
)) |>
1582+
dplyr::distinct()
15101583

15111584

15121585
atc_classified_drugs <- classified_drugs_all |>
15131586
dplyr::filter(!is.na(drug_entry)) |>
15141587
dplyr::select(atc_code_level3, drug_entry) |>
15151588
dplyr::filter(!is.na(atc_code_level3)) |>
1516-
tidyr::separate_rows(atc_code_level3) |>
1589+
tidyr::separate_rows(atc_code_level3, sep = "\\|") |>
15171590
dplyr::filter(!is.na(atc_code_level3)) |>
15181591
dplyr::left_join(
15191592
dplyr::select(
@@ -1524,7 +1597,7 @@ assign_drug_category <- function(drug_df = NULL,
15241597
atc_level2,
15251598
atc_code_level3,
15261599
atc_level3
1527-
)
1600+
), relationship ="many-to-many"
15281601
) |>
15291602
dplyr::group_by(drug_entry) |>
15301603
dplyr::summarise(

pkgdown/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ releases of external databases:
1717
- ChEMBL (v34)
1818
- NCI Thesaurus (24.11d)
1919
- MitelmanDB (20241015)
20-
- CIViC (20241204)
20+
- CIViC (20241218)
2121

2222
### Getting started
2323

vignettes/pharmOncoX.Rmd

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ vignette: >
99
%\VignetteEncoding{UTF-8}
1010
bibliography: '`r system.file("bibliography.bib", package = "pharmOncoX")`'
1111
nocite: |
12-
@Kim2021-ye, @Freshour2021-bh, @Sioutos2007-nl,
12+
@Kim2021-ye, @Sioutos2007-nl,
1313
@Ochoa2021-jc, @Nakken2023-ab, @Griffith2017-do,
1414
@Tamborero2018-aj
1515
---
@@ -272,8 +272,11 @@ drugs <- get_drugs(
272272
drugs$records <- drugs$records |>
273273
dplyr::filter(
274274
(!is.na(atc_level3) &
275-
(atc_level3 == "PD-1/PDL-1 inhibitors" |
276-
atc_level3 == "Other immune checkpoint inhibitors")
275+
(atc_level3 == "PD-1/PDL-1 inhibitors" |
276+
atc_level3 == "Other ICIs - LAG3 inhibitors" |
277+
atc_level3 == "Other ICIs - TIGIT inhibitors" |
278+
atc_level3 == "Other ICIs - CTLA4 inhibitors" |
279+
atc_level3 == "Other ICIs")
277280
)) |>
278281
dplyr::select(
279282
-c("drug_alias",
@@ -326,7 +329,10 @@ drugs$records <- drugs$records |>
326329
dplyr::filter(
327330
(!is.na(atc_level3) &
328331
(atc_level3 == "PD-1/PDL-1 inhibitors" |
329-
atc_level3 == "Other immune checkpoint inhibitors")
332+
atc_level3 == "Other ICIs - LAG3 inhibitors" |
333+
atc_level3 == "Other ICIs - TIGIT inhibitors" |
334+
atc_level3 == "Other ICIs - CTLA4 inhibitors" |
335+
atc_level3 == "Other ICIs")
330336
)) |>
331337
dplyr::select(
332338
-c("drug_alias",

0 commit comments

Comments
 (0)