Fix issue where the H5D for '/matrix' wasn't being stored
authorPaul Hoffman <phoffman@nygenome.org>
Tue, 31 Oct 2017 19:57:43 +0000 (15:57 -0400)
committerPaul Hoffman <phoffman@nygenome.org>
Tue, 31 Oct 2017 19:57:43 +0000 (15:57 -0400)
R/loom.R

index a2e7e249efa534ca2385bb94b6b6ccaf9b5a3245..ac648af0b2b0a9e28f9ef1e89d861acff2da7ead 100644 (file)
--- a/R/loom.R
+++ b/R/loom.R
@@ -62,7 +62,8 @@ loom <- R6Class(
       if (do.validate) {
         # Run the validation steps
         validateLoom(object = self)
-        # Store the shape of /matrix
+        # Store /matrix and the shape of /matrix
+        self$matrix <- self[['matrix']]
         self$shape <- self[['matrix']]$dims
         # Store the chunk size
         chunks <- h5attr(x = self, which = 'chunks')
@@ -276,6 +277,7 @@ create <- function(
     robj = t(x = data),
     chunk_dims = chunk.dims
   )
+  new.loom$shape <- new.loom[['matrix']]
   new.loom$shape <- new.loom[['matrix']]$dims
   if (!is.null(x = colnames(x = data))) {
     new.loom$add.row.attribute(attribute = list('gene_names' = colnames(x = data)))