Differences between revisions 1 and 15 (spanning 14 versions)
Revision 1 as of 2018-01-09 15:32:42
Size: 3938
Editor: david
Comment: Copied from W1, Prac 7.
Revision 15 as of 2018-01-19 08:43:26
Size: 4491
Editor: noah
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
=== This originally followed a lecture by Hassan that we won't have, and was quite tough. ===
=== Consider modification / simplification / replacement to go with application lectures this time. ===
== Analysing a genome scale model of Salmonella ==
In this practical we (you !) will be replicating some the analysis that was described in the [[http://mudsharkstatic.brookes.ac.uk/C1Net/Wshop1/L10.pdf|previous lecture]] . In order to do this you will need to download the files associated with the model:
== The effect of varying oxygen availabilty on Geobacillus ==
In this practical we will be investigating the the potential effects of limiting oxygen availability to a model of the organism ''Geobacillus thermoglucosidasius ''described [[http://www.ncbi.nlm.nih.gov/pubmed/28385593|here]]. In order to do this, we will be using the constraint scanning approach described in lecture 7. Geobacillus is a facultative aerobe; this has been demonstrated experimentally and in the paper linked above we investigated aerobic and anaerobic metabolism. What we did not investigate is the situation in which oxygen is reduced but not completely absent, so, as well as being a new practical, this is also a new investigation - results generated here will be genuinely new - no-one will ever have seen them before!
Line 7: Line 5:
 1. Download the file [[http://mudsharkstatic.brookes.ac.uk/C1Net/Wshop1/P7.tgz|P7.tgz]] into the area in whch you have been using for your other practicals. In order to perform the analysis we will be introducing a new class of object from !ScrumPy, the !DataSet. As the name implies, its purpose is to store and maniplulate data either generated from models, from external source, or from both. It has many of the same properties as a matrix, but in addition is capable of simple graph plotting and statistical analysis. In this exercise it will be used to store a set of lp solutions generated over a range of constraints imposed on the oxygen uptake rate.

=== Preliminaries ===
 1. Download the file [[http://mudsharkstatic.brookes.ac.uk/C1Net/Wshop4/P7.tgz|P7.tgz]] into the area in whch you have been using for your other practicals.
Line 12: Line 13:
 1. This will generate a directory, S.Typhim, containing two sub-directories: Model and Analysis. Model contains the model definition files and an additional python module (in Model/Tools). Analysis contains the python modules you will need for this practical.  1. This will create a new directory called "P7", containing two sub-directories: "Model" and "Analysis". Note the strict separation of the model definition components and the analysis components. This ensures (amongst other things) that an identical analysis could be performed on any other model, as long as naming conventions for the trans port steps are mainitained.
Line 14: Line 15:
 1. For the sake of the practical we have made a few simplifications and the model and results will not be identical to those in the lecture. the aim of the practical is to illustrate the techniques used.  1. Change directory to the Analysis directory: {{{$ cd P7/Analysis}}}
Line 16: Line 17:
== Part A: Analysing the response to varying ATP demand. ==
 1. Change directory to the relevant area:
  . {{{$ cd S.Typhim/Analysis/ATPScan}}}
 1. Start !ScrumPy and load the model "!MetaGeo.spy" located in the Model directory.
Line 20: Line 19:
 1. Start [[http://mudshark.brookes.ac.uk/ScrumPy|ScrumPy]] and load the model:
  . {{{ >>> m = ScrumPy.Model("../../Model/MetaSal.spy") }}}
 1. Briefly familiarise yourself with the contents of the model, and make sure you can identify the various transport steps. Note that some of these are commented out reflecting what we may or may not expect to be imported from, or exported to, the medium.
Line 23: Line 21:
  . (If you wish to avoid a bit of typing, leave the model name blank and use the file selector to find the model file instead.)  1. Having several windows open for one model can be inconvenient, the "m.Hide()" menu option will minimise all except for the top level module window.
Line 25: Line 23:
 1. Examine the files that are now presented - how much can you recognise from previous work in this course? Having done all this we are now in a position to start analysing the model. The python code you need can be found in the "!O2LimScan" module in the Analysis directory. You can open this from the "File/Open" menu item. All the work is done with the "!O2Scan" function, by now you should be able to interpret ''what'' this function is doing (don't worry about ''how'' it does it). Note that the module cannot be imported until the model is loaded (steps 1--7) above. Ask a demonstrator if you want to know why this should be the case.
Line 27: Line 25:
 1. Now import the module called ATPScan
  . {{{ >>> import ATPScan }}}

 1. The module contains a function, also called {{{ATPScan}}} that will generate a data set (as shown in previous lectures) containing the lp solutions over a range of imposed ATP demand values, e.g.:

 1. {{{ >>> results = ATPScan.ATPScan(m, 0, 10, 50) }}}

 1. Will generate a dataset containing 50 solutions for the model with the imposed ATPase flux varying between 0 and 10 flux units.

 1. The ATPScan module also contains three functions to aid in the analysis of results:
  . {{{ GetChangers(results, tol=1e-6) }}} A list of reactions whose flux value changes by more than tol (default = 1e-6). {{{ GetSwitchers(results) }}} A list of reactions that carry no flux at some point. {{{ GetRanges(results, tol=1e-6) }}} A dictionary mapping reactions to the amount of change in flux over the range of ATP demand.

  * For example, to plot the reactions that at some point carry no flux:
   . {{{ results.AddToPlot(ATPScan.GetSwitchers(results)) }}}

  * Use these functions to identify which fluxes show the greatest response to changes in ATP demand

== Part B: Impact of single and double reaction knockouts ==
 1. cd into Analysis/Knockouts
 1. Start [[http://mudshark.brookes.ac.uk/ScrumPy|ScrumPy]] and the load the model as before.

 1. Import the {{{KnockOutImpacts}}} module.

 1. This defines a single function also called {{{KnockOutImpacts}}} that returns a dictionary recording the impact of remove each reaction from the model (relative change in objective value) eg:
  . {{{ >>> res = KnockOutImpacts.KnockOutImpacts(m)}}}

 1. Use this to
  . a) Identify the lethal knockouts. b) Identify the non lethal knockouts that have the greatest impact. c) From b investigate the impact of dual knockouts, e.g.:
   . {{{ >>> lp.SetFixedFlux({Reac1:0,Reac2:0}) }}} {{{ >>> lp.Solve() }}} etc. Remember to clear the constraint before proceeding: {{{ >>> lp.ClearFluxConstraint([Reac1,Reac2]) }}}
   . (Generate lp by: {{{>>> lp = KnockOutImpacts.BuildLP.BuildLP(m) }}} )
=== Analysis ===
 1. Import the "!O2LimScan" module: {{{ >>> import O2LimScan}}}
 1. Get the results for a default scan: {{{ >>> res = O2LimScan.O2Scan(m)}}}
 1. {{{res}}} is an instance of the !DataSet class described above. We can see the effect of the changing limitation on oxygen availability by adding it to a plot: {{{ >>> res.AddToPlot("ObjVal")}}} Note that the objective value is much higher with limited oxygen.
 1. Now let's examine the effect of oxygen limitation on transport processes:
  1. The function {{{O2LimScan.GetNonBiomass_tx(m)}}} returns a list of tranporters involved with media components.
  1. We can then add these to the plot: {{{ >>> res.AddToPlot(O2LimScan.GetNonBiomass_tx(m))}}}
  1. At this point the plot will be dominated by the curve for the objective value, so remove it:
  1. {{{>>> res.RemoveFromPlot("ObjVal")}}}
 1. Note that not all transporters vary - why should this be? You can remove them from the plot as described above.
 1. What is the relationship between the limiting value for oxygen transport and the actual value?
 1. At the moment Glucose is assumed to be the sole carbon source and CO_2 and acetate, the only metabolic by-products. Explore the effect of allowing the transport of other compounds by editing the "Transporters.spy" module (remember to compile the model after editing).

Practical 7

The effect of varying oxygen availabilty on Geobacillus

In this practical we will be investigating the the potential effects of limiting oxygen availability to a model of the organism Geobacillus thermoglucosidasius described here. In order to do this, we will be using the constraint scanning approach described in lecture 7. Geobacillus is a facultative aerobe; this has been demonstrated experimentally and in the paper linked above we investigated aerobic and anaerobic metabolism. What we did not investigate is the situation in which oxygen is reduced but not completely absent, so, as well as being a new practical, this is also a new investigation - results generated here will be genuinely new - no-one will ever have seen them before!

In order to perform the analysis we will be introducing a new class of object from ScrumPy, the DataSet. As the name implies, its purpose is to store and maniplulate data either generated from models, from external source, or from both. It has many of the same properties as a matrix, but in addition is capable of simple graph plotting and statistical analysis. In this exercise it will be used to store a set of lp solutions generated over a range of constraints imposed on the oxygen uptake rate.

Preliminaries

  1. Download the file P7.tgz into the area in whch you have been using for your other practicals.

  2. This is a compressed archive file and you will need to extract the files before they can be used:

     $ tar -zxf P7.tgz 

  3. This will create a new directory called "P7", containing two sub-directories: "Model" and "Analysis". Note the strict separation of the model definition components and the analysis components. This ensures (amongst other things) that an identical analysis could be performed on any other model, as long as naming conventions for the trans port steps are mainitained.
  4. Change directory to the Analysis directory: $ cd P7/Analysis

  5. Start ScrumPy and load the model "MetaGeo.spy" located in the Model directory.

  6. Briefly familiarise yourself with the contents of the model, and make sure you can identify the various transport steps. Note that some of these are commented out reflecting what we may or may not expect to be imported from, or exported to, the medium.
  7. Having several windows open for one model can be inconvenient, the "m.Hide()" menu option will minimise all except for the top level module window.

Having done all this we are now in a position to start analysing the model. The python code you need can be found in the "O2LimScan" module in the Analysis directory. You can open this from the "File/Open" menu item. All the work is done with the "O2Scan" function, by now you should be able to interpret what this function is doing (don't worry about how it does it). Note that the module cannot be imported until the model is loaded (steps 1--7) above. Ask a demonstrator if you want to know why this should be the case.

Analysis

  1. Import the "O2LimScan" module:  >>> import O2LimScan

  2. Get the results for a default scan:  >>> res = O2LimScan.O2Scan(m)

  3. res is an instance of the DataSet class described above. We can see the effect of the changing limitation on oxygen availability by adding it to a plot:  >>> res.AddToPlot("ObjVal") Note that the objective value is much higher with limited oxygen.

  4. Now let's examine the effect of oxygen limitation on transport processes:
    1. The function O2LimScan.GetNonBiomass_tx(m) returns a list of tranporters involved with media components.

    2. We can then add these to the plot:  >>> res.AddToPlot(O2LimScan.GetNonBiomass_tx(m))

    3. At this point the plot will be dominated by the curve for the objective value, so remove it:
    4. >>> res.RemoveFromPlot("ObjVal")

  5. Note that not all transporters vary - why should this be? You can remove them from the plot as described above.
  6. What is the relationship between the limiting value for oxygen transport and the actual value?
  7. At the moment Glucose is assumed to be the sole carbon source and CO_2 and acetate, the only metabolic by-products. Explore the effect of allowing the transport of other compounds by editing the "Transporters.spy" module (remember to compile the model after editing).

None: Meetings/C1NetWork4/Prac7 (last edited 2018-01-19 08:43:26 by noah)