Skip to content

Commit

Permalink
fix bug in molecular features boxplot methylation 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pcastellanoescuder committed Jan 14, 2024
1 parent 92768ac commit 002df85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ddh
Type: Package
Title: Utility Functions and Data Sets for Data-driven Hypothesis
Version: 0.3.29
Version: 0.3.30
Authors@R: c(
person(given = "Matthew",
family = "Hirschey",
Expand Down
12 changes: 11 additions & 1 deletion R/plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ make_molecular_features_boxplots <- function(input = list(),
dplyr::select(dplyr::any_of(c("depmap_id", gene_molecular_features_hits$Feature)))

## Methylation
data_methylation <- get_content("gene_expression_multiomics", dataset = TRUE) %>%
data_methylation <- get_content("methylation_multiomics", dataset = TRUE) %>%
dplyr::filter(depmap_id %in% gene_molecular_features_segments$depmap_id)

colnames(data_methylation) <- paste0("TSS_", colnames(data_methylation))
Expand All @@ -2107,6 +2107,16 @@ make_molecular_features_boxplots <- function(input = list(),
by = "depmap_id") %>%
dplyr::mutate(group = stringr::str_to_title(group)) %>%
dplyr::mutate(group = factor(group, levels = c("Resistant", "Sensitive"))) %>%
dplyr::mutate_at("lineage", function(str) {
str <- stringr::str_replace_all(str, "\\_", " ")
str <- stringr::str_to_title(str)
return(str)
}) %>%
dplyr::mutate_at("lineage_subtype", function(str) {
str <- stringr::str_replace_all(str, "\\_", " ")
str <- dplyr::if_else(stringr::str_detect(str, "^[:lower:]"), stringr::str_to_title(str), str)
return(str)
}) %>%
tidyr::pivot_longer(cols = -c(depmap_id, Query, group, cell_name, sex, lineage, lineage_subtype))

if (is.null(target_genes) | card == TRUE) { # defaults to the first molecular feature
Expand Down

0 comments on commit 002df85

Please sign in to comment.