Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejiang committed Aug 28, 2018
1 parent ba115e0 commit fe7c137
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/GatingSet2flowJo.R
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ constructPopNode <- function(gh, pop, trans, matInfo, showHidden = FALSE, env.no
#get dim from non-boolean children
nonBool <- sapply(children, function(child){
thisGate <- getGate(gh, child)
!is(thisGate, "booleanFilter")
!is.null(env.nodes[["DerivedParameters"]][[child]])||!is(thisGate, "booleanFilter")
})
if(sum(nonBool) == 0)
stop("Can't find any non-boolean children node under ", pop)
Expand Down
6 changes: 4 additions & 2 deletions tests/testthat/test-flowJo.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ test_that("GatingSet2flowJo: export clustering results as derived parameters ",{
params <- parameters(getGate(gh, "CD4"))
Rm("CD4", gs)
Rm("CD8", gs)

Rm("DNT", gs)
Rm("DPT", gs)
#run flowClust

fr <- getData(gh, "CD3+")
Expand All @@ -96,7 +97,7 @@ test_that("GatingSet2flowJo: export clustering results as derived parameters ",{
stats.orig <- getPopStats(gs[[1]])
#output to flowJo
outFile <- tempfile(fileext = ".wsp")
outFile <- "~/test.wsp"
# outFile <- "~/test.wsp"
expect_message(GatingSet2flowJo(gs, outFile), "DerivedParameter")

# #parse it back in
Expand All @@ -105,3 +106,4 @@ test_that("GatingSet2flowJo: export clustering results as derived parameters ",{
# stats.new <- getPopStats(gs1[[1]])
# expect_equal(stats.orig, stats.new, tol = 5e-3)
})

0 comments on commit fe7c137

Please sign in to comment.