Skip to content

Commit

Permalink
bugfix: missing values caused error in thresholding
Browse files Browse the repository at this point in the history
  • Loading branch information
Swarchal committed Mar 22, 2023
1 parent 2934bd8 commit 37bbfbb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: platetools
Title: Tools and Plots for Multi-Well Plates
Version: 0.1.5
Version: 0.1.6
Authors@R: person("Scott", "Warchal", email = "scott.warchal@gmail.com", role = c("aut", "cre"))
Description: Collection of functions for working with multi-well microtitre
plates, mainly 96, 384 and 1536 well plates.
Expand Down
4 changes: 3 additions & 1 deletion R/bhit_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ bhit_map <- function(data, well, plate = 96, threshold = 2,

# calculate whether values are beyond the threshold; defined as hit or null
for (row in 1:nrow(platemap)) {
if (platemap[row, 'values'] > threshold) {
if (!is.finite(platemap[row, "values"])) {
platemap$hit[row] <- NaN
} else if (platemap[row, 'values'] > threshold) {
platemap$hit[row] <- "hit"
} else if (platemap[row, 'values'] < (-1*threshold)) {
platemap$hit[row] <- "neg_hit"
Expand Down
4 changes: 3 additions & 1 deletion R/hit_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ hit_map <- function(data, well, plate = 96, threshold = 2,

# calculate whether values are beyond the threshold; defined as hit or null
for (row in 1:nrow(platemap)){
if (platemap[row, 'values'] > threshold) {
if (!is.finite(platemap[row, "values"])) {
platemap$hit[row] <-- NaN
} else if (platemap[row, 'values'] > threshold) {
platemap$hit[row] <- "hit"
} else if (platemap[row, 'values'] < (-1 * threshold)) {
platemap$hit[row] <- "neg_hit"
Expand Down

0 comments on commit 37bbfbb

Please sign in to comment.