Skip to content

Commit c9bab53

Browse files
Merge pull request #42 from hancockinformatics/devel
Merge Devel 0.99.802
2 parents ca33e83 + 390dc6c commit c9bab53

File tree

7 files changed

+115
-100
lines changed

7 files changed

+115
-100
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ABCindex
22
Title: A Shiny app to calculate ABCI for checkerboard assays
3-
Version: 0.99.78
3+
Version: 0.99.802
44
Authors@R:
55
person(given = "Travis",
66
family = "Blimkie",

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ABCindex v0.99.802
2+
3+
## Changes
4+
5+
* Updated renv and package versions (a70c9b8)
6+
* Biomass reduction calculation was changed to prevent data from being inappropriately rescaled (ea922f2)
7+
* Changed sort order for concentrations in summary; Fixed message type for notify function (5a0611e)
8+
* Fixed typos in Help pages (387e574)

R/2_upload.R

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ abci_analysis_single <- function(
133133
)
134134

135135
if (!normalize) {
136-
if (max(data_clean[[col.data]]) >= 50) {
136+
if (max(data_clean[[col.data]]) - min(data_clean[[col.data]]) > 10) {
137137
data_clean[[col.data]] <- data_clean[[col.data]] / 100
138138
}
139139
}
@@ -370,13 +370,13 @@ fill_card <- function(expt) {
370370
p(strong("Treatment in the columns: "), expt$cols$name),
371371
p(
372372
tags$b("Detected concentrations: "),
373-
paste(sort(expt$cols$conc, decreasing = TRUE), collapse = ", ")
373+
paste(sort(expt$cols$conc, decreasing = FALSE), collapse = ", ")
374374
),
375375
hr(),
376376
p(strong("Treatment in the rows: "), expt$rows$name),
377377
p(
378378
strong("Detected concentrations: "),
379-
paste(sort(expt$rows$conc, decreasing = TRUE), collapse = ", ")
379+
paste(sort(expt$rows$conc, decreasing = FALSE), collapse = ", ")
380380
),
381381
)
382382
}
@@ -418,7 +418,7 @@ notify <- function(id = NULL, list) {
418418
showNotification(
419419
id = id,
420420
type = list$type,
421-
duration = ifelse(list$type == "success", 10, 20),
421+
duration = ifelse(list$type == "message", 5, 20),
422422
ui = HTML(paste0(
423423
"<h4 class='alert-heading'><b>", list$status, "</b></h4>",
424424
"<p class='mb-0'>",
@@ -878,15 +878,13 @@ server_upload <- function(id) {
878878
"name" = unique(experiment$cols),
879879
"concentrations" = levels(experiment$cols_conc) %>%
880880
as.character() %>%
881-
as.numeric() %>%
882-
sort()
881+
as.numeric()
883882
),
884883
"rows" = list(
885884
"name" = unique(experiment$rows),
886885
"concentrations" = levels(experiment$rows_conc) %>%
887886
as.character() %>%
888-
as.numeric() %>%
889-
sort()
887+
as.numeric()
890888
)
891889
)
892890
})

R/3_results.R

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,14 @@ plot_dot <- function(
544544

545545
# Fix up the variable being mapped to size. Define labels and breaks.
546546
data <- data %>%
547-
group_by(.data[[col.analysis]]) %>%
548547
mutate(
549548
across(all_of(c(x.drug, y.drug)), forcats::fct_inseq),
550-
reference = ceiling(scales::rescale(.data[[col.size]], to = c(0, 100)))
549+
reference = ifelse(
550+
test = ceiling(.data[[col.size]] * 100) <= 100,
551+
yes = ceiling(.data[[col.size]] * 100),
552+
no = 100
553+
)
551554
) %>%
552-
ungroup() %>%
553555
left_join(size_mapping, by = "reference")
554556

555557
proper_labels <- seq(0, 100, 20)
@@ -830,12 +832,14 @@ plot_dot_split <- function(
830832

831833
# Fix up the variable being mapped to size. Define labels and breaks.
832834
data <- data %>%
833-
group_by(.data[[col.analysis]]) %>%
834835
mutate(
835836
across(all_of(c(x.drug, y.drug)), forcats::fct_inseq),
836-
reference = ceiling(scales::rescale(.data[[col.size]], to = c(0, 100)))
837+
reference = ifelse(
838+
test = ceiling(.data[[col.size]] * 100) <= 100,
839+
yes = ceiling(.data[[col.size]] * 100),
840+
no = 100
841+
)
837842
) %>%
838-
ungroup() %>%
839843
left_join(size_mapping, by = "reference")
840844

841845
proper_labels <- seq(0, 100, 20)
@@ -849,13 +853,11 @@ plot_dot_split <- function(
849853
if (!large.effect) {
850854
data <- mutate(data, large_chr = rep(0))
851855
} else {
852-
data <- data %>%
853-
mutate(
854-
large_chr = ifelse(
855-
(effect_avg > large.effect.val & data[[col.fill]] > abci.val),
856-
yes = 1,
857-
no = 0)
858-
)
856+
data <- mutate(data, large_chr = ifelse(
857+
test = (effect_avg > large.effect.val & data[[col.fill]] > abci.val),
858+
yes = 1,
859+
no = 0
860+
))
859861
}
860862

861863
# MICs are calculated by `get_mic()` and converted to positions on the axes
@@ -976,9 +978,9 @@ plot_dot_split <- function(
976978
x,
977979
col_size = scales::rescale(N1S2, to = size.range),
978980
col_size = ifelse(
979-
!is.na(col_fill),
980-
col_size,
981-
0
981+
test = !is.na(col_fill),
982+
yes = col_size,
983+
no = 0
982984
)
983985
)
984986
})

0 commit comments

Comments
 (0)