Skip to content

Commit

Permalink
support rescale.Gate option in GatingSet2Cytobank API. #13
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejiang committed Jan 19, 2017
1 parent c2c36c2 commit 409c498
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: CytoML
Type: Package
Title: GatingML interface for openCyto
Version: 1.1.6
Version: 1.1.7
Date: 2016-04-15
Author: Mike Jiang
Maintainer: Mike Jiang <wjiang2@fhcrc.org>
Expand Down
8 changes: 6 additions & 2 deletions R/GatingSet2cytobank.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#' @param cytobank.default.scale logical flag indicating whether to use the default Cytobank asinhtGml2 settings.
#' Currently it should be set to TRUE in order for gates to be displayed properly in Cytobank
#' because cytobank currently does not parse the global scale settings from GatingML.
#' @param ...
#' rescale.gate default is TRUE. which means the gate is rescaled to the new scale that is understandable by cytobank.
#' It is recommended not to change this behavior unless user wants to export to a gatingML file used for other purpose other
#' than being imported into cytobank.
#' @examples
#' library(flowWorkspace)
#'
Expand All @@ -33,7 +37,7 @@
#' GatingSet2cytobank(gs, outFile) #type by default is 'cytobank'
#'
#'
GatingSet2cytobank <- function(gs, outFile, showHidden = FALSE, cytobank.default.scale = TRUE){
GatingSet2cytobank <- function(gs, outFile, showHidden = FALSE, cytobank.default.scale = TRUE, ...){

#convert comp and trans as GML2 compatible format and save to env
if(cytobank.default.scale)
Expand All @@ -42,7 +46,7 @@ GatingSet2cytobank <- function(gs, outFile, showHidden = FALSE, cytobank.default
flowEnv <- new.env(parent = emptyenv())
res <- export_comp_trans(gs, flowEnv, cytobank.default.scale = cytobank.default.scale, type = "cytobank")
#convert gates to GML2
export_gates_cytobank(gs, flowEnv, res[["trans.Gm2objs"]], res[["trans"]], res[["compId"]], showHidden = showHidden)
export_gates_cytobank(gs, flowEnv, res[["trans.Gm2objs"]], res[["trans"]], res[["compId"]], showHidden = showHidden, ...)

tmp <- tempfile(fileext = ".xml")#ensure correct file extension for xmlTreeParse to work
flowUtils::write.gatingML(flowEnv, tmp)
Expand Down
6 changes: 5 additions & 1 deletion man/GatingSet2cytobank.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/compare.counts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed src/CytoML.so
Binary file not shown.
Binary file removed src/RcppExports.o
Binary file not shown.
Binary file removed src/setCounts.o
Binary file not shown.

0 comments on commit 409c498

Please sign in to comment.