Xiaoyu2425 / mEQO

15 stars 1 forks source link

Error in eval(bysub, parent.frame(), parent.frame()) : object 'taxa' not found #6

Open wdp9966 opened 4 months ago

wdp9966 commented 4 months ago

Thanks for your useful tool. I want to predict the functional group with discrete case. When I run EQO_ga("d",Microbiome,trait_d,maxIter = 100), propoer results are obtained. But when run the command CAN("ga_d",Microbiome,trait_d,maxIter = 100), I get the following error: [1] "Running cross-validation 1 out of 20" [1] "Running cross-validation 2 out of 20" [1] "Running cross-validation 3 out of 20" [1] "Running cross-validation 4 out of 20" [1] "Running cross-validation 5 out of 20" [1] "Running cross-validation 6 out of 20" [1] "Running cross-validation 7 out of 20" [1] "Running cross-validation 8 out of 20" [1] "Running cross-validation 9 out of 20" [1] "Running cross-validation 10 out of 20" [1] "Running cross-validation 11 out of 20" [1] "Running cross-validation 12 out of 20" [1] "Running cross-validation 13 out of 20" [1] "Running cross-validation 14 out of 20" [1] "Running cross-validation 15 out of 20" [1] "Running cross-validation 16 out of 20" [1] "Running cross-validation 17 out of 20" [1] "Running cross-validation 18 out of 20" [1] "Running cross-validation 19 out of 20" [1] "Running cross-validation 20 out of 20" Error in eval(bysub, parent.frame(), parent.frame()) : object 'taxa' not found

Why the CAN command failed? I'm looking forward for your reply. Thanks

Xiaoyu2425 commented 4 months ago

Hi, thanks for your message! It seems that you are trying CAN for a discrete variable. Unfortunately the current version of CAN does not support a discrete case (you can see no option for "ga_d" in its help page). This is because for the discrete case it's not straightforward to distinguish a best group from its complimentary group across different iterations (i.e., G and 1-G will both maximize R2). Perhaps you could try running cross-validation multiple times manually, and then figuring out the most robust co-occurring patterns. Sorry for the inconvenience, and we'll update the package when we figure out a better solution to this.

wdp9966 commented 4 months ago

Thanks for your constructive suggestion. Maybe I can use the "ga_u" mode to identify the core microbiome in specific environments? Perhaps I have misunderstood this method. For a given discrete variable, the possible functional group should exhibits stable abundances? But I am interesed in identifying the unique group under each condition, and it seems that the "ga_u" mode may be suitable for my purpose. Thanks again for your valuable method.