mojaveazure / loomR

An R-based interface for loom files
62 stars 16 forks source link

can't connect the .loom file created through loompy #3

Open anilbey opened 6 years ago

anilbey commented 6 years ago

Hi, I am having this exception when I try to connect a .loom file.

> lfile <- connect(filename = "melanoma_S2.loom", mode = "r")

 # Connect to the loom file in read/write mode

lfile <- connect(filename = "melanoma_S2.loom", mode = "r")

Error in h5attr(x = self, which = "chunks"): Attribute does not exist
Traceback:

1. connect(filename = "melanoma_S2.loom", mode = "r")
2. loom$new(filename = filename, mode = mode, skip.validate = skip.validate)
3. .subset2(public_bind_env, "initialize")(...)
4. h5attr(x = self, which = "chunks")
5. stop("Attribute does not exist")

To repeat the error you can basically create a simple .loom file as described in the loompy documentation (http://linnarssonlab.org/loompy/apiwalkthrough/index.html#creating-and-connecting) then you can try to connect it with the command below

> lfile <- connect(filename = "melanoma_S2.loom", mode = "r")

Vice-versa (create from LoomR then connect from LoomPy) is also not possible.

If you solve this issue, could you provide a simple example that creates a .loom file from LoomPy & connects from LoomR and vice-versa, please?

Thanks in advance, anilbey

mojaveazure commented 6 years ago

This issue with the chunks attribute should be fixed in the development version of loomR. However, I haven't had the issue where I cannot load a loomR loom file with loompy. What issue are you having there?

Install the development version with

devtools::install_github(repo = 'mojaveazure/loomR', ref = 'develop')