Skip to content

Commit

Permalink
Merge pull request #42 from hancockinformatics/devel
Browse files Browse the repository at this point in the history
Merge Devel 0.99.802
  • Loading branch information
travis-m-blimkie authored Apr 26, 2024
2 parents ca33e83 + 390dc6c commit c9bab53
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 100 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ABCindex
Title: A Shiny app to calculate ABCI for checkerboard assays
Version: 0.99.78
Version: 0.99.802
Authors@R:
person(given = "Travis",
family = "Blimkie",
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ABCindex v0.99.802

## Changes

* Updated renv and package versions (a70c9b8)
* Biomass reduction calculation was changed to prevent data from being inappropriately rescaled (ea922f2)
* Changed sort order for concentrations in summary; Fixed message type for notify function (5a0611e)
* Fixed typos in Help pages (387e574)
14 changes: 6 additions & 8 deletions R/2_upload.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ abci_analysis_single <- function(
)

if (!normalize) {
if (max(data_clean[[col.data]]) >= 50) {
if (max(data_clean[[col.data]]) - min(data_clean[[col.data]]) > 10) {
data_clean[[col.data]] <- data_clean[[col.data]] / 100
}
}
Expand Down Expand Up @@ -370,13 +370,13 @@ fill_card <- function(expt) {
p(strong("Treatment in the columns: "), expt$cols$name),
p(
tags$b("Detected concentrations: "),
paste(sort(expt$cols$conc, decreasing = TRUE), collapse = ", ")
paste(sort(expt$cols$conc, decreasing = FALSE), collapse = ", ")
),
hr(),
p(strong("Treatment in the rows: "), expt$rows$name),
p(
strong("Detected concentrations: "),
paste(sort(expt$rows$conc, decreasing = TRUE), collapse = ", ")
paste(sort(expt$rows$conc, decreasing = FALSE), collapse = ", ")
),
)
}
Expand Down Expand Up @@ -418,7 +418,7 @@ notify <- function(id = NULL, list) {
showNotification(
id = id,
type = list$type,
duration = ifelse(list$type == "success", 10, 20),
duration = ifelse(list$type == "message", 5, 20),
ui = HTML(paste0(
"<h4 class='alert-heading'><b>", list$status, "</b></h4>",
"<p class='mb-0'>",
Expand Down Expand Up @@ -878,15 +878,13 @@ server_upload <- function(id) {
"name" = unique(experiment$cols),
"concentrations" = levels(experiment$cols_conc) %>%
as.character() %>%
as.numeric() %>%
sort()
as.numeric()
),
"rows" = list(
"name" = unique(experiment$rows),
"concentrations" = levels(experiment$rows_conc) %>%
as.character() %>%
as.numeric() %>%
sort()
as.numeric()
)
)
})
Expand Down
34 changes: 18 additions & 16 deletions R/3_results.R
Original file line number Diff line number Diff line change
Expand Up @@ -544,12 +544,14 @@ plot_dot <- function(

# Fix up the variable being mapped to size. Define labels and breaks.
data <- data %>%
group_by(.data[[col.analysis]]) %>%
mutate(
across(all_of(c(x.drug, y.drug)), forcats::fct_inseq),
reference = ceiling(scales::rescale(.data[[col.size]], to = c(0, 100)))
reference = ifelse(
test = ceiling(.data[[col.size]] * 100) <= 100,
yes = ceiling(.data[[col.size]] * 100),
no = 100
)
) %>%
ungroup() %>%
left_join(size_mapping, by = "reference")

proper_labels <- seq(0, 100, 20)
Expand Down Expand Up @@ -830,12 +832,14 @@ plot_dot_split <- function(

# Fix up the variable being mapped to size. Define labels and breaks.
data <- data %>%
group_by(.data[[col.analysis]]) %>%
mutate(
across(all_of(c(x.drug, y.drug)), forcats::fct_inseq),
reference = ceiling(scales::rescale(.data[[col.size]], to = c(0, 100)))
reference = ifelse(
test = ceiling(.data[[col.size]] * 100) <= 100,
yes = ceiling(.data[[col.size]] * 100),
no = 100
)
) %>%
ungroup() %>%
left_join(size_mapping, by = "reference")

proper_labels <- seq(0, 100, 20)
Expand All @@ -849,13 +853,11 @@ plot_dot_split <- function(
if (!large.effect) {
data <- mutate(data, large_chr = rep(0))
} else {
data <- data %>%
mutate(
large_chr = ifelse(
(effect_avg > large.effect.val & data[[col.fill]] > abci.val),
yes = 1,
no = 0)
)
data <- mutate(data, large_chr = ifelse(
test = (effect_avg > large.effect.val & data[[col.fill]] > abci.val),
yes = 1,
no = 0
))
}

# MICs are calculated by `get_mic()` and converted to positions on the axes
Expand Down Expand Up @@ -976,9 +978,9 @@ plot_dot_split <- function(
x,
col_size = scales::rescale(N1S2, to = size.range),
col_size = ifelse(
!is.na(col_fill),
col_size,
0
test = !is.na(col_fill),
yes = col_size,
no = 0
)
)
})
Expand Down
Loading

0 comments on commit c9bab53

Please sign in to comment.