:py:mod:`micom.viz.exchanges` ============================= .. py:module:: micom.viz.exchanges .. autoapi-nested-parse:: Visualization for exchanges. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: micom.viz.exchanges.plot_exchanges_per_sample micom.viz.exchanges.plot_exchanges_per_taxon .. py:function:: plot_exchanges_per_sample(results, filename='sample_exchanges_%s.html' % datetime.now().strftime('%Y%m%d'), direction='import', cluster=True) -> None Plot the per sample exchange fluxes. :param results: The results returned by the `grow` workflow. :type results: micom.workflows.GrowthResults :param filename: The HTML file where the visualization will be saved. :type filename: str :param direction: The direction of fluxes to plot. :type direction: str either "import" or "export" :param cluster: Whether to reorder samples so that samples with similar exchange fluxes are close to another. :type cluster: bool :returns: A MICOM visualization. Can be served with `viz.serve`. :rtype: Visualization .. py:function:: plot_exchanges_per_taxon(results, filename='taxon_exchanges_%s.html' % datetime.now().strftime('%Y%m%d'), direction='import', use_total_flux=False, **tsne_args) -> None Plot the exchange fluxes per taxon. :param results: The exchanges returned by the `grow` workflow. :type results: micom.workflows.GrowthResults :param filename: The HTML file where the visualization will be saved. :type filename: str :param direction: The direction of fluxes to plot. :type direction: str either "import" or "export" :param use_total_fluxes: Whether to use fluxes normalized to 1gDW of bacteria or the total flux. :type use_total_fluxes: bool :param tsne_args: Additional arguments passed to TSNE. :type tsne_args: dict :returns: A MICOM visualization. Can be served with `viz.serve`. :rtype: Visualization