Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There can only be 5 groups in the loom file: ... #55

Open
tanpuekai opened this issue Nov 17, 2019 · 5 comments
Open

There can only be 5 groups in the loom file: ... #55

tanpuekai opened this issue Nov 17, 2019 · 5 comments

Comments

@tanpuekai
Copy link

Hi developer,

Connecting to loom file output by RNA velocity ('https://github.com/velocyto-team/velocyto.py') produced this error:

lfile <- connect(filename = "mydata.loom")
Error in validateLoom(object = self) : 
  There can only be 5 groups in the loom file: 'row_attrs', 'col_attrs', 'layers', 'row_graphs', 'col_graphs'

what might be the problem?

Best
Chan

@aguang
Copy link

aguang commented Dec 5, 2019

You need to add the mode='r+' argument, as in

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

@johnmous
Copy link

johnmous commented Dec 6, 2019

Have the same issue, the above suggestion didn't solve it for me

@ChaDuss
Copy link

ChaDuss commented Jan 3, 2020

Hello loomR team; i have the same issue :
I want to run Velocyto in R and to do that i have created a loom file with the from fq to loom command with loompy3
Unfortunately, when i use the command :
lfile <- connect(filename = "file.loom", mode = "r+")
it returns the following error : Error in validateLoom(object = self) :
There can only be 5 groups in the loom file: 'row_attrs', 'col_attrs', 'layers', 'row_graphs', 'col_graphs'

when i use this other command :
ldat <- read.loom.matrices("file.loom")
it returns the following error : Error in [[.H5File(f, "row_attrs/Gene") :
An object with name row_attrs/Gene does not exist in this group

So can you please tell me how is it possible to run velocyto.r after creating a loom file with loompy3 ?

Thank you for your help.

Best

Charles

@nathancfox
Copy link

This is probably an "out-of-date" issue. Loom 3.0 was released as an updated file specification in Sept 2019. One of the changes moved global attributes from the HDF5 root attributes to a root HDF5 group called 'attrs'. This means that loom files in agreement with the current spec violate the 5 root groups rule. I believe loomR was last updated in 2018, so it certainly has missed this. Details are at the loom website in these two sections: Global attributes and Backwards compatibility

Solution: You can turn off the validation with connect(filename, mode = "r+", skip.validate = TRUE). If you still want to make sure you're dealing with a valid loom file, I suggest manually checking. The file specification is very simple and would only take a couple of minutes to verify by hand using a non-loom-specific HDF5 library such as hdf5r or h5py

@yfstkchy
Copy link

yfstkchy commented Feb 9, 2022

I receive the same error when I try to combine the loom files together. No option got skip.validate= TURE. I can read the loom files using this approach, but not combine them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants