Differences between revisions 3 and 18 (spanning 15 versions)
Revision 3 as of 2016-03-14 03:06:28
Size: 3791
Editor: hassan
Comment:
Revision 18 as of 2016-03-16 10:10:03
Size: 4345
Editor: hassan
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Practical 7 = = Practical 2 =
== Note ==
This practical requires a small update to !ScrumPy.

 1.
 Download [[http://mudsharkstatic.brookes.ac.uk://Pune2016/P2/patch.tgz|this file]]


 1.
 Unpack it: {{{tar zxf patch.tgz}}}


 1.
 cd into the newly created directory: {{{cd patch}}}


 1. Become root.
 1.
 Execute the "patchit" script: {{{./patchit}}}


That's it !
Line 6: Line 28:
 Download the file [[http://mudsharkstatic.brookes.ac.uk/C1Net/Wshop1/P7.tgz|P7.tgz]] into the area in which you have been using for your other practicals.  Download the file [[mudsharkstatic.brookes.ac.uk/Pune2016/P2/P2.tgz|P2.tgz]] into the area in which you have been using for your other practicals.
Line 15: Line 37:
 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. 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.
Line 18: Line 40:

 (1. Before starting take a look at [[http://mudshark.brookes.ac.uk/ScrumPy/Doc/LinProg|this basic tutorial]] on LP analysis.)
Line 50: Line 75:
 1. Will generate a dataset containing 50 solutions for the model with the imposed ATPase flux varying between 0 and 10 flux units.  1. This will generate a dataset containing 50 solutions for the model with the imposed ATPase flux varying between 0 and 10 flux units.
Line 61: Line 86:
  * For example, to plot the reactions that at some point carry no flux:   * For example, to plot the reactions that at some point carry no flux (after setting the x-axis to the rate of ATPase):
Line 63: Line 88:
   {{{ results.AddToPlot(ATPScan.GetSwitchers(results)) }}}    {{{ >>> results.SetPlotX("ATPase") }}}

   {{{ >>>
results.AddToPlot(ATPScan.GetSwitchers(results)) }}}
Line 75: Line 102:
Line 77: Line 105:
Line 81: Line 110:
   {{{ >>> res = KnockOutImpacts.KnockOutImpacts(m)}}}   .
{{{ >>> res = KnockOutImpacts.KnockOutImpacts(m)}}}
Line 83: Line 113:
 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.:
Line 88: Line 114:
             {{{ >>> lp.SetFixedFlux({Reac1:0,Reac2:0}) }}}
             {{{ >>> lp.Solve() }}}
Line 91: Line 115:
             etc. Remember to clear the constraint before proceeding:  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}) }}}
Line 93: Line 120:
           {{{ >>> lp.ClearFluxConstraint([Reac1,Reac2]) }}}
      (Generate lp by: {{{>>> lp = KnockOutImpacts.BuildLP.BuildLP(m) }}} )
   {{{ >>> lp.Solve() }}} etc. Remember to clear the constraint before proceeding:

{{{ >>> lp.ClearFluxConstraints([Reac1,Reac2]) }}}


   .
(Generate lp by: {{{>>> lp = KnockOutImpacts.BuildLP.BuildLP(m) }}} )

Practical 2

Note

This practical requires a small update to ScrumPy.

  1. Download this file

  2. Unpack it: tar zxf patch.tgz

  3. cd into the newly created directory: cd patch

  4. Become root.
  5. Execute the "patchit" script: ./patchit

That's it !

Analysing a genome scale model of Salmonella

In this practical we (you !) will be replicating some the analysis that was described in the previous lecture . In order to do this you will need to download the files associated with the model:

  1. Download the file P2.tgz into the area in which 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 P2.tgz 

  3. 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.
  4. 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.

Part A: Analysing the response to varying ATP demand.

  • (1. Before starting take a look at this basic tutorial on LP analysis.)

  • Change directory to the relevant area:
    • $ cd S.Typhim/Analysis/ATPScan

  • Start ScrumPy and load the model:

    •  >>> m = ScrumPy.Model("../../Model/MetaSal.spy") 

    • (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.)
  • Examine the files that are now presented - how much can you recognise from previous work in this course?
  • Now import the module called ATPScan
    •  >>> import ATPScan 

  • 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.:

  •  >>> results = ATPScan.ATPScan(m, 0, 10, 50) 

  • This will generate a dataset containing 50 solutions for the model with the imposed ATPase flux varying between 0 and 10 flux units.
  • 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 (after setting the x-axis to the rate of ATPase):
      •  >>> results.SetPlotX("ATPase") 

         >>> 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
  2. Start ScrumPy and the load the model as before.

  3. Import the KnockOutImpacts module.

  4. 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)

  5. 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.ClearFluxConstraints([Reac1,Reac2]) 

      • (Generate lp by: >>> lp = KnockOutImpacts.BuildLP.BuildLP(m)  )

None: Meetings/Pune2016/P2 (last edited 2016-03-16 10:10:03 by hassan)