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

NaN values when computing the kernel lead to inability to find t-optimal MATLAB. #206

Open
ElenaMerinoTejero opened this issue Oct 7, 2022 · 0 comments

Comments

@ElenaMerinoTejero
Copy link

Hi,

I want to impute a data set X (9082 genes x433 cells) using MAGIC in Matlab.

When running run.MAGIC(X) it results in the following error:

Unrecognized function or variable 't_opt'.
Error in compute_optimal_t (line 62)
disp(['optimal t = ' num2str(t_opt)]);

When running MAGIC with a particular t imput:

[pc_imputed, U, pc] = run_magic_original(X', 'k',30,'a',10,'t',20,'npca',20).

The resulting pc_imputed is a matrix full of NaNs and P and K have some NaNs too. I think this is due to some zero values when calculating kdist and epsilon in the following manner:

[idx, kdist]=knnsearch(data_pc,data_pc,'k',k_knn,'Distance',distfun);
epsilon=kdist(:,k+1);

Why are there NaNs in the pc_imputed and is there any suggestion you can give to find suitable pc_imputed for my data set?

Thanks in advance 🙏.

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

1 participant