-
Notifications
You must be signed in to change notification settings - Fork 3
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
Constructing spatial neighborhood with custom parameters #126
Conversation
I think this should rather be multiple scripts, one per methodology; radius, delaunay, ... rather than having all as one script just because squidpy decided to have them represented by a single function. This would make tracking differently generated neighborhoods easier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment for all cases;
I think arguments such as radius, n_neighbors should be moved to the config rather than in the CLI
Are the spatial_distances matrices actually needed at all? |
Just wondering if it is still necessary to separate them into different files based on different functions since the parameters could be set up all at once in the config file now. |
I will then remove them from the script. |
I would still keep it separate because it is easier to track that you have e.g. neighbors defined using a radius if there is a specific script for that rather than having to parse the json file and then looking into the logic that is actually implemented when using these parameters |
parameters = json.load(f) | ||
|
||
n_neighs = data["n_neighs"] | ||
f.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ContextManager will automatically close the file. This line is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in all scripts
You should also use a config file for the other scripts to pass radius etc. Make sure that the scripts and the yaml files have the same name so it is clear which ones belong together |
Config file added |
I noticed that in #154 spatial distance metric is needed as input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configs should be per script not for all at the same time. Laso I think now that we expanded this we should move each script with its yaml and config into a subdirectory. Should be an easy change. Maake sure to put each config also into a subdirectory called config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delaunay: false. I think for this one we won't need a config at all. And delaunay should always be true
No description provided.