Skip to content

Commit

Permalink
fixed bug with duplicated keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
pfgherardini committed Jul 18, 2018
1 parent 0a5c632 commit d4ecc0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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.0
Version: 0.2.1
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
4 changes: 4 additions & 0 deletions R/fcs_io.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ write_fcs <- function(fcs, out.name) {
keys <- fcs$keywords
keys <- keys[grep("\\$P[0-9]+.", names(keys), invert = T)]

# Exclude keywords that will be written with the new file
excl.keywords <- c("FCSversion", "$BEGINANALYSIS", "$BEGINSTEXT", "$BYTEORD", "$DATATYPE", "$ENDANALYSIS",
"$ENDSTEXT", "$MODE", "$NEXTDATA", "$TOT", "$PAR", "$BEGINDATA", "$ENDDATA")
keys <- keys[!(names(keys) %in% excl.keywords)]
flow.frame <- flowCore::flowFrame(fcs$m)
flow.frame <- update_flowFrame_keywords(flow.frame, fcs$m, fcs$desc, data.range = 262144)
flowCore::keyword(flow.frame) <- keys
Expand Down

0 comments on commit d4ecc0e

Please sign in to comment.