Skip to content

Commit

Permalink
refactor: update logic to support GDS identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
bczech committed May 16, 2024
1 parent fa34a27 commit 741c4dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/add_annotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,12 @@ get_drug_annotation_from_dt <- function(dt) {
names(dt))
dt_drug <- dt[, unlist(drug_cols), with = FALSE]
dt_long <- data.table::melt(dt_drug,
measure.vars = patterns(paste0("^",
unlist(drug_cols[c("drug",
"drug_name",
"drug_moa")]))),
measure.vars = patterns(gsub("[0-9]",
".",
paste0("^",
unlist(drug_cols[c("drug",
"drug_name",
"drug_moa")])))),
value.name = unlist(drug_cols[c("drug",
"drug_name",
"drug_moa")]))
Expand Down

0 comments on commit 741c4dd

Please sign in to comment.