-
Notifications
You must be signed in to change notification settings - Fork 914
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
Error loading h5ad file from ScanPy. #1689
Comments
Have you solved this problem? |
I've implemented a workaround that converts the data into another format. I loaded the data in ScanPy and exported to a loom file, which I'm loading with loomR. However, I'm still interested in what causes this error and if the h5ad file can be read directly. |
Hi Dan, Sorry for the delay. This dataset seems a bit off, I don't think this was made in the standard cells-as-columns, genes-as-rows format. It has a shape listed where the H5AD file was made from a matrix that had 63,530 rows (should be genes) and 30,677 columns (should be cells). I would double check to ensure that the matrix is as you'd expect. If the data seem intact, you can either remove the |
would you please tell me how to export to a loom file ? I have loaded the data in Scanpy. |
sorry to bother you, in scanpy I convert to loom file,but I still cannot load in Seurat,how do you solve that? |
Sorry @qi825 I must have missed this. I must have lost my script for exporting/importing as a loom file, however I still have this which exports as a mtx file.
...which you can then read into R with
Hope this helps @kzxkzx. |
Hi, |
Hi, Here is my code: After that, I succeed in loading H5AD file into R by 'SeuratDisk'! I wish my experiences can help other people. Hanwen |
Hi Hanwen, I just tried your solution and I am getting the following error: Any thoughts? Thanks! |
adata.T.T.write_h5ad(dat_dir + "/brie_quant_cell_trans.h5ad") solve my problem. Transposing once will transpose the counts matrix, so transposing twice will work. |
@JulieBaker1 -- Can you help me explain why we need to do transpose twice? I downgraded anndata module and rewrote the h5ad object without any |
I'm trying to load a dataset into R (Wagner et al. 2018) that has been exported from ScanPy.
The exported file is an AnnData object in the h5ad file format, so I've tried to run the ReadH5AD Seurat function, but I get the following error:
What does this mean? Is there something I can do to edit the file in python so that it can be imported into R and used with Seurat?
SessionInfo:
The text was updated successfully, but these errors were encountered: