Skip to content

Commit

Permalink
fixes #29
Browse files Browse the repository at this point in the history
  • Loading branch information
pfgherardini committed Jan 16, 2020
1 parent 8318423 commit e0324f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 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.4
Version: 0.2.5
Author: "Pier Federico Gherardini <[email protected]> [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
2 changes: 1 addition & 1 deletion 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]) - min(exprs.m[,i]))
keyval[[r]] <- ceiling(max(exprs.m[,i]))
else if(is.numeric(data.range))
keyval[[r]] <- data.range
else
Expand Down
3 changes: 2 additions & 1 deletion R/normalize_cytof.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ get_mahalanobis_distance_from_beads <- function(m, beads.events, beads.cols.name
beads.data <- m[beads.events,]

cov.m <- cov(beads.data)
ret <- sqrt(mahalanobis(m, colMeans(beads.data), cov.m))
ret <- sqrt(mahalanobis(m, colMeans(beads.data), cov.m, tol = 1e-30))

return(ret)
}

Expand Down

0 comments on commit e0324f6

Please sign in to comment.