cafferychen777 / ggpicrust2

Make Picrust2 Output Analysis and Visualization Easier
https://cafferychen777.github.io/ggpicrust2/
MIT License
109 stars 13 forks source link

pathway_errorbar() : The 'method' column in the 'daa_results_df' data frame contains more than one method. Please filter it to contain only one method. #86

Open IloveUKarna opened 10 months ago

IloveUKarna commented 10 months ago

Describe the Bug Hello. I'm still new to this field, so I'm studying it little by little and referring to it often.The reason I'm commenting like this is because I had a problem with the error bar plotting part while following the code.

Reproducible Example I used example data from QIIME2 "Moving picture Tutorial". After that, for the count of KO pathway I used PICRUSt2 and got "pred_metagenome_unstart.tsv". After running ALDEx2 through pathway_daa(), I just left with the results of the "ALDEx2_Wilcoxon rank test". Group data was used by "gut" and "tounge" in 'metadata$body.site'.

p <- pathway_errorbar(abundance = kegg_abundance_t30,
                      daa_results_df = Top30,
                      Group = metadata$body.site,
                      ko_to_kegg = T,
                      p_values_threshold = 0.05,
                      order = "pathway_class",
                      select = NULL,
                      p_value_bar = T,
                      colors = NULL,
                      x_lab = NULL)

Expected Behavior I was expecting to get Error bar plot with 30 lowest adjusted p-value.

Actual Behavior I got a error below.

The 'method' column in the 'daa_results_df' data frame contains more than one method. Please filter it to contain only one method.
The 'group1' or 'group2' column in the 'daa_results_df' data frame contains more than one group. Please filter each to contain only one group.
Error in pathway_errorbar(abundance = kegg_abundance_t30, daa_results_df = Top30,  : 
  Visualization with 'pathway_errorbar' cannot be performed because there are no features with statistical significance. For possible solutions, please check the FAQ section of the tutorial.

Even I have adjusted p values under 0.05, why does error says there's no statistical significance? Is there more caculation inside the code?

Environment Information:

Additional Context I got the same error with MetaCyc too.

cafferychen777 commented 10 months ago

Hello,

Thank you for reaching out and providing a detailed description of the issue you're facing with the error bar plotting in our package. It seems like there might be a specific issue with the dataset or the way the script is handling the data.

To assist you better, could you please send me the dataset you're using (in this case, the "pred_metagenome_unstart.tsv" file) as well as the entire script that you're running? This will help me to reproduce the error on my end and investigate the cause more thoroughly.

You can attach the files in your response or share a link to where they are hosted. Once I have these files, I'll be able to provide more targeted assistance.

Looking forward to your response.

Best regards,

Chen YANG

IloveUKarna commented 10 months ago

Thanks for your response.

Here's my dataset and code script. Dataset.

To explain my dataset,

I first used the code with My_data dataset by MetaCyc. But there was no significance in adjusted p-values. So I was wondering if there is a way to use p-value rather than adjusted p-value in errorbar.

For that, I was practicing with Example dataset by KO. Although it had significant pathways in adjusted p-value, unlike My_data, it had the same error.

So I want to know what was the matter of my data or code. And if it's okay, I want to ask if I can use p-value instead of adjusted p-value in the code.

Thanks, Kris

freemutation commented 7 months ago

I also got the same error.