ggtree
ggtree copied to clipboard
Error with facet_plot
Hello, I have been trying to follow the example for aligning genomic features with a phylogenetic tree found here: https://guangchuangyu.github.io/2016/11/align-genomic-features-with-phylogenetic-tree/
This example entails using the ggbio package to visualise genomic information and then using ggtree to align that information with a phylogenetic tree. All the steps run fine except for the last one:
facet_plot(p, 'alignment', grl, geom_alignment, inherit.aes=FALSE, mapping=aes())
Which gives the following error:
Error in rep.int(names(value), lapply(value, length)) :
invalid 'times' value
The visualisation of the genomic information and the tree both work fine independently. It isn't until trying to combine them with facet_plot that an error appears. Please help me fix this, it is going to make such a good figure for my data. Many thanks in advance.
maybe using gggenes, see https://yulab-smu.top/treedata-book/chapter13.html#genome-locus and https://github.com/YuLab-SMU/ggtree/issues/339.
Thanks for the response, will look into the gggenes package