Merge branch 'develop' of github.com:mojaveazure/loomR into develop
authorPaul Hoffman <phoffman@nygenome.org>
Tue, 27 Feb 2018 23:50:20 +0000 (18:50 -0500)
committerPaul Hoffman <phoffman@nygenome.org>
Tue, 27 Feb 2018 23:50:20 +0000 (18:50 -0500)
R/internal.R
R/loom.R

index 4f590f7f3daf245f44051b1dcef20250f25668df..e49d05d752de50c6c6ba61dd8b6557b9a727fc7e 100644 (file)
@@ -86,6 +86,7 @@ validateLoom <- function(object) {
         }
         root.groups <- list.groups(object = object, path = '/', recursive = FALSE)
       } else {
+        object$close_all()
         stop(reopen.msg)
       }
     } else {
index c17a160dc8f4390e6062276b4d883d11697b1987..55bb8c3c7934ddae62ee9ca6a1569ecb9e649899 100644 (file)
--- a/R/loom.R
+++ b/R/loom.R
@@ -660,6 +660,9 @@ loom <- R6Class(
           setTxtProgressBar(pb = pb, value = i / length(x = batch))
         }
       }
+      if (display.progress) {
+        close(con = pb)
+      }
       # Clean up and allow chaining
       private$reset_batch()
       # Load layers and attributes
@@ -743,7 +746,9 @@ loom <- R6Class(
           results <- Reduce(f = rbind, x = results)
         }
       }
-
+      if (display.progress) {
+        close(con = pb)
+      }
       private$reset_batch()
       return(results)
     },