New Upstream Release - r-bioc-hdf5array

Ready changes

Summary

Merged new upstream version: 1.28.1 (was: 1.26.0).

Diff

diff --git a/DESCRIPTION b/DESCRIPTION
index bd0c599..6426743 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -14,15 +14,15 @@ biocViews: Infrastructure, DataRepresentation, DataImport, Sequencing,
         ImmunoOncology
 URL: https://bioconductor.org/packages/HDF5Array
 BugReports: https://github.com/Bioconductor/HDF5Array/issues
-Version: 1.26.0
+Version: 1.28.1
 License: Artistic-2.0
 Encoding: UTF-8
 Author: Hervé Pagès
 Maintainer: Hervé Pagès <hpages.on.github@gmail.com>
-Depends: R (>= 3.4), methods, DelayedArray (>= 0.15.16), rhdf5 (>=
+Depends: R (>= 3.4), methods, DelayedArray (>= 0.26.1), rhdf5 (>=
         2.31.6)
 Imports: utils, stats, tools, Matrix, rhdf5filters, BiocGenerics (>=
-        0.31.5), S4Vectors, IRanges
+        0.31.5), S4Vectors, IRanges, S4Arrays (>= 1.0.1)
 LinkingTo: S4Vectors (>= 0.27.13), Rhdf5lib
 SystemRequirements: GNU make
 Suggests: BiocParallel, GenomicRanges, SummarizedExperiment (>=
@@ -39,9 +39,9 @@ Collate: utils.R H5File-class.R h5ls.R H5DSetDescriptor-class.R
         H5ADMatrix-class.R TENxMatrixSeed-class.R TENxMatrix-class.R
         writeTENxMatrix.R zzz.R
 git_url: https://git.bioconductor.org/packages/HDF5Array
-git_branch: RELEASE_3_16
-git_last_commit: 38b7bd6
-git_last_commit_date: 2022-11-01
-Date/Publication: 2022-11-01
+git_branch: RELEASE_3_17
+git_last_commit: 90e4bef
+git_last_commit_date: 2023-04-30
+Date/Publication: 2023-05-01
 NeedsCompilation: yes
-Packaged: 2022-11-01 21:44:25 UTC; biocbuild
+Packaged: 2023-05-01 20:57:04 UTC; biocbuild
diff --git a/NAMESPACE b/NAMESPACE
index 74608d6..7f82d6b 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -15,6 +15,7 @@ import(rhdf5)
 import(BiocGenerics)
 import(S4Vectors)
 import(IRanges)
+import(S4Arrays)
 import(DelayedArray)
 
 
@@ -88,11 +89,13 @@ exportMethods(
     ## Methods for generics defined in the BiocGenerics package:
     path, "path<-", type, updateObject,
 
+    ## Methods for generics defined in the S4Arrays package:
+    extract_array, is_sparse, "is_sparse<-",
+
     ## Methods for generics defined in the DelayedArray package:
-    extract_array,
-    sparsity, is_sparse, "is_sparse<-", extract_sparse_array,
-    read_sparse_block, write_block,
-    matrixClass, DelayedArray, chunkdim,
+    chunkdim, write_block,
+    sparsity, extract_sparse_array, read_sparse_block,
+    matrixClass, DelayedArray,
     close
 )
 
diff --git a/NEWS b/NEWS
index 01cbc86..45e8aee 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+CHANGES IN VERSION 1.28.0
+-------------------------
+
+- No changes in this version.
+
+
 CHANGES IN VERSION 1.26.0
 -------------------------
 
diff --git a/R/H5ADMatrixSeed-class.R b/R/H5ADMatrixSeed-class.R
index c40e1f7..0c9e0ab 100644
--- a/R/H5ADMatrixSeed-class.R
+++ b/R/H5ADMatrixSeed-class.R
@@ -25,7 +25,7 @@ setClass("CSR_H5ADMatrixSeed",
 ### We overwrite the method for HDF5ArraySeed objects with a method that
 ### accesses the slot, not the file.
 setMethod("dimnames", "Dense_H5ADMatrixSeed",
-    function(x) DelayedArray:::simplify_NULL_dimnames(x@dimnames)
+    function(x) S4Arrays:::simplify_NULL_dimnames(x@dimnames)
 )
 
 
diff --git a/R/H5File-class.R b/R/H5File-class.R
index 7ad6f1e..842c4a9 100644
--- a/R/H5File-class.R
+++ b/R/H5File-class.R
@@ -91,7 +91,7 @@
 
     if (use.rhdf5) {
         fid <- .ID_to_H5IdComponent(ID)
-        rhdf5:::H5Fclose(fid)
+        rhdf5::H5Fclose(fid)
     } else {
         .Call2("C_h5closefile", ID, PACKAGE="HDF5Array")
     }
diff --git a/R/H5SparseMatrixSeed-class.R b/R/H5SparseMatrixSeed-class.R
index 6383011..3aa6aad 100644
--- a/R/H5SparseMatrixSeed-class.R
+++ b/R/H5SparseMatrixSeed-class.R
@@ -108,7 +108,7 @@ setReplaceMethod("path", "H5SparseMatrixSeed",
 setMethod("dim", "H5SparseMatrixSeed", function(x) x@dim)
 
 setMethod("dimnames", "H5SparseMatrixSeed",
-    function(x) DelayedArray:::simplify_NULL_dimnames(x@dimnames)
+    function(x) S4Arrays:::simplify_NULL_dimnames(x@dimnames)
 )
 
 
@@ -485,7 +485,7 @@ setMethod(".load_sparse_data", "CSR_H5SparseMatrixSeed",
 
 .extract_array_from_H5SparseMatrixSeed <- function(x, index)
 {
-    ans_dim <- DelayedArray:::get_Nindex_lengths(index, dim(x))
+    ans_dim <- S4Arrays:::get_Nindex_lengths(index, dim(x))
     if (any(ans_dim == 0L)) {
         ## Return an empty matrix.
         data0 <- .read_h5sparse_data(x@filepath, x@group, x@subdata,
@@ -631,8 +631,8 @@ setGeneric("extractNonzeroDataByCol", signature="x",
 setMethod("extractNonzeroDataByCol", "CSC_H5SparseMatrixSeed",
     function(x, j)
     {
-        j <- DelayedArray:::normalizeSingleBracketSubscript2(j, ncol(x),
-                                                             colnames(x))
+        j <- S4Arrays:::normalizeSingleBracketSubscript2(j, ncol(x),
+                                                         colnames(x))
         .extract_nonzero_csc_sparse_data_by_col(x, j)
     }
 )
@@ -646,8 +646,8 @@ setGeneric("extractNonzeroDataByRow", signature="x",
 setMethod("extractNonzeroDataByRow", "CSR_H5SparseMatrixSeed",
     function(x, i)
     {
-        i <- DelayedArray:::normalizeSingleBracketSubscript2(i, nrow(x),
-                                                             rownames(x))
+        i <- S4Arrays:::normalizeSingleBracketSubscript2(i, nrow(x),
+                                                         rownames(x))
         .extract_nonzero_csc_sparse_data_by_col(t(x), i)
     }
 )
@@ -697,7 +697,7 @@ setAs("CSR_H5SparseMatrixSeed", "sparseMatrix",
 setMethod("show", "H5SparseMatrixSeed",
     function(object)
     {
-        cat(DelayedArray:::array_as_one_line_summary(object), ":\n", sep="")
+        cat(S4Arrays:::array_as_one_line_summary(object), ":\n", sep="")
         cat("# dirname: ", dirname(object), "\n", sep="")
         cat("# basename: ", basename(object), "\n", sep="")
         cat("# group: ", object@group, "\n", sep="")
diff --git a/R/HDF5ArraySeed-class.R b/R/HDF5ArraySeed-class.R
index dcfd9a9..8ed34ed 100644
--- a/R/HDF5ArraySeed-class.R
+++ b/R/HDF5ArraySeed-class.R
@@ -84,14 +84,14 @@ validate_HDF5ArraySeed_dataset_geometry <- function(x, what="object")
         return("'as_sparse' slot must be TRUE or FALSE")
 
     ## 'dim' slot.
-    msg <- DelayedArray:::validate_dim_slot(x, "dim")
+    msg <- S4Arrays:::validate_dim_slot(x, "dim")
     if (!isTRUE(msg))
         return(msg)
 
     ## 'chunkdim' slot.
     x_chunkdim <- x@chunkdim
     if (!is.null(x_chunkdim)) {
-        msg <- DelayedArray:::validate_dim_slot(x, "chunkdim")
+        msg <- S4Arrays:::validate_dim_slot(x, "chunkdim")
         if (!isTRUE(msg))
             return(msg)
     }
@@ -239,7 +239,7 @@ setMethod("dimnames", "HDF5ArraySeed",
                       as.integer=FALSE, as.sparse=FALSE)
 {
     if (!is.null(index))
-        index <- DelayedArray:::expand_Nindex_RangeNSBS(index)
+        index <- S4Arrays:::expand_Nindex_RangeNSBS(index)
     h5mread(filepath, name, starts=index,
             as.integer=as.integer, as.sparse=as.sparse)
 }
diff --git a/R/ReshapedHDF5ArraySeed-class.R b/R/ReshapedHDF5ArraySeed-class.R
index 07e44b6..3f8e37f 100644
--- a/R/ReshapedHDF5ArraySeed-class.R
+++ b/R/ReshapedHDF5ArraySeed-class.R
@@ -33,7 +33,7 @@ setMethod("dim", "ReshapedHDF5ArraySeed", function(x) x@reshaped_dim)
 
 .extract_array_from_ReshapedHDF5ArraySeed <- function(x, index)
 {
-    ans_dim <- DelayedArray:::get_Nindex_lengths(index, dim(x))
+    ans_dim <- S4Arrays:::get_Nindex_lengths(index, dim(x))
     h5mread_from_reshaped(path(x), x@name, x@reshaped_dim, starts=index)
 }
 
@@ -60,7 +60,7 @@ setMethod("chunkdim", "ReshapedHDF5ArraySeed", function(x) x@reshaped_chunkdim)
 ReshapedHDF5ArraySeed <- function(filepath, name, dim, type=NA)
 {
     seed <- HDF5ArraySeed(filepath, name, type=type)
-    reshaped_dim <- DelayedArray:::normarg_dim(dim)
+    reshaped_dim <- S4Arrays:::normarg_dim(dim)
     collapse_along <- find_dims_to_collapse(reshaped_dim, seed@dim)
     if (is.null(seed@chunkdim)) {
         reshaped_chunkdim <- NULL
diff --git a/R/h5mread_from_reshaped.R b/R/h5mread_from_reshaped.R
index 34cd49a..72d0217 100644
--- a/R/h5mread_from_reshaped.R
+++ b/R/h5mread_from_reshaped.R
@@ -83,7 +83,7 @@ collapse_dims <- function(dim0, collapse_along)
 h5mread_from_reshaped <- function(filepath, name, dim, starts, noreduce=FALSE,
                                   as.integer=FALSE, method=0L)
 {
-    dim <- DelayedArray:::normarg_dim(dim)
+    dim <- S4Arrays:::normarg_dim(dim)
     dim0 <- h5dim(filepath, name)
     collapse_along <- find_dims_to_collapse(dim, dim0)
     ndim <- length(dim)
@@ -134,6 +134,6 @@ h5mread_from_reshaped <- function(filepath, name, dim, starts, noreduce=FALSE,
                                        as.integer=as.integer,
                                        method=method)
         })
-    do.call(DelayedArray:::simple_abind, c(tmp, list(along=along1)))
+    do.call(S4Arrays:::simple_abind, c(tmp, list(along=along1)))
 }
 
diff --git a/R/h5writeDimnames.R b/R/h5writeDimnames.R
index 3a31afb..68df0d1 100644
--- a/R/h5writeDimnames.R
+++ b/R/h5writeDimnames.R
@@ -233,7 +233,7 @@ h5readDimnames <- function(filepath, name, as.character=FALSE)
                    ## explicitly drop the "dim" attribute.
                    as.character(dn)
                } else {
-                   DelayedArray:::set_dim(dn, NULL)
+                   S4Arrays:::set_dim(dn, NULL)
                }
            })
 }
diff --git a/debian/changelog b/debian/changelog
index 883e643..9004be2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+r-bioc-hdf5array (1.28.1-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Tue, 23 May 2023 09:58:31 -0000
+
 r-bioc-hdf5array (1.26.0-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/use_debian_packaged_libhdf5.patch b/debian/patches/use_debian_packaged_libhdf5.patch
index 4283512..48ecb65 100644
--- a/debian/patches/use_debian_packaged_libhdf5.patch
+++ b/debian/patches/use_debian_packaged_libhdf5.patch
@@ -3,9 +3,11 @@ Last-Update: Wed, 09 Sep 2020 15:28:06 +0200
 Description: Use Debian packaged libhdf5
 Forwarded: No
 
---- a/src/Makevars
-+++ b/src/Makevars
-@@ -17,10 +17,8 @@
+Index: r-bioc-hdf5array.git/src/Makevars
+===================================================================
+--- r-bioc-hdf5array.git.orig/src/Makevars
++++ r-bioc-hdf5array.git/src/Makevars
+@@ -17,10 +17,8 @@ OBJECTS = \
      h5summarize.o \
      R_init_HDF5Array.o
  
diff --git a/man/H5SparseMatrixSeed-class.Rd b/man/H5SparseMatrixSeed-class.Rd
index a473086..79072e5 100644
--- a/man/H5SparseMatrixSeed-class.Rd
+++ b/man/H5SparseMatrixSeed-class.Rd
@@ -106,11 +106,11 @@ H5SparseMatrixSeed(filepath, group, subdata=NULL)
     An H5SparseMatrixSeed derivative.
   }
   \item{index}{
-    See \code{?\link[DelayedArray]{extract_array}} in the \pkg{DelayedArray}
+    See \code{?\link[S4Arrays]{extract_array}} in the \pkg{S4Arrays}
     package.
   }
   \item{viewport}{
-    See \code{?\link[DelayedArray]{read_block}} in the \pkg{DelayedArray}
+    See \code{?\link[S4Arrays]{read_block}} in the \pkg{S4Arrays}
     package.
   }
   \item{j}{
@@ -140,7 +140,7 @@ H5SparseMatrixSeed(filepath, group, subdata=NULL)
     \item \code{chunkdim()}, \code{extract_array()},
           \code{extract_sparse_array()}, \code{read_sparse_block()},
           \code{is_sparse()}: These generics are defined and documented
-          in the \pkg{DelayedArrray} package.
+          in the \pkg{DelayedArray} package.
     \item \code{sparsity()}: Returns the number of zero-valued matrix elements
           in the object divided by its total number of elements (a.k.a. its
           length).
diff --git a/man/HDF5ArraySeed-class.Rd b/man/HDF5ArraySeed-class.Rd
index 30707b3..25f1779 100644
--- a/man/HDF5ArraySeed-class.Rd
+++ b/man/HDF5ArraySeed-class.Rd
@@ -74,7 +74,7 @@ HDF5ArraySeed(filepath, name, as.sparse=FALSE, type=NA)
     For the \code{is_sparse()} setter: \code{TRUE} or \code{FALSE}.
   }
   \item{index}{
-    See \code{?\link[DelayedArray]{extract_array}} in the \pkg{DelayedArray}
+    See \code{?\link[S4Arrays]{extract_array}} in the \pkg{S4Arrays}
     package.
   }
 }
@@ -92,9 +92,13 @@ HDF5ArraySeed(filepath, name, as.sparse=FALSE, type=NA)
     \item \code{path()}: Returns the path to the HDF5 file where the dataset
           is located.
     \item \code{dim()}, \code{dimnames()}.
-    \item \code{type()}, \code{is_sparse()}, \code{chunkdim()},
-          \code{extract_array()}, \code{extract_sparse_array()}: These generics
-          are defined and documented in the \pkg{DelayedArrray} package.
+    \item \code{type()}, \code{extract_array()}, \code{is_sparse()},
+          \code{extract_sparse_array()}, \code{chunkdim()}:
+          These generics are defined and documented in other packages e.g.
+          in \pkg{S4Arrays} for \code{\link[S4Arrays]{extract_array}()}
+          and \code{\link[S4Arrays]{is_sparse}()}, and in \pkg{DelayedArray}
+          for \code{\link[DelayedArray]{extract_sparse_array}()} and
+          \code{\link[DelayedArray]{chunkdim}()}.
   }
 }
 
@@ -120,6 +124,14 @@ HDF5ArraySeed(filepath, name, as.sparse=FALSE, type=NA)
   \itemize{
     \item \link{HDF5Array} objects.
 
+    \item \code{\link[S4Arrays]{type}}, \code{\link[S4Arrays]{extract_array}},
+          and \code{\link[S4Arrays]{is_sparse}}, in the the \pkg{S4Arrays}
+          package.
+
+    \item \code{\link[DelayedArray]{extract_sparse_array}} and
+          \code{\link[DelayedArray]{chunkdim}} in the \pkg{DelayedArray}
+          package.
+
     \item \code{\link{h5ls}} to list the content of an HDF5 file.
   }
 }
diff --git a/man/h5mread.Rd b/man/h5mread.Rd
index 7451228..656f7b5 100644
--- a/man/h5mread.Rd
+++ b/man/h5mread.Rd
@@ -63,7 +63,7 @@ get_h5mread_returned_type(filepath, name, as.integer=FALSE)
     list element indicates a single position selection along the corresponding
     dimension. Note that in this case the \code{starts} argument is
     equivalent to the \code{index} argument of \code{\link[rhdf5]{h5read}}
-    and \code{\link[DelayedArray]{extract_array}} (with the caveat that
+    and \code{\link[S4Arrays]{extract_array}} (with the caveat that
     \code{\link[rhdf5]{h5read}} doesn't accept empty selections).
 
     Finally note that when \code{counts} is not \code{NULL} then the
@@ -109,7 +109,7 @@ get_h5mread_returned_type(filepath, name, as.integer=FALSE)
 
     \item \code{\link[rhdf5]{h5read}} in the \pkg{rhdf5} package.
 
-    \item \code{\link[DelayedArray]{extract_array}} in the \pkg{DelayedArray}
+    \item \code{\link[S4Arrays]{extract_array}} in the \pkg{S4Arrays}
           package.
 
     \item The \code{\link[TENxBrainData]{TENxBrainData}} dataset (in the
diff --git a/src/H5DSetDescriptor.c b/src/H5DSetDescriptor.c
index 89d32e9..e7e1e4e 100644
--- a/src/H5DSetDescriptor.c
+++ b/src/H5DSetDescriptor.c
@@ -153,7 +153,8 @@ static const char *predef_native_type_as_string(hid_t native_type_id)
 
 	/* Should never happen if predef_native_type_as_string()
 	   is kept in sync with map_native_type_to_predef_type(). */
-	sprintf(s, "unknown native type (%lld)", (long long) native_type_id);
+	snprintf(s, sizeof(s), "unknown native type (%lld)",
+                               (long long) native_type_id);
 	return s;
 }
 
@@ -197,7 +198,7 @@ static const char *H5class2str(H5T_class_t h5class)
 	   in switch. */
 	    default: break;
 	}
-	sprintf(s, "unknown class (%d)", h5class);
+	snprintf(s, sizeof(s), "unknown class (%d)", h5class);
 	return s;
 }
 
@@ -214,7 +215,7 @@ static const char *H5layout2str(H5D_layout_t H5layout)
 	   in switch. */
 	    default: break;
 	}
-	sprintf(s, "unknown layout (%d)", H5layout);
+	snprintf(s, sizeof(s), "unknown layout (%d)", H5layout);
 	return s;
 }
 
diff --git a/src/H5File.c b/src/H5File.c
index 9eb712d..2a39cd6 100644
--- a/src/H5File.c
+++ b/src/H5File.c
@@ -27,7 +27,7 @@ static const char *hid_to_string(hid_t hid)
 {
 	static char buf[21];
 
-	sprintf(buf, "%lld", (long long) hid);
+	snprintf(buf, sizeof(buf), "%lld", (long long) hid);
 	return buf;
 }
 

More details

Full run details

Historical runs