Closed Artur-man closed 1 month ago
Ah apologies for the confusion, just realized that this function exists write_matrix_hdf5
.
rhdf5::h5createFile("data/C02935B1_bin20_bpcells.h5")
rhdf5::h5createGroup("data/C02935B1_bin20_bpcells.h5", group = "assay")
datax_bpcells <- BPCells::write_matrix_hdf5(mat = mat,
path ="data/C02935B1_bin20_bpcells.h5",
group = "assay",
overwrite = TRUE)
Hi @Artur-man, if you want to read BPCells data from other programs, I'd also suggest you set compress=FALSE
on write_matrix_hdf5
, since otherwise the data will be written in a bitpacked format that most other libraries probably can't handle. Alternatively, you can use write_matrix_10x_hdf5
or write_matrix_anndata_hdf5
to write in the 10x and AnnData hdf5 formats respectively.
Hi,
Amazing package and C++ library! I was looking into the ondisk storage of the BPcells matrices. As I understand the Highfive library is used here to read/write from
hdf5
files.I wanted to see if I can open files under the designated
dir
. However, I couldn't open files under the matrix folder with other R based packages to manipulate h5 files such asrhdf5
andhdf5r
. I am new tohdf5
and would love any input here.