YuLab-SMU/tidytree

unnest error

StickHu opened this issue · 1 comments

Hi, sorry to disturb. Recently when I was using ggtreeExtra to plot tree, something went wrong. As you can see,

trda %>% unnest(RareAbundanceBySample)
Error in UseMethod("unnest") :
no applicable method for 'unnest' applied to an object of class "c('MPSE', 'SummarizedExperiment', 'RectangularData', 'Vector', 'Annotated', 'vector_OR_Vector')

But the version of tidytree is 0.4.5, could you please help me solve that?

Maybe you need to extract the taxatree slot from MPSE class. For example, mpse %>% mp_extract_taxatree() -> taxa.tree. the taxa.tree is an treedata object, then you can processed and visualized using tidytree, treeio, ggtree and ggtreeExtra .