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

Problems in loading the human heart original dataset into R #20

Open
cristalliao opened this issue Aug 12, 2023 · 3 comments
Open

Problems in loading the human heart original dataset into R #20

cristalliao opened this issue Aug 12, 2023 · 3 comments

Comments

@cristalliao
Copy link

cristalliao commented Aug 12, 2023

Dear Professor,

I have encountered some problems in loading the human heart dataset into R. Could you please help me to check what the problem is?

Firstly, I read the original dataset in Python using tutorial code. I treat the "adata_st_list_raw" dataset as the original dataset for each slice 0-8.
Screen Shot 2023-08-12 at 3 09 38 pm

And I find this dataset's type is a list, and each element in this list is the AnnData object
Screen Shot 2023-08-12 at 3 11 00 pm

So I want to save each element in the list as an h5ad file since I want to read them in R:
For example, I want to save slice0 original dataset as h5ad
Screen Shot 2023-08-12 at 3 12 19 pm
I use the code slice_0_raw.write_h5ad('/dski/nobackup/xiaoyinl/STitch3D_analysis_and_dataset/human_dataset_orignal/slice_0_raw.h5ad')
And then in R use the code
Convert("/dski/nobackup/xiaoyinl/STitch3D_analysis_and_dataset/human_dataset_orignal/slice_0_raw.h5ad", dest = "h5seurat", overwrite = F)
But I encountered a very strange error in loading the h5seurat object, it said

"Validating h5Seurat file
Warning: Non-unique features (rownames) present, making uniqueInitializing RNA with data
Adding counts for RNA
Adding scale.data for RNA
Warning: Non-unique features (rownames) present, making uniqueAdding feature-level metadata for RNA
Adding reduction loc_use
Adding cell embeddings for loc_use
Warning: Keys should be one or more alphanumeric characters followed by an underscore, setting key from loc_use_ to locuse_Warning: All keys should be one or more alphanumeric characters followed by an underscore '_', setting key to locuse_Adding miscellaneous information for loc_use
Adding reduction spatial
Adding cell embeddings for spatial
Adding miscellaneous information for spatial
Error in if (!x[[i]]$dims) { : the condition has length > 1"

The main error is "Error in if (!x[[i]]$dims) { : the condition has length > 1"
Screen Shot 2023-08-12 at 3 23 38 pm

Do you encounter the same error as me? Do you have any suggestions to solve this problem? Thanks a lot!

@cristalliao cristalliao changed the title Problems in loading the human heart dataset into R Problems in loading the human heart original dataset into R Aug 12, 2023
@cristalliao
Copy link
Author

I think this error means this h5seurat is too big. Or do I have any other solutions to solve this problem? Thanks a lot!

@gefeiwang
Copy link
Collaborator

Hi Cristal,

This may be caused by some problem in the LoadH5Seurat function. You can load the data csv files (counts, locations, meta information, etc.) directly into R, or use anndata package to read h5ad files in R to run R packages.

Best,
Gefei

@cristalliao
Copy link
Author

cristalliao commented Aug 14, 2023

Dear Professor Gefei,
Thanks a lot! I will try it in another way. Thanks for your help! Very appreciated!

Best regards,
Cristal

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

2 participants