grunwaldlab / metacoder

Parsing, Manipulation, and Visualization of Metabarcoding/Taxonomic data
http://grunwaldlab.github.io/metacoder_documentation
Other
135 stars 28 forks source link

Rework with ggraph. #230

Open grabear opened 6 years ago

grabear commented 6 years ago

Thoughts on reworking metacoder with ggraph? I noticed this package the other day and thought about how it could be used here. It even has a workflow in it's documentation that involves igraph. That would be a major version update though.

zachary-foster commented 6 years ago

I have not used ggtree or ggraph much. I have considered something like this before and I would be interested in adding something like this as an option (or maybe just a converter to the format ggraph wants), but I dont think I would want to replace the current implementation of heat_tree with a ggraph-based solution without more convincing, because:

Are you talking about using ggraph internally and returning a ggraph plot with the current function/option setup for heat_tree, or redesigning the way plots are made by the user to use the ggraph syntax?

I can easily add a way to convert taxmap objects to tbl_graph objects so they can be used with ggraph. From my limited knowledge of tbl_graph objects, that would force some loss of information in some cases, because taxmap objects can have multiple datasets (e.g. tables) associated with the same taxonomy, whereas tbl_graph objects only contain one "node data" table, so the user would have to pick a single dataset to be included in the tbl_graph object.

Thanks for the thoughts!