SydneyBioX / eNODAL

eNODAL package
1 stars 0 forks source link

Error in if (max(D2) > 0) { : missing value where TRUE/FALSE needed #1

Open yulijia opened 11 months ago

yulijia commented 11 months ago

Hi Xiangnan,

I got an error when I ran the eNODAL model.

> eNODAL_obj = eNODAL_build(Z = data.frame(Z), Meta1 = Meta1, Meta2 = Meta2, sig_test = "lm", test_func = "lm")
> eNODAL_obj = runeNODAL(eNODAL_obj)
Error in if (max(D2) > 0) { : missing value where TRUE/FALSE needed
In addition: Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
  restarting interrupted promise evaluation

It seems the error happened in the clustering step. https://github.com/SydneyBioX/eNODAL/blob/1da05c66b33e08ee32ef8a67c30305eeffab2aff/R/Stage2.R#L260

Can I know if I can avoid this error anyway? And can I run any clustering algorithms instead of the runSubclust ? Is there any step-by-step procedure that I can use?

yulijia commented 11 months ago

The reason for this error is that I cannot create D2 correctly. I am not sure of the underlying reason, but my V_exp contains NA values, which is unusual. https://github.com/SydneyBioX/eNODAL/blob/1da05c66b33e08ee32ef8a67c30305eeffab2aff/R/Stage2.R#L161