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

Generating neighbors matrix #1182

Closed
mhaist94 opened this issue Feb 14, 2025 · 3 comments
Closed

Generating neighbors matrix #1182

mhaist94 opened this issue Feb 14, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@mhaist94
Copy link

Hi all,

thanks a lot for providing this awesome package. I ran into an issue when trying the generate the neighbors matrix using the create_neighborhood_matrix function (see below, the error message was referring to a missing or mismatched IO backend which i couldnt find in the doc so far). Loading of ark packages and importing the functions seemed to work fine. The dataframe i use has celltype label called "cell_types_mediumres", a unique region label called unique_region_num and a cellid called UID.

Image Image

I wondered whether you ran into this issue before or whether you might have any advice on how to solve this error? I am running on a MacBook Pro M1 chip design. Thanks all!

@mhaist94 mhaist94 added the bug Something isn't working label Feb 14, 2025
@ngreenwald
Copy link
Member

@alex-l-kong could you look into this when you have a chance?

@alex-l-kong
Copy link
Contributor

alex-l-kong commented Feb 19, 2025

@mhaist94 this issue usually arises when you try to load in a non-existent file or a non-.xr file. The first thing to check is to see that you're pointing to an existing dist_mat_dir. See what that variable in the notebook is set to, then navigate to that path on your computer. If it doesn't exist, or doesn't contain any .xr files, you'll need to run the distance matrix generation process first (a call to spatial_analysis_utils.calc_dist_matrix). The neighborhood analysis notebook should automatically generate this for you if you haven't run it yet.

@mhaist94
Copy link
Author

Beautiful! Thank you Alex - really appreciate it - had to run the calc_dist_matrix function first and then it went through without issues. Best of thanks again!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants