cmmr / TX_wastewater_virome

5 stars 0 forks source link

Phylogenetic Tree Family (Node) #6

Open nitinShukla1912 opened 11 months ago

nitinShukla1912 commented 11 months ago

In Virome community, inside this RMD file (taxonomy_tree_prevalence1), how you have decided name of clade based on node number as the tips contain the name of species. I checked (t1$data), because it contains number of nodes but I dont know how to map the names of clade "geom_cladelab(node = 335, label = "Adenoviridae", hjust = -0.1, fontsize = 3)" or this entire step is manual where you have to individually check the nodes and get their clade information. Is there a way to automate this step and, get the name of (Family).

mtisza1 commented 11 months ago

Hi Nitin,

Thanks for opening this issue. Unfortunately, yes, I had to manually label the clades on this tree because I was unable to automatically pull out the taxonomic label for the nodes. In general, ggtree is a nice package but some of its functions are hard to understand for someone with my level of R skill. There may be a way to get the labels automatically, and I would suggest opening an issue in ggtree's github repo. Please tag me if you find a solution.

After I generated this figure, I discovered the metacoder package (https://github.com/grunwaldlab/metacoder). This may be an easier way to make this type of figure.

I also enjoyed this tutorial (https://taylorreiter.github.io/2022-08-30-Visualizing-the-taxonomic-composition-of-metagenomes-using-sourmash-and-metacoder/)

Good luck, and I'm sorry I couldn't be more helpful.

Mike