You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off thank you for the wonderful packages ggtree and aplot. They've made plotting my phylogenetic data very easy.
I am running into multiple issues in R using the 'aplot' package, where I am trying to connect a multi-faceted heatmap made with geom_tile in ggplot2, to a tree I have visualized using ggtree. This heatmap includes numeric data for how complete metabolic pathways are for a subset of genomes in my larger phylogenetic tree. Producing this heatmap using gheatmap or appending it to the tree data %<+% hasn't worked because the code for the heatmap is too complex due to the faceting required. Simply trying to insert the tree to the left with common labels returns the error:
Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components 'x' and 'y'
The issues include:
The labels on the y-axis between the tree and heat map are not aligning properly at all despite making sure the syntax and ordering them as a factor are identical
I can only connect the two figures using the following code tree_heatmap<- heatmap %>% insert_left(tree), and I cannot do it the other way around, inserting the heatmap to the right of the tree. When I do so, it says I am supplying discrete values to a continuous scale.
I cannot export the final figure as a PDF, it just shows up blank in the file
Outside of these trials, I can't figure out how to connect these plots working from Figure 7B from this link: https://yulab-smu.top/treedata-book/chapter7.html. I've attached a rough copy and paste image from R studio here to illustrate the alignment issues I am having with the labels.
Really, I am trying to produce the first two panels of Figure 7B, with the proper alignment, label order, and labels dropped for those that are not in the heatmap dataset.
Any help you can provide on this matter would be much appreciated.
The text was updated successfully, but these errors were encountered:
Hello,
First off thank you for the wonderful packages ggtree and aplot. They've made plotting my phylogenetic data very easy.
I am running into multiple issues in R using the 'aplot' package, where I am trying to connect a multi-faceted heatmap made with geom_tile in ggplot2, to a tree I have visualized using ggtree. This heatmap includes numeric data for how complete metabolic pathways are for a subset of genomes in my larger phylogenetic tree. Producing this heatmap using gheatmap or appending it to the tree data %<+% hasn't worked because the code for the heatmap is too complex due to the faceting required. Simply trying to insert the tree to the left with common labels returns the error:
Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components 'x' and 'y'
The issues include:
tree_heatmap<- heatmap %>% insert_left(tree)
, and I cannot do it the other way around, inserting the heatmap to the right of the tree. When I do so, it says I am supplying discrete values to a continuous scale.Outside of these trials, I can't figure out how to connect these plots working from Figure 7B from this link: https://yulab-smu.top/treedata-book/chapter7.html. I've attached a rough copy and paste image from R studio here to illustrate the alignment issues I am having with the labels.
Really, I am trying to produce the first two panels of Figure 7B, with the proper alignment, label order, and labels dropped for those that are not in the heatmap dataset.
Any help you can provide on this matter would be much appreciated.
The text was updated successfully, but these errors were encountered: