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

The plot generated by the 'plot_diff_cladogram' function appears unusual and difficult to interpret. #385

Open
lzuChengweiZhang opened this issue Jul 18, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@lzuChengweiZhang
Copy link

Dear friends:
Hi! Thank you so much for developing this amazing and useful package!

However, I am encountering an issue with the cladogram generated by the plot_diff_cladogram function during my LEfSe analysis.

I have attached my cladogram here:
LEfSe_phylo.pdf
image

As you can see, the plot is highly unusual. All the nodes are clustered together in a small central circle, causing significant overlap and making it difficult to distinguish between them.
image

I can't figure out where the problem lies because I am following the tutorial from here, which is the official website of the package tutorials.

Here is my process:

  1. IMPORT THE DATA TO THE MICROECO
    data_micro <- microtable$new(sample_table = df_tumor_health_tissue, otu_table = df_genus_tissue_t, tax_table = df_taxa_genus)
    My datasets are attached here.
    otu_table.csv
    tax_table.csv
    sample_table.csv
  2. PERFORMING LEFSE ANALYSIS
    t1 <- trans_diff$new(dataset = data_micro, method = "lefse", group = "Type", alpha = 0.05, lefse_subgroup = NULL)
    The "Type" column is composed by two elements: PC and EC.
  3. PLOTTING DIFFERENT BAR PLOT
    t1$plot_diff_bar(threshold = 4)
    The plot looks like quite normal.
    image
  4. PLOTTING CLADOGRAM
    This is where the things went wrong. I used following code to generate a cladogram of my group: PC and EC.
    t1$plot_diff_cladogram(use_taxa_num = 100, use_feature_num = 50, clade_label_level = 5, group_order = c('EC', 'PC'))
    But the result is abnormal and confusing. I am strictly following the tutorial but have a very confusing result. I don't have any clues so far about the issue.

Thank you in advance for your help!

@ChiLiubio
Copy link
Owner

Hi. Please first try to run the following codes and then perform lefse. I guess it is the reason of taxonomic information.

library(magrittr)
data_micro$tax_table %<>% tidy_taxonomy
data_micro$tidy_dataset()
data_micro$cal_abund()

If the issue is still there, please use save function to save your data_micro and attach the compressed data so that I can totally and easily reproduce your issue. To save data_micro, please follow the tutorial (https://chiliubio.github.io/microeco_tutorial/notes.html#save-function)

@lzuChengweiZhang
Copy link
Author

Dear Liubio
Hi, Thank you very much for your reply and solutions!

I have tried the codes to tidy my taxonomic information and try again to run plot_diff_cladogram. Finally, it works! I got the right picture!

I found that taxonomic information need the prefixes such as "f__", "g__" and "s__" as taxonomy markers, which I was neglected and thus caused the trouble.
image

By the way, I am also Chinese and currently pursuing my master's degree in Lanzhou. If you ever travel here, I would be pleased to treat you to beef noodles and be your tour guide!

Thank you again for your help! It truly helped me a lot!

@ChiLiubio ChiLiubio added documentation Improvements or additions to documentation good first issue Good for newcomers labels Jul 18, 2024
@ChiLiubio
Copy link
Owner

好的,感谢!有机会了去兰州玩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants