-
Notifications
You must be signed in to change notification settings - Fork 585
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
Cannot read loom file created in Seurat3 (column index exceeds matrix dimensions) #598
Comments
I also meet the same issue today. It seems that the problem is caused by col_graphs group in the loom file. If you remove Seurat3 graph slot and write out to loom. It would be done |
Hi, thanks for your answer. How do you remove a graph slot from a Seurat object? When I try, I get this error:
|
Hi, |
Thank you very much. I could remove the graph slot and this error is gone, but now I have a new error:
|
It seems that something wrong happened for the Seurat meta slot. The code told that this error happened when AnnData tried to construct obs attribute. |
I am getting the same error.
|
Hi @ahy1221, my file is here: https://drive.google.com/open?id=1cUYk_ImKtAv60lfbIaLHm3mmGLUupMXt Thanks... |
@cakirb |
Hi, that's interesting. I'm also using scanpy v1.4.1. Which anndata and loompy versions are you using? |
Hi @cakirb have you figured out the solution for this problem, by any chance? |
Hi @PedroRaposo, unfortunately not. My colleague told me that this issue could be related to the versions of scanpy, anndata or loompy. I have the same scanpy version with the successful test above. Maybe, it is related to loompy and anndata version but I'm not sure... |
Hi, @cakirb EDITED: I am encountering the same problem as yours
|
I have tried using latest version of anndata(0.16.9), still got the same error. |
My too. I had loompy version 2.0.17 and now I installed the version 2.0.16 and still I'm getting the same issue. |
Hi, @ahy1221 |
I'd love to help close this issue, but it's difficult for us to debug without a complete reproducible example. Could someone who's been experiencing this please provide a complete script which reproduces this issue? This script should include loading data into Seurat, whatever minimal set of intermediate steps are necessary, then writing out the file which scanpy fails to read. Ideally, the data is computationally generated, something as simple as If someone who is having this issue can please provide an example like this, we'll be able to help much faster. |
For me, python's modules versions was the problem. Now it works (for your information, you can see this thread scverse/anndata#152). |
@PedroRaposo Updating all these packages works! Thanks! |
It works for me too!! So I can close the issue. |
pbmc@graphs <- list() |
When I try to read loom file created bu seurat through sc.read_loom or scv.read or loompy.connect |
After removing the graphs and loading the loom file into scanpy with the now empty graphs slot, is there a way to manually add it back in? For example, before removing the graphs attribute, I call as.matrix() and saved it as a CSV (probably a better way to do this to maintain the sparse property). I can now read this CSV back into Python (e.g. with pandas), but what is the correct way to reload it into the resulting AnnData object? |
This issue has been mentioned on Scanpy. There might be relevant details there: https://scanpy.discourse.group/t/importing-graphs-from-seurat/249/1 |
I have a loom file created from Seurat object by using as.loom function in Seurat3. After closing the file with $close.all(), I'm trying to read loom file by read_loom function in scanpy, but I have this error:
I can read loom file with loompy seamlessly. They are in the latest versions (Seurat_3.0.0.9000, loomR_0.2.1.9000, scanpy==1.4).
Am I doing wrong by typing that reading code below?:
a = scanpy.read_loom('brain10x.loom', sparse=True)
Thanks...
The text was updated successfully, but these errors were encountered: