{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "116263dd-556a-457c-a727-56aab3cbe301", "metadata": { "tags": [ "remove-cell" ] }, "outputs": [], "source": [ "%load_ext autoreload\n", "%aimport gempipe, gempipe.flowchart\n", "%autoreload 1\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "01b1e0d3-0303-4192-a46a-1593f8f35874", "metadata": { "tags": [ "remove-input" ] }, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", "\n", "
\n", " \n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from gempipe import Flowchart\n", "\n", "file = open('flowcharts/part_4.flowchart', 'r')\n", "header = 'flowchart LR \\n'\n", "flowchart = Flowchart(header + file.read())\n", "file.close()\n", "flowchart.render(height=300, zoom=0.7)" ] }, { "cell_type": "markdown", "id": "42513ac2-81c9-42fa-9f02-0fdf5f977092", "metadata": {}, "source": [ "# Part 4: multi-strain analysis\n", "\n", "Once [`gempipe derive`](part_3_gempipe_derive.ipynb) produced a strain-specific GSMM for each input strain, a multi-strain analysis can be performed. The [Gempipe API](https://gempipe.readthedocs.io/en/latest/autoapi/gempipe/interface/index.html) includes handy functions to perform simple multi-strain analysis. Specifically, it is currently possible to:\n", "\n", "* cluster strains according to their metabolic potential, creating a **\"phylometabolic tree\"**, i.e. a dendrogram built exclusively using metabolic features. \n", "\n", "* visually compare these data-driven clusters against a specified strains metadata, for example the environmental niche, or the species of origin. \n", "\n", "* extract the metabolic features characterizing each cluster. \n", "\n", "The [Gempipe API](https://gempipe.readthedocs.io/en/latest/autoapi/gempipe/interface/index.html) currently handles any number of binary metabolic features, which only represent the presence (1) or absence (0) of specific capabilities. These kind of features include for example the presence of metabolic reactions, the ability to catabolize alternative substrates, or the presence of auxotrophies for amino acids and vitamins. Their are provided by `gempipe derive` by means of specific tables: **rpam.csv**, **cnps.csv** and **aux.csv**, respectively (see [Output files](https://gempipe.readthedocs.io/en/latest/part_3_gempipe_derive.html#output-files)). These tables represent three distinct \"layers\" of binary metabolic features; however, the [Gempipe API](https://gempipe.readthedocs.io/en/latest/autoapi/gempipe/interface/index.html) can handle any number of layers, if provided.\n", "\n", "Tutorials are available to show the usage of some of the Gempipe API functions:\n", "\n", "* [_Tutorial:_ strain clustering](tutorial_clustering.ipynb)\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "id": "0c6be83a-8f65-4ac7-b33d-631df3429ab0", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.15" } }, "nbformat": 4, "nbformat_minor": 5 }