Question: rhdf5 h5ls output differs from Linux to Windows
gravatar for maxime.fortin
7 months ago by
maxime.fortin0 wrote:

Dear Users, I report an issue that I encontered on R using rhdf5 h4ls function. Here is the example :
file_loc <- file.path(tempdir(), "h5ex_d_sofloat.h5")
download.file(url = "",
              destfile = file_loc,mode="wb")


Linux output :
  group name       otype dclass   dim
0     /  DS1 H5I_DATASET  FLOAT  x 32


Windows ouptut :
  group name       otype dclass     dim
0     /  DS1 H5I_DATASET  FLOAT 64 x 32


As you can see, the dim columns has been truncated.​


Here are the session info :
  Windows :
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)


Matrix products: default


  [1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252 LC_NUMERIC=C                 
[5] LC_TIME=French_France.1252   


attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base    


other attached packages:
  [1] assertthat_0.2.0  dplyr_0.7.2       data.table_1.10.4 rhdf5_2.20.0      lubridate_1.6.0 


loaded via a namespace (and not attached):
  [1] Rcpp_0.12.12    R6_2.2.2        magrittr_1.5    rlang_0.1.2     stringi_1.1.5   zlibbioc_1.22.0 bindrcpp_0.2    tools_3.4.1   
[9] stringr_1.2.0   glue_1.1.1      compiler_3.4.1  pkgconfig_2.0.1 bindr_0.1       tibble_1.3.4  


Linux :
  > sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)


  [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C
[3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=fr_FR.UTF-8
[7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C
[9] LC_ADDRESS=C               LC_TELEPHONE=C


attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base


other attached packages:
  [1] rhdf5_2.14.0         BiocInstaller_1.20.3


loaded via a namespace (and not attached):
  [1] zlibbioc_1.16.0 tools_3.2.3




Any idea?
Thanks in advance

ADD COMMENTlink modified 6 months ago by Mike Smith2.7k • written 7 months ago by maxime.fortin0
gravatar for Mike Smith
6 months ago by
Mike Smith2.7k
EMBL Heidelberg / de.NBI
Mike Smith2.7k wrote:

Sorry for the delay in replying to this.  For future reference, on this board it's normally good practice to give the name of the package you're having issue with as one of the tags.  I get notified if there's a post tagged rhdf5 but I don't look out for the individual functions.

I'm don't have a specific reason why the formatting is wrong in the Linux version, but you're using different versions of R and rhdf5 in your comparison.  I suspect there was a change made between the 2.14.0 and 2.20.0 that fixed this problem, and if you use a more recent version on Linux the issue will go away.  Here's my output and sessionInfo running your example and using the current release on Linux Mint:

> h5ls(file_loc)
  group name       otype dclass     dim
0     /  DS1 H5I_DATASET  FLOAT 64 x 32
> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 18.1

Matrix products: default
BLAS: /home/msmith/Applications/R/R-3.4.2/lib/
LAPACK: /home/msmith/Applications/R/R-3.4.2/lib/

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rhdf5_2.22.0

loaded via a namespace (and not attached):
[1] zlibbioc_1.24.0 compiler_3.4.2
ADD COMMENTlink written 6 months ago by Mike Smith2.7k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 122 users visited in the last hour