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

Can you help me with plot_diff_cladogram? #279

Closed
CTTST opened this issue Oct 6, 2023 · 3 comments
Closed

Can you help me with plot_diff_cladogram? #279

CTTST opened this issue Oct 6, 2023 · 3 comments
Labels
good first issue Good for newcomers

Comments

@CTTST
Copy link

CTTST commented Oct 6, 2023

image

When I was following the 6.1 trans_diff class, I found my cladogram does not have any annotation on it, which is different from the cladogram in the tutorial. Can you please help me find out what the problem is? Thx!!

packageVersion("ggtree")
# [1] ‘3.8.2’

library(microeco)

t1 <- trans_diff$new(dataset = dataset,
                     method = "lefse",
                     group = "Group",
                     alpha = 0.01,
                     lefse_subgroup = NULL)
t1$plot_diff_cladogram(use_taxa_num = 200,
                       use_feature_num = 50,
                       clade_label_level = 5,
                       group_order = c("CW", "IW", "TW"))

# The console shows that there are warnings, 
# so I use warnings() to see the messages as follows
warnings()
# Warning messages:
#   1: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 2: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 3: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 4: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 5: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 6: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 7: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 8: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 9: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 10: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 11: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 12: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 13: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 14: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 15: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 16: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 17: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 18: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 19: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 20: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 21: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 22: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 23: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 24: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 25: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 26: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 27: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 28: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 29: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 30: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 31: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 32: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 33: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 34: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 35: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 36: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 37: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 38: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 39: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 40: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 41: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 42: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 43: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 44: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 45: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 46: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 47: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 48: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 49: Computation failed in `stat_clad_bar()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
# 50: Computation failed in `stat_clade_text()`
# Caused by error in `offspring.tbl_tree_item()`:
#   ! could not find function "offspring.tbl_tree_item"
@ChiLiubio
Copy link
Owner

Hi,
I found this is an extremely confusing issue. At first, I used my ggtree v3.8.0 to run these steps and found it is fine. Then I updated ggtree to the version v3.8.2 that you used. Then I got your result! But when I debug the steps, I found the issue may come from the initial ggtree function, which may come from the compatibility issue of dependent packages. So then I updated all the dependent packages and the issue is still there. Then I debug it step by step, but the issue disappear! Then no matter how I run the steps, the issue can not be reproduced! So I think it is probably the dependent packages loading sequence problem, which may lead to the function overwritten. Now please update these packages and try again.
1696665586301

Please feel free to tell me if it is still there. Thanks.

Best,
Chi

@vrmarcelino
Copy link

I had a similar issue.
Loading the tidytree functions as specified here worked for me:
YuLab-SMU/enrichplot#249 (comment)

@ChiLiubio ChiLiubio added the good first issue Good for newcomers label Mar 5, 2024
@ChiLiubio
Copy link
Owner

@vrmarcelino Thanks for providing this source!

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

No branches or pull requests

3 participants