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

Error when running generate_beta_trend_test_long() function #37

Open
QGaelle opened this issue Mar 7, 2024 · 4 comments
Open

Error when running generate_beta_trend_test_long() function #37

QGaelle opened this issue Mar 7, 2024 · 4 comments
Labels
Bug Fixed This bug has been addressed and resolved in the latest update. bug Something isn't working

Comments

@QGaelle
Copy link

QGaelle commented Mar 7, 2024

Dear Chen Yang,

Thank you for your work and your time in trying to answer all the questions users are aiming at you. I know you are very busy and I know I have already one question pending (issue #35) but I keep moving forward with my microbial analyses and new questions arise.

I am now trying to quantify temporal changes in microbial community composition using the generate_beta_trend_test_long() function but when running, I get the following error message:
Capture d’écran 2024-03-07 à 10 14 01

I have tried running the function using a dist.obj with my own distance matrices (as above) and also not using my own - dist.obj=NULL and dist.name= c("BC") - I get the same error in both cases.

I have also tried using a subset of my data with less samples and clean data (no missing values) to see if that would help but I still got the same error.

I usually try my best to solve most of my issues myself looking at forums on line but since your package is so new, there isn’t much available, that is why I am contacting you.

Hope you can help,
Best,
Gaëlle

@cafferychen777
Copy link
Owner

Dear Gaëlle,

Thank you for bringing this issue to my attention. You're right; the error you encountered was due to a bug in the generate_beta_trend_test_long() function. Initially, we did not intend to support a factor-formatted time.var in trend tests because improper use could affect the scientific validity of the analysis results. However, I have now fixed this bug and updated the package on GitHub to allow for this functionality. You can update your MicrobiomeStat package tomorrow to get the latest version with this fix.

I appreciate your patience and understanding as we work to improve MicrobiomeStat. If you have any further questions or encounter any other issues, please don't hesitate to reach out.

Best regards,
Chen YANG

@cafferychen777 cafferychen777 added bug Something isn't working Bug Fixed This bug has been addressed and resolved in the latest update. labels Mar 7, 2024
@QGaelle
Copy link
Author

QGaelle commented Mar 14, 2024

Dear Chen Yang,

Thanks for fixing the bug and updating the package. I have updated to the latest version but I still get an error message when trying to run the generate_beta_trend_test_long() function.

I am wondering whether it could come from my dist.obj

For clarity and simplification here, I am using a subset of my dataset

Here is my data.obj
Capture d’écran 2024-03-12 à 11 46 30

Option 1: I have used mStat_calculate_beta_diversity to calculate the distance matrix

Capture d’écran 2024-03-12 à 11 51 57

Here is the output
Capture d’écran 2024-03-12 à 11 55 34

Option 2: I have tried using my own calculation for the distance matrix which also led to an error message but a different one

Here is the output
Capture d’écran 2024-03-12 à 11 59 07

Option 3: I ran the function without specifying a dist.obj. I got the same error message as in option 1
Capture d’écran 2024-03-13 à 10 27 00

Option 4: I didn't convert the Date_format column as a factor prior to running the function and I get a different error message
Capture d’écran 2024-03-13 à 10 51 11

I have been reading about the different types of errors but did not manage to apply a solution to my case.
That is for sure that I am doing something wrong here but could not figure out what. I hope you can help. I am very grateful for any advice you can provide.

Best Regards,
Gaëlle

@cafferychen777
Copy link
Owner

Dear Gaelle,

Thank you for reaching out with your issue regarding the generate_beta_trend_test_long() function from the MicrobiomeStat package. I understand the frustration of encountering errors, especially when working with new packages that have limited online resources.

Unfortunately, without having access to your actual data, it is challenging for me to pinpoint the exact cause of the error you are experiencing. The error messages you provided indicate that there might be issues with the format or structure of your input data or distance matrices.

If possible, I kindly request that you share a small subset of your data, along with the code you are using to generate the distance matrices, by sending it to my email address [email protected]. Having access to the actual data and code will greatly assist me in identifying the root cause of the error and provide you with more specific guidance or potential solutions.

Once I have the data and code, I will thoroughly examine them and do my best to address the issue you are facing with the generate_beta_trend_test_long() function.

Please feel free to include any additional details or context that you believe might be relevant, as this will further aid my understanding of your particular use case.

I appreciate your patience and look forward to receiving your data and code. Rest assured that I will do my utmost to help you resolve this issue and ensure the smooth execution of the function within the MicrobiomeStat package.

Best regards,
Chen Yang

@QGaelle
Copy link
Author

QGaelle commented Mar 14, 2024

Thank you so much Chen Yang, I will prepare a subset of my data as well as my code and will send it to your email address.
I really appreciate your time and help.
Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fixed This bug has been addressed and resolved in the latest update. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants