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

Error in offspring.tbl_tree_item(.data = .data, .node = .node, tiponly = tiponly, : could not find function "offspring.tbl_tree_item" #249

Open
Leekate11 opened this issue Jul 23, 2023 · 3 comments

Comments

@Leekate11
Copy link

LEfse %>%

  • ggdiffclade(obj=.,
  •           alpha=0.3, linewd=0.2, 
    
  •           skpointsize=0.6,
    
  •           taxlevel=3,
    
  •           settheme=FALSE, 
    
  •           setColors=FALSE,
    
  •           cladetext=1.5, removeUnknown = F) +
    
  • guides(color = guide_legend(keywidth = 0.1,
  •                           keyheight = 0.6,
    
  •                           order = 3, 
    
  •                           ncol=1)) + 
    
  • scale_fill_manual(values=c("#008B45FF","#EE0000FF","purple")) +
  • guides(fill=guide_legend(order = 1,reverse = T,keyheight = 0.1,keywidth = 0.6))+
  • theme(panel.background=element_rect(fill=NA),
  •     legend.position="right",
    
  •     plot.margin=margin(0,0,0,0),
    
  •     legend.spacing.x = unit(0.02, "cm"),
    
  •     legend.title=element_text(size=7),
    
  •     legend.text=element_text(size=6),
    
  •     legend.box.spacing=unit(0.02,"cm"))
    

! # Invaild edge matrix for . A <tbl_df> is returned.
! # Invaild edge matrix for . A <tbl_df> is returned.
! # Invaild edge matrix for . A <tbl_df> is returned.
! # Invaild edge matrix for . A <tbl_df> is returned.
Error in offspring.tbl_tree_item(.data = .data, .node = .node, tiponly = tiponly, :
could not find function "offspring.tbl_tree_item"

@AhmedMohamed1993
Copy link

I have a similar error when running "treeplot". The error seems to happen in other packages as well.
https://support.bioconductor.org/p/9153366/

! # Invaild edge matrix for . A <tbl_df> is returned.
Error in offspring.tbl_tree_item(.data = .data, .node = .node, tiponly = tiponly, :
could not find function "offspring.tbl_tree_item"

@jdilme
Copy link

jdilme commented Oct 31, 2023

I know this is an old thread, but this is what worked for me:

just load these functions from the tidytree package:

nodeid.tbl_tree <- utils::getFromNamespace("nodeid.tbl_tree", "tidytree")
rootnode.tbl_tree <- utils::getFromNamespace("rootnode.tbl_tree", "tidytree")
offspring.tbl_tree <- utils::getFromNamespace("offspring.tbl_tree", "tidytree")
offspring.tbl_tree_item <- utils::getFromNamespace(".offspring.tbl_tree_item", "tidytree")
child.tbl_tree <- utils::getFromNamespace("child.tbl_tree", "tidytree")
parent.tbl_tree <- utils::getFromNamespace("parent.tbl_tree", "tidytree")

@DelongZHOU
Copy link

Hello,
It seems that this isssue is still present with the current version. Although the work-around provided above works, it would benefit all users if the functions were properly imported to the package itself.
Thank you!

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Rocky Linux 8.9 (Green Obsidian)

Matrix products: default
BLAS/LAPACK: /cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/flexiblas/3.0.4/lib64/libflexiblas.so.3.0

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8
 [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8
 [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] cowplot_1.1.1         enrichplot_1.16.2     strex_2.0.0
 [4] ReactomePA_1.40.0     clusterProfiler_4.4.4 DOSE_3.22.1
 [7] lubridate_1.9.3       forcats_1.0.0         stringr_1.5.0
[10] dplyr_1.1.3           purrr_1.0.2           readr_2.1.4
[13] tidyr_1.3.0           tibble_3.2.1          ggplot2_3.4.4
[16] tidyverse_2.0.0

loaded via a namespace (and not attached):
  [1] ggnewscale_0.4.10      fgsea_1.22.0           colorspace_2.1-0
  [4] ggtree_3.4.4           qvalue_2.28.0          XVector_0.36.0
  [7] fs_1.6.3               aplot_0.2.2            farver_2.1.1
 [10] graphlayouts_1.0.1     ggrepel_0.9.4          bit64_4.0.5
 [13] AnnotationDbi_1.58.0   fansi_1.0.5            scatterpie_0.2.1
 [16] codetools_0.2-18       splines_4.2.1          cachem_1.0.8
 [19] GOSemSim_2.22.0        polyclip_1.10-6        jsonlite_1.8.7
 [22] GO.db_3.15.0           png_0.1-8              graph_1.74.0
 [25] ggforce_0.4.1          graphite_1.42.0        compiler_4.2.1
 [28] httr_1.4.7             Matrix_1.6-1.1         fastmap_1.1.1
 [31] lazyeval_0.2.2         cli_3.6.1              org.Mm.eg.db_3.15.0
 [34] tweenr_2.0.2           tools_4.2.1            igraph_1.5.1
 [37] gtable_0.3.4           glue_1.6.2             GenomeInfoDbData_1.2.8
 [40] reshape2_1.4.4         DO.db_2.9              rappdirs_0.3.3
 [43] fastmatch_1.1-4        Rcpp_1.0.11            Biobase_2.56.0
 [46] vctrs_0.6.4            Biostrings_2.64.1      ape_5.7-1
 [49] nlme_3.1-157           ggraph_2.1.0           timechange_0.2.0
 [52] lifecycle_1.0.3        zlibbioc_1.42.0        MASS_7.3-57
 [55] scales_1.2.1           tidygraph_1.2.3        reactome.db_1.81.0
 [58] ragg_1.2.6             hms_1.1.3              parallel_4.2.1
 [61] RColorBrewer_1.1-3     memoise_2.0.1          gridExtra_2.3
 [64] downloader_0.4         ggfun_0.1.3            yulab.utils_0.1.0
 [67] stringi_1.8.3          RSQLite_2.3.1          S4Vectors_0.34.0
 [70] tidytree_0.4.5         BiocGenerics_0.42.0    BiocParallel_1.30.4
 [73] GenomeInfoDb_1.32.4    systemfonts_1.0.5      rlang_1.1.3
 [76] pkgconfig_2.0.3        bitops_1.0-7           lattice_0.20-45
 [79] labeling_0.4.3         treeio_1.20.2          patchwork_1.1.2
 [82] shadowtext_0.1.2       bit_4.0.5              tidyselect_1.2.0
 [85] plyr_1.8.9             magrittr_2.0.3         R6_2.5.1
 [88] IRanges_2.30.1         generics_0.1.3         DBI_1.1.3
 [91] pillar_1.9.0           withr_2.5.1            KEGGREST_1.36.3
 [94] RCurl_1.98-1.12        crayon_1.5.2           utf8_1.2.4
 [97] tzdb_0.4.0             viridis_0.6.4          grid_4.2.1
[100] data.table_1.14.8      blob_1.2.4             digest_0.6.33
[103] textshaping_0.3.7      gridGraphics_0.5-1     stats4_4.2.1
[106] munsell_0.5.0          viridisLite_0.4.2      ggplotify_0.1.2

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

No branches or pull requests

4 participants