Skip to content

Latest commit

 

History

History
55 lines (32 loc) · 4.03 KB

exercise_3.md

File metadata and controls

55 lines (32 loc) · 4.03 KB

🧫 3. Explore effect of interactions as a function of media composition

We have already simulated the effect of switching carbon sources on the metabolic interactions. In this exercise we will further explore modifications to the media by tweaking the amino acid supply in the environment.

🥼 Run 3 additional computational experiments

Run each simulation on your own machine as shown in the following code chunks.

🥦 Low amino acid environment with lactose as carbon source

First, let's see what would happen in a low amino acid environment. We have already created a modified CDM35 with lactose as a carbon source and without all amino acids except for Valine. Note that ornithine and nh4 are also present as nitrogen sources.

$ smetana -v -d --flavor cobra --mediadb $ROOT/media.tsv -m CDM35_low_AA_lcts -o $ROOT/CDM35_low_AA_lcts $ROOT/models/*.xml && paste $ROOT/CDM35_low_AA_lcts_detailed.tsv

🍅 Low amino acid environment with glucose as carbon source

Now let's see what would happen in a low amino acid environment (only valine) with glucose as a carbon source. Note that ornithine and nh4 are also present as nitrogen sources.

$ smetana -v -d --flavor cobra --mediadb $ROOT/media.tsv -m CDM35_low_AA_glc -o $ROOT/CDM35_low_AA_glc $ROOT/models/*.xml && paste $ROOT/CDM35_low_AA_glc_detailed.tsv

🍆 Low amino acid environment with galactose as carbon source

Now let's see what would happen in a low amino acid environment (only valine) with galactose as a carbon source. Note that ornithine and nh4 are also present as nitrogen sources.

$ smetana -v -d --flavor cobra --mediadb $ROOT/media.tsv -m CDM35_low_AA_gal -o $ROOT/CDM35_low_AA_gal $ROOT/models/*.xml && paste $ROOT/CDM35_low_AA_gal_detailed.tsv

📺 Visualizing interactions

Alluvial diagrams, AKA sankey or flow diagrams, are a quick and easy way to visualize interaction predictions generated by SMETANA. We provide the following Rscript to be used for plotting your generated results.

Click to see Rscript

# install ggalluvial if missing
install.packages("ggalluvial")
# load libraries
library(tidyverse)
library(ggalluvial)
# load data, replace filename with your results to generate new plot
read.delim("CDM35_lcts_detailed.tsv") -> yeastlactis_smetana # SMETANA results
read.delim("bigg_classes.tsv") -> bigg_mets # BiGG metabolite ids information
# plot, play around with the parameters in this function to modify plot
ggplot(yeastlactis_smetana %>%
mutate(compound = gsub("M_","",compound),compound = gsub("_e","",compound)) %>%
left_join(.,bigg_mets) %>% filter(smetana >= 0.2,name!="DL-Glutamate"),
aes(axis1 = donor, axis2 = name, axis3 = receiver,
y = smetana)) +
scale_x_discrete(limits = c("Donor", "Metabolite", "Reciever")) +
xlab("Interaction") +
geom_alluvium(aes(fill = name)) +
geom_stratum(width=0.3) +
theme_minimal() + geom_text(stat = "stratum", aes(label = after_stat(stratum)),min.y=0.2)+theme_bw() +
theme(panel.border = element_blank(), panel.grid.major = element_blank(),panel.grid.minor = element_blank(), axis.line = element_line(colour = "black"),axis.line.y = element_blank(),axis.ticks.y = element_blank(),axis.text.y = element_blank(),axis.title.y = element_blank(),axis.line.x = element_blank(),axis.ticks.x = element_blank(),legend.position = "none")

To start plotting your own data, first open Rstudio by clicking on the bottom left icon and searching for Rstudio. Then click to navigate to your $ROOT folder in the bottom right file explorer. Click on the little gear button labeled More and set your current folder as the working directory. Then click on the plot_interactions.R script, which should bring up the code shown above. Now you may run the script with the default parameters to generate an alluvial diagram.

The script is hardcoded to read the CDM35 lactose SMETANA results file CDM35_lcts_detailed.tsv and plot to a file called CDM35_lcts.pdf. After generating prediction for each media condition, modify these parameters to read in and generate plots for each of the above experimental conditions. You may also have a look at some precomputed results for comparison, or if you run into any trouble generating results of your own.

💎 Discussion questions

  • How does switching carbon source affect the metabolic interactions between yeast and bacteria in this new low amino acid media?
  • Modify the media composition you created in the last exercise by replacing glucose/lactose/galactose with a new carbon source, e.g. trehalose, maltose, etc. Now remove all amino acids except valine and simulate interactions with SMETANA. How do the interactions compare in this new scenario?
  • If time allows, simulate the two species in milk media from a kefir study. Are any interactions predicted? Why / why not? Can you modify the media to force interactions?

Move on to exercise 4