cafferychen777 / MicrobiomeStat

Track, Analyze, Visualize: Unravel Your Microbiome's Temporal Pattern with MicrobiomeStat
https://www.microbiomestat.wiki/
31 stars 4 forks source link

Level of factor missing in output generate_alpha_trend_test_long() function. #36

Open QGaelle opened 6 months ago

QGaelle commented 6 months ago

Dear Chen Yang,

Following issue #35, I have converted my Date_format column to a factor to be used as time.var in the generate_alpha_trend_test_long() function and it allowed for the function to run.

Here is the output I got:

Capture d’écran 2024-03-01 à 17 19 02

My concern is that the third species, M_exa does not appear in the output table and I am not sure why as it is definitely present in the data.obj:

Capture d’écran 2024-03-01 à 17 19 11

I have tried running the function again after converting Sp_field and Colony_ID as factors and got completely different results.

My two questions would then be: -Should Sp_field and Colony_ID also be converted as factors? -Why is there a missing level of Sp_field in the output?

Sorry if this all sounds trivial. I am used to phyloseq so all this a new to me. I really want to use your package because I am interested in looking at the microbiome dynamics across time series and MicrobiomeStat seems the best choice for that.

Many thanks in advance, Gaëlle

cafferychen777 commented 6 months ago

Dear @QGaelle,

Apologies for the delayed response. I was occupied with a PhD interview over the past few days, and therefore could not attend to your query promptly. I will provide a comprehensive response to your questions within the next 24 hours.

Thank you for your understanding and patience.

Best regards, Chen Yang

QGaelle commented 6 months ago

Hi Chen Yang, Thank you so much. I didn't mean to insist, I just thought that maybe, because I asked my question as a comment to the previous issue and not as a new issue, maybe you did not see it. I am glad you did. I can only imagine how busy you are and I am grateful for your time. I will wait for your response. Thanks again.

cafferychen777 commented 6 months ago

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, Chen Yang