Skip to content

Commit 5a2f99b

Browse files
lazappircannoodLouiseDck
authored
Switch to {rhdf5} for HDF5 reading/writing (#283)
Co-authored-by: Robrecht Cannoodt <rcannood@gmail.com> Co-authored-by: LouiseDck <louise.deconinck@gmail.com>
1 parent ff0a190 commit 5a2f99b

29 files changed

Lines changed: 880 additions & 712 deletions

.github/workflows/R-CMD-check.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
- {os: windows-latest, r: 'release'}
2626
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
2727
- {os: ubuntu-latest, r: 'release'}
28-
- {os: ubuntu-latest, r: 'oldrel-1'}
28+
# Fails due to #248, resolved with Bioconductor 3.22 release (October 2025)
29+
# - {os: ubuntu-latest, r: 'oldrel-1'}
2930

3031
env:
3132
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -34,6 +35,12 @@ jobs:
3435
steps:
3536
- uses: actions/checkout@v4
3637

38+
- name: Install Linux dependencies
39+
if: runner.os == 'Linux'
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get -y install libsz2 libaec-dev
43+
3744
- uses: r-lib/actions/setup-pandoc@v2
3845

3946
- uses: r-lib/actions/setup-r@v2
@@ -47,6 +54,22 @@ jobs:
4754
extra-packages: any::rcmdcheck
4855
needs: check
4956

57+
# Avoid a caching issue where {rhdf5} was not restored properly
58+
- name: Reinstall {rhdf5} on Linux
59+
if: runner.os == 'Linux'
60+
run: |
61+
BiocManager::install(c("rhdf5", "Rhdf5lib"), force = TRUE)
62+
shell: Rscript {0}
63+
64+
- name: Check {rhdf5} availability
65+
run: |
66+
if (requireNamespace("rhdf5")) {
67+
cat(as.character(packageVersion("rhdf5")))
68+
} else {
69+
stop("rhdf5 not found")
70+
}
71+
shell: Rscript {0}
72+
5073
- name: Install h5diff
5174
run: |
5275
if [ "$RUNNER_OS" == "Linux" ]; then

.github/workflows/pkgdown.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v4
2525

26+
- name: Install Linux dependencies
27+
if: runner.os == 'Linux'
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get -y install libsz2
31+
2632
- uses: r-lib/actions/setup-pandoc@v2
2733

2834
- uses: r-lib/actions/setup-r@v2
@@ -34,6 +40,18 @@ jobs:
3440
extra-packages: local::.
3541
needs: website
3642

43+
# Avoid a caching issue where {rhdf5} was not restored properly
44+
- name: Reinstall {rhdf5} and check availability
45+
run: |
46+
BiocManager::install(c("rhdf5", "Rhdf5lib"), force = TRUE)
47+
48+
if (requireNamespace("rhdf5")) {
49+
cat(as.character(packageVersion("rhdf5")))
50+
} else {
51+
stop("rhdf5 not found")
52+
}
53+
shell: Rscript {0}
54+
3755
- name: Build site
3856
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
3957
shell: Rscript {0}

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: anndataR
22
Title: AnnData interoperability in R
3-
Version: 0.1.0.9009
3+
Version: 0.1.0.9010
44
Authors@R: c(
55
person("Robrecht", "Cannoodt", , "robrecht@data-intuitive.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-3641-729X", github = "rcannood")),
@@ -45,10 +45,10 @@ Imports:
4545
Suggests:
4646
anndata,
4747
BiocStyle,
48-
hdf5r (>= 1.3.11),
4948
knitr,
5049
processx,
5150
reticulate (>= 1.41.1),
51+
rhdf5,
5252
rmarkdown,
5353
S4Vectors,
5454
Seurat,

NEWS.md

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,46 @@
1-
# anndataR 0.1.0.9009
1+
# anndataR devel
22

3-
- Fix execution of roundtrip tests
4-
-
5-
# anndataR 0.1.0.9008
3+
## anndataR 0.1.0.9010
4+
5+
- Switch HDF5 back end from **{hdf5r}** to **{rhdf5}** (PR #283, Fixes #272, #175, #299)
6+
- Includes improved compatibility with H5AD files written by Python **anndata**
7+
- Improvements to rountrip testing (PR #283)
8+
9+
## anndataR 0.1.0.9009
10+
11+
- Fix execution of roundtrip tests (PR #293)
12+
13+
## anndataR 0.1.0.9008
614

7-
- Add Bioconductor installation instructions in preparation of submission
15+
- Add Bioconductor installation instructions in preparation of submission (PR #297)
816

9-
# anndataR 0.1.0.9007
17+
## anndataR 0.1.0.9007
1018

11-
- Refactor superfluous for loops
19+
- Refactor superfluous for loops (PR #298)
1220
-
13-
# anndataR 0.1.0.9006
21+
## anndataR 0.1.0.9006
1422

15-
- ignore `development_status.Rmd` vignette when building package
23+
- Ignore `development_status.Rmd` vignette when building package (PR #296)
1624

17-
# anndataR 0.1.0.9005
25+
## anndataR 0.1.0.9005
1826

19-
- Bypass requiring a `counts` or `data` layer during `Seurat` conversion
27+
- Bypass requiring a `counts` or `data` layer during `Seurat` conversion (PR #284)
2028

21-
# anndataR 0.1.0.9004
29+
## anndataR 0.1.0.9004
2230

23-
- Use accessors instead of direct slot access where possible
31+
- Use accessors instead of direct slot access where possible (PR #291)
2432

25-
# anndataR 0.1.0.9003
33+
## anndataR 0.1.0.9003
2634

27-
- Simplify & update vignetttes
35+
- Simplify and update vignettes (PR #282)
2836

29-
# anndataR 0.1.0.9002
37+
## anndataR 0.1.0.9002
3038

31-
- remove `anndataR.Rproj` file from repository
39+
- Remove `anndataR.Rproj` file from repository (PR #292)
3240

33-
# anndataR 0.1.0.9001
41+
## anndataR 0.1.0.9001
3442

35-
- change uses of `sapply` to `vapply`
43+
- Change uses of `sapply()` to `vapply()` (PR #294)
3644

3745
# anndataR 0.1.0 (inital release candidate)
3846

0 commit comments

Comments
 (0)