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

missing dict in morphofield_gp #264

Open
Secretloong opened this issue Sep 12, 2024 · 1 comment
Open

missing dict in morphofield_gp #264

Secretloong opened this issue Sep 12, 2024 · 1 comment

Comments

@Secretloong
Copy link

when run morphofield_gp, I found there is no norm_dict and kernel_dict in morpho_class.py

File ~/miniconda3/envs/spateo/lib/python3.9/site-packages/spateo/tdr/morphometrics/morphofield/gaussian_process.py:102, in _gp_velocity(X, vf_dict)
    100 def _gp_velocity(X: np.ndarray, vf_dict: dict) -> np.ndarray:
    101     # pre_scale = vf_dict["pre_norm_scale"]
--> 102     norm_x = (X - vf_dict["norm_dict"]["mean_transformed"]) / vf_dict["norm_dict"]["scale_transformed"]
    103     if vf_dict["kernel_dict"]["dist"] == "cdist":
    104         quary_kernel = _con_K(norm_x, vf_dict["inducing_variables"], vf_dict["beta"])

KeyError: 'norm_dict'
File ~/miniconda3/envs/spateo_updated/lib/python3.9/site-packages/spateo/tdr/morphometrics/morphofield/gaussian_process.py:103, in _gp_velocity(X, vf_dict)
    100 def _gp_velocity(X: np.ndarray, vf_dict: dict) -> np.ndarray:
    101     # pre_scale = vf_dict["pre_norm_scale"]
    102     norm_x = (X - vf_dict["norm_dict"]["mean_transformed"]) / vf_dict["norm_dict"]["scale_transformed"]
--> 103     if vf_dict["kernel_dict"]["dist"] == "cdist":
    104         quary_kernel = _con_K(norm_x, vf_dict["inducing_variables"], vf_dict["beta"])
    105     elif vf_dict["kernel_dict"]["dist"] == "geodist":

KeyError: 'kernel_dict'
@Sichao25
Copy link
Contributor

Hi, thanks for raising this issue. I feel like those two dictionaries should be added in morpho_align_sparse() in alignment/morpho_alignment.py, which performs the continuous alignment of spatial transcriptomic coordinates.

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