Skip to content

Commit

Permalink
fixes range calculation in the presence of NA (see #32)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfgherardini committed Apr 14, 2020
1 parent e0324f6 commit 467d641
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: premessa
Type: Package
Title: R package for pre-processing of flow and mass cytometry data
Version: 0.2.5
Version: 0.2.6
Author: "Pier Federico Gherardini <pfgherardini@parkerici.org> [aut, cre]"
Description: This package includes panel editing/renaming for FCS files, bead-based normalization and debarcoding.
Imports: shiny (>= 0.14), flowCore, reshape, ggplot2, hexbin, gridExtra, rhandsontable, jsonlite
Expand Down
6 changes: 3 additions & 3 deletions R/fcs_io.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ update_flowFrame_keywords <- function(flowFrame, exprs.m, desc = NULL, data.rang
keyval[[n]] <- colnames(exprs.m)[i]

if(data.range == "data")
keyval[[r]] <- ceiling(max(exprs.m[,i]))
keyval[[r]] <- ceiling(max(exprs.m[,i], na.rm = TRUE))
else if(is.numeric(data.range))
keyval[[r]] <- data.range
else
Expand All @@ -38,8 +38,8 @@ update_flowFrame_keywords <- function(flowFrame, exprs.m, desc = NULL, data.rang
flowCore::keyword(flowFrame) <- keyval


pdata[i,"minRange"] <- min(exprs.m[,i])
pdata[i,"maxRange"] <- max(exprs.m[,i])
pdata[i,"minRange"] <- min(exprs.m[,i], na.rm = TRUE)
pdata[i,"maxRange"] <- max(exprs.m[,i], na.rm = TRUE)

}

Expand Down

0 comments on commit 467d641

Please sign in to comment.