Metaphlan is a tool for profiling the relative abundance of microbial taxa in genomic data. The output needs additional processing before it can be used to create compositional stacked bar charts or to input into R to create a phyloseq object.
I made some python functions for cleaning the data and making a compositional plot using Bokeh and also to convert the data into dataframes to import into R.
I spent a bit of time figuring out how best to handle the data for plotting so hopefully my approach can save some time as I found a couple of questions online proving I wasn’t the only one wondering how.
Jupyter notebook outlining the steps and script can be followed on my github.


