-
Notifications
You must be signed in to change notification settings - Fork 5
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
Format time.var in generate_alpha_trend_test_long() function #35
Comments
Dear Gaëlle, Thank you for reaching out with your question. To use your "Date_format" column as the time.var in the generate_alpha_trend_test_long() function, you should convert it to a factor instead of a numeric value. You can do this with the following code: data.obj$meta.dat$Date_format <- as.factor(data.obj$meta.dat$Date_format) After converting it to a factor, you should be able to use it as the time.var in the function without any issues. Please let me know if you have any further questions or if there is anything else I can assist you with. Best regards, |
Dear @QGaelle, Thank you for your follow-up questions regarding the missing level of Sp_field in the output and whether Sp_field and Colony_ID should be converted to factors. Regarding the missing level of Sp_field (M_exa) in the output, this is because M_exa is being used as the reference level for the comparisons. In the output, M_platy and M_ten are being compared to M_exa. M_exa serves as the baseline for these comparisons, which is why it does not appear in the output table. As for converting Sp_field and Colony_ID to factors, I generally do not convert them. However, it is strange that you obtained different results after converting them to factors. In theory, converting these variables to factors should not affect the results. If possible, could you please share the output you obtained after converting Sp_field and Colony_ID to factors? This will help me investigate the issue further. Given your experience with using Phyloseq for microbiome data analysis, I would greatly appreciate any suggestions or feedback you may have for improving MicrobiomeStat. As a user of both packages, your insights could be valuable in helping us enhance the functionality and user experience of MicrobiomeStat. If you have any specific features, workflows, or improvements in mind that you believe would benefit the microbiome research community, please don't hesitate to share them with us. We are always looking for ways to make MicrobiomeStat more comprehensive and user-friendly. Thank you for your interest in using MicrobiomeStat for analyzing microbiome dynamics across time series. I appreciate your patience and understanding. Please let me know if you have any further questions or if there's anything else I can assist you with. Best regards, |
Dear @QGaelle, Thank you for your continued use of MicrobiomeStat and for sharing your questions. Regarding your concern about converting I hope this helps! If you have any more questions or need further clarification, please don't hesitate to ask. Best regards, |
Dear Chen Yang, Following issues #35 and #36, I have run the generate_alpha_trend_test_long() function after converting my “Date_format” column to a factor and got the following output: I would like to make sure that I am interpreting the results correctly. Q1: In the output table, the rows 6, 7 and 8 “Sp_field:Date_format” for each species show whether there is a difference in alpha diversity across time points for each species and for the fourth species, which is used as a reference, I should look at p-value of the fifth row "Date:format", is this correct? If yes, then it looks like only the M_exa species shows differences in time. Q2: Does the test keep the levels of time.var in a chronological order? How do I make sure it does? Q3: In order to go further and know between which time points alpha diversity shows significant differences, should I use the generate_alpha_test_long function as some sort of post-hoc test? Thanks again for your time and for this great package, |
Dear @QGaelle, Thank you for your questions. Here are my responses:
I hope these answers help clarify your questions. If you have any further questions or need additional assistance, please feel free to ask. Best regards, |
Hi Chen Yang, Thank you so much for this quick and clear response and for confirming that all species have similar trends in alpha diversity over time as shown by the last row of the output table. What about the fifth row of the output table, the "Date_format" one? What does it stand for? I thought it showed whether there is difference in alpha diversity over time for M_exa only and I thought that the 6, 7 and 8 rows showed whether there is a difference in alpha diversity over time for each of the three other species individually. But looks like I am interpreting this wrong. Best, |
Dear Gaëlle, Thank you for your follow-up question. I apologize for any confusion caused. In the context of the generate_alpha_trend_test_long() function, the "Date_format" row in the output table actually does not have any specific significance. It is a residual effect from the model and should not be interpreted in the analysis of alpha diversity over time. Please feel free to reach out if you have any more questions or need further clarification. Best regards, |
Perfect. All clear now. Sorry again for the trivial questions and than you so much for your time and help. Hope this will help future users. |
Dear Chen Yang,
I have a question regarding the use of the generate_alpha_trend_test_long() function. I am working on the microbiome communities of three coral species. Individual colonies of each species were monitored over a three year period. I would like to test for differences in alpha diversity across timepoints.
Here is the structure of my data object:
I have precalculated alpha diversity indices and passed them to the alpha.obj parameter:
I would like to use my column “Date_format” as time.var since it includes information on both year and month but I am not sure which format I should use. I tried to make it numeric using:
All rows were replaced by NAs
I did the same using my column “m_format” just as a test. And got the following output:
My questions is thus:
How should I write my year + month factor so it can be used as time.var in the generate_alpha_trend_test_long() function?
Thanks for your help!
Gaëlle
The text was updated successfully, but these errors were encountered: