Skip to content

Commit

Permalink
Use the latest rhdf5 to avoid NA-related warnings on read.
Browse files Browse the repository at this point in the history
No more need for a blanket suppressMessages to keep H5Dread quiet.
  • Loading branch information
LTLA committed Mar 13, 2024
1 parent 052e618 commit 617efbc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: alabaster.base
Title: Save Bioconductor Objects To File
Version: 1.3.22
Date: 2024-03-08
Version: 1.3.23
Date: 2024-03-13
Authors@R: person("Aaron", "Lun", role=c("aut", "cre"), email="[email protected]")
License: MIT + file LICENSE
Description:
Expand All @@ -14,7 +14,7 @@ Imports:
methods,
utils,
S4Vectors,
rhdf5 (>= 2.47.1),
rhdf5 (>= 2.47.6),
jsonlite,
jsonvalidate,
Rcpp
Expand Down
2 changes: 1 addition & 1 deletion R/hdf5.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ h5_read_vector <- function(handle, name, check=FALSE, default=NULL, bit64convers

dhandle <- H5Dopen(handle, name)
on.exit(H5Dclose(dhandle), add=TRUE, after=FALSE)
output <- suppressMessages(H5Dread(dhandle, bit64conversion=bit64conversion, drop=TRUE))
output <- H5Dread(dhandle, bit64conversion=bit64conversion, drop=TRUE)

if (is.raw(output)) {
storage.mode(output) <- "integer"
Expand Down
2 changes: 1 addition & 1 deletion R/readAtomicVector.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ readAtomicVector <- function(path, metadata, ...) {

vhandle <- H5Dopen(ghandle, "values")
on.exit(H5Dclose(vhandle), add=TRUE, after=FALSE)
contents <- suppressMessages(H5Dread(vhandle, drop=TRUE))
contents <- H5Dread(vhandle, drop=TRUE)
missing.placeholder <- h5_read_attribute(vhandle, missingPlaceholderName, check=TRUE, default=NULL)

contents <- h5_cast(contents, expected.type=expected.type, missing.placeholder=missing.placeholder)
Expand Down
2 changes: 1 addition & 1 deletion R/readBaseFactor.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ readBaseFactor <- function(path, metadata, ...) {
.simple_read_codes <- function(handle, name="codes") {
chandle <- H5Dopen(handle, name)
on.exit(H5Dclose(chandle), add=TRUE, after=FALSE)
codes <- suppressMessages(H5Dread(chandle, drop=TRUE))
codes <- H5Dread(chandle, drop=TRUE)
missing.placeholder <- h5_read_attribute(chandle, missingPlaceholderName, check=TRUE, default=NULL)
codes <- h5_cast(codes, expected.type="integer", missing.placeholder=missing.placeholder)
codes + 1L
Expand Down
2 changes: 1 addition & 1 deletion R/readDataFrame.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ readDataFrame <- function(path, metadata, ...) {
columns[[col]] <- local({
colhandle <- H5Dopen(gdhandle, expected)
on.exit(H5Dclose(colhandle), add=TRUE, after=FALSE)
contents <- suppressMessages(H5Dread(colhandle, drop=TRUE))
contents <- H5Dread(colhandle, drop=TRUE)

missing.placeholder <- h5_read_attribute(colhandle, missingPlaceholderName, check=TRUE, default=NULL)
contents <- h5_cast(contents, expected.type=type, missing.placeholder=missing.placeholder)
Expand Down

0 comments on commit 617efbc

Please sign in to comment.