Chaste Release::3.1
WntCellCycleOdeSystem.cpp
00001 /*
00002 
00003 Copyright (c) 2005-2012, University of Oxford.
00004 All rights reserved.
00005 
00006 University of Oxford means the Chancellor, Masters and Scholars of the
00007 University of Oxford, having an administrative office at Wellington
00008 Square, Oxford OX1 2JD, UK.
00009 
00010 This file is part of Chaste.
00011 
00012 Redistribution and use in source and binary forms, with or without
00013 modification, are permitted provided that the following conditions are met:
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019  * Neither the name of the University of Oxford nor the names of its
00020    contributors may be used to endorse or promote products derived from this
00021    software without specific prior written permission.
00022 
00023 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00024 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00025 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00026 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
00027 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00028 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00029 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00030 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00031 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00032 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033 
00034 */
00035 #include "WntCellCycleOdeSystem.hpp"
00036 #include "CellwiseOdeSystemInformation.hpp"
00037 
00038 
00039 WntCellCycleOdeSystem::WntCellCycleOdeSystem(double wntLevel,
00040                                              boost::shared_ptr<AbstractCellMutationState> pMutationState,
00041                                              std::vector<double> stateVariables)
00042     : AbstractOdeSystem(9),
00043       mpMutationState(pMutationState),
00044       mWntLevel(wntLevel)
00045 {
00046     mpSystemInfo.reset(new CellwiseOdeSystemInformation<WntCellCycleOdeSystem>);
00047 
00062     Init(); // set up parameter values
00063 
00064     // Set up a Wnt signalling pathway in a steady state
00065     double destruction_level = ma5d/(ma4d*wntLevel+ma5d);
00066     double beta_cat_level_1 = -1.0;
00067     double beta_cat_level_2 = -1.0;
00068 
00069     if (!mpMutationState)
00070     {
00071         // No mutations specified
00072     }
00073     else if (mpMutationState && mpMutationState->IsType<ApcOneHitCellMutationState>())
00074     {
00075         // APC +/- : only half are active
00076         beta_cat_level_1 = 0.5*ma2d/(ma2d+0.5*ma3d*destruction_level);
00077         beta_cat_level_2 = 0.5*ma2d/(ma2d+0.5*ma3d*destruction_level);
00078     }
00079     else if (mpMutationState && mpMutationState->IsType<ApcTwoHitCellMutationState>())
00080     {
00081         // APC -/-
00082         destruction_level = 0.0; // no active destruction complex
00083         beta_cat_level_1 = 0.5; // fully active beta-catenin
00084         beta_cat_level_2 = 0.5; // fully active beta-catenin
00085     }
00086     else if (mpMutationState && mpMutationState->IsType<BetaCateninOneHitCellMutationState>())
00087     {
00088         // Beta-cat delta 45
00089         beta_cat_level_1 = 0.5*ma2d/(ma2d+ma3d*destruction_level);
00090         beta_cat_level_2 = 0.5;
00091     }
00092     else
00093     {
00094         // healthy cells
00095         beta_cat_level_1 = 0.5*ma2d/(ma2d+ma3d*destruction_level);
00096         beta_cat_level_2 = 0.5*ma2d/(ma2d+ma3d*destruction_level);
00097     }
00098 
00099     // Cell-specific initial conditions
00100     SetDefaultInitialCondition(5, destruction_level);
00101     SetDefaultInitialCondition(6, beta_cat_level_1);
00102     SetDefaultInitialCondition(7, beta_cat_level_2);
00103     SetDefaultInitialCondition(8, wntLevel);
00104 
00105     if (stateVariables != std::vector<double>())
00106     {
00107         SetStateVariables(stateVariables);
00108     }
00109 }
00110 
00111 void WntCellCycleOdeSystem::SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState)
00112 {
00113     mpMutationState = pMutationState;
00114 }
00115 
00116 WntCellCycleOdeSystem::~WntCellCycleOdeSystem()
00117 {
00118     // Do nothing
00119 }
00120 
00121 void WntCellCycleOdeSystem::Init()
00122 {
00123     // Initialise model parameter values
00124     // Swat (2004) Parameters
00125     double k1 = 1.0;
00126     double k2 = 1.6;
00127     double k3 = 0.05;
00128     double k16 = 0.4;
00129     double k34 = 0.04;
00130     double k43 = 0.01;
00131     double k61 = 0.3;
00132     double k23 = 0.3;
00133     double a = 0.04;
00134     double J11 = 0.5;
00135     double J12 = 5.0;
00136     double J61 = 5.0;
00137     double J62 = 8.0;
00138     double J13 = 0.002;
00139     double J63 = 2.0;
00140     double Km1 = 0.5;
00141     double Km2 = 4.0;
00142     double Km4 = 0.3;
00143     double kp = 0.05;
00144     double phi_pRb = 0.005;
00145     double phi_E2F1 = 0.1;
00146     double phi_CycDi = 0.023;
00147     double phi_CycDa = 0.03;
00148     double phi_pRbp = 0.06;
00149 
00150     // Mirams et al. parameter values
00151     double a1 = 0.423;
00152     double a2 = 2.57e-4;
00153     double a3 = 1.72;
00154     double a4 = 10.0;
00155     double a5 = 0.5;
00156     double WntMax = 10.0;
00157     double mitogenic_factorF = 6.0e-4;
00158     double APC_Total = 0.02;
00159 
00160     // Non-dimensionalise...
00161     mk2d = k2/(Km2*phi_E2F1);
00162     mk3d = k3*a1*mitogenic_factorF/(Km4*phi_E2F1*a2);
00163     mk34d = k34/phi_E2F1;
00164     mk43d = k43/phi_E2F1;
00165     mk23d = k23*Km2/(Km4*phi_E2F1);
00166     mad = a/Km2;
00167     mJ11d = J11*phi_E2F1/k1;
00168     mJ12d = J12*phi_E2F1/k1;
00169     mJ13d = J13*phi_E2F1/k1;
00170     mJ61d = J61*phi_E2F1/k1;
00171     mJ62d = J62*phi_E2F1/k1;
00172     mJ63d = J63*phi_E2F1/k1;
00173     mKm1d = Km1/Km2;
00174     mkpd = kp/(Km2*phi_E2F1);
00175     mphi_r = phi_pRb/phi_E2F1;
00176     mphi_i = phi_CycDi/phi_E2F1;
00177     mphi_j = phi_CycDa/phi_E2F1;
00178     mphi_p = phi_pRbp/phi_E2F1;
00179     ma2d = a2/phi_E2F1;
00180     ma3d = a3*APC_Total/phi_E2F1;
00181     ma4d = a4*WntMax/phi_E2F1;
00182     ma5d = a5/phi_E2F1;
00183     mk16d = k16*Km4/phi_E2F1;
00184     mk61d = k61/phi_E2F1;
00185     mPhiE2F1 = phi_E2F1;
00186 }
00187 
00188 void WntCellCycleOdeSystem::EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY)
00189 {
00190     double r = rY[0];
00191     double e = rY[1];
00192     double i = rY[2];
00193     double j = rY[3];
00194     double p = rY[4];
00195     double c = rY[5];
00196     double b1 = rY[6];
00197     double b2 = rY[7];
00198     double wnt_level = rY[8];
00199 
00200     double dx1 = 0.0;
00201     double dx2 = 0.0;
00202     double dx3 = 0.0;
00203     double dx4 = 0.0;
00204     double dx5 = 0.0;
00205     double dx6 = 0.0;
00206     double dx7 = 0.0;
00207     double dx8 = 0.0;
00208 
00209     /*
00210      * The variables are
00211      * 1. r = pRb
00212      * 2. e = E2F1
00213      * 3. i = CycD (inactive)
00214      * 4. j = CycD (active)
00215      * 5. p = pRb-p
00216      * 6. c = APC (Active)
00217      * 7. b = Beta-Catenin
00218     */
00219 
00220     // Bit back-to-front, but work out the Wnt section first...
00221 
00222     // Mutations take effect by altering the level of beta-catenin
00223     if (!mpMutationState)
00224     {
00225         // No mutations specified
00226     }
00227     else if (mpMutationState->IsType<ApcOneHitCellMutationState>()) // APC +/-
00228     {
00229         dx6 = ma5d*(1.0-c) - ma4d*wnt_level*c;
00230         dx7 = ma2d*(0.5-b1) - 0.5*ma3d*b1*c;
00231         dx8 = ma2d*(0.5-b2) - 0.5*ma3d*b2*c;
00232     }
00233     else if (mpMutationState->IsType<ApcTwoHitCellMutationState>()) // APC -/-
00234     {
00235         dx6 = 0.0;
00236         dx7 = ma2d*(0.5-b1);
00237         dx8 = ma2d*(0.5-b2);
00238     }
00239     else if (mpMutationState->IsType<BetaCateninOneHitCellMutationState>()) // Beta-Cat D45
00240     {
00241         dx6 = ma5d*(1.0-c) - ma4d*wnt_level*c;
00242         dx7 = ma2d*(0.5-b1) - ma3d*b1*c;
00243         dx8 = ma2d*(0.5-b2);
00244     }
00245     else
00246     {
00247         // da
00248         dx6 = ma5d*(1.0-c) - ma4d*wnt_level*c;
00249         // db
00250         dx7 = ma2d*(0.5-b1) - ma3d*b1*c;
00251         dx8 = ma2d*(0.5-b2) - ma3d*b2*c;
00252     }
00253 
00254     // Now the cell cycle stuff...
00255 
00256     // dr
00257     dx1 = e/(mKm1d+e)*mJ11d/(mJ11d+r)*mJ61d/(mJ61d+p) - mk16d*r*j+mk61d*p-mphi_r*r;
00258     // de
00259     dx2 = mkpd+mk2d*(mad*mad+e*e)/(1+e*e)*mJ12d/(mJ12d+r)*mJ62d/(mJ62d+p) - e;
00260     // di
00261     dx3 = mk3d*(b1+b2) + mk23d*e*mJ13d/(mJ13d+r)*mJ63d/(mJ63d+p) + mk43d*j - mk34d*i*j/(1+j) - mphi_i*i;
00262     // dj
00263     dx4 = mk34d*i*j/(1+j) - (mk43d+mphi_j)*j;
00264     // dp
00265     dx5 = mk16d*r*j - mk61d*p - mphi_p*p;
00266 
00267     double factor = mPhiE2F1*60.0;  // convert non-dimensional d/dt s to d/dt in hours
00268 
00269     rDY[0] = dx1*factor;
00270     rDY[1] = dx2*factor;
00271     rDY[2] = dx3*factor;
00272     rDY[3] = dx4*factor;
00273     rDY[4] = dx5*factor;
00274     rDY[5] = dx6*factor;
00275     rDY[6] = dx7*factor; // beta-cat allele 1
00276     rDY[7] = dx8*factor; // beta-cat allele 2
00277     rDY[8] = 0.0; // do not change the Wnt level
00278 }
00279 
00280 const boost::shared_ptr<AbstractCellMutationState> WntCellCycleOdeSystem::GetMutationState() const
00281 {
00282     return mpMutationState;
00283 }
00284 
00285 bool WntCellCycleOdeSystem::CalculateStoppingEvent(double time, const std::vector<double>& rY)
00286 {
00287     double r = rY[0];
00288     double e = rY[1];
00289     double p = rY[4];
00290     double dY1 = mkpd+mk2d*(mad*mad+e*e)/(1+e*e)*mJ12d/(mJ12d+r)*mJ62d/(mJ62d+p) - e;
00291     double factor = mPhiE2F1*60.0;  // Convert non-dimensional d/dt s to d/dt in hours.
00292     dY1 = dY1*factor;
00293 
00294     assert(!std::isnan(rY[1]));
00295     assert(!std::isnan(dY1));
00296     return (rY[1] > 1.0 && dY1 > 0.0);
00297 }
00298 
00299 double WntCellCycleOdeSystem::CalculateRootFunction(double time, const std::vector<double>& rY)
00300 {
00301     return rY[1] - 1.0;
00302 }
00303 
00304 template<>
00305 void CellwiseOdeSystemInformation<WntCellCycleOdeSystem>::Initialise()
00306 {
00307     this->mVariableNames.push_back("pRb");
00308     this->mVariableUnits.push_back("non_dim");
00309     this->mInitialConditions.push_back(7.357000000000000e-01);
00310 
00311     this->mVariableNames.push_back("E2F1");
00312     this->mVariableUnits.push_back("non_dim");
00313     this->mInitialConditions.push_back(1.713000000000000e-01);
00314 
00315     this->mVariableNames.push_back("CycD_i");
00316     this->mVariableUnits.push_back("non_dim");
00317     this->mInitialConditions.push_back(6.900000000000001e-02);
00318 
00319     this->mVariableNames.push_back("CycD_a");
00320     this->mVariableUnits.push_back("non_dim");
00321     this->mInitialConditions.push_back(3.333333333333334e-03);
00322 
00323     this->mVariableNames.push_back("pRb_p");
00324     this->mVariableUnits.push_back("non_dim");
00325     this->mInitialConditions.push_back(1.000000000000000e-04);
00326 
00327     this->mVariableNames.push_back("APC");
00328     this->mVariableUnits.push_back("non_dim");
00329     this->mInitialConditions.push_back(NAN); // will be filled in later
00330 
00331     this->mVariableNames.push_back("Beta_Cat1");
00332     this->mVariableUnits.push_back("non_dim");
00333     this->mInitialConditions.push_back(NAN); // will be filled in later
00334 
00335     this->mVariableNames.push_back("Beta_Cat2");
00336     this->mVariableUnits.push_back("non_dim");
00337     this->mInitialConditions.push_back(NAN); // will be filled in later
00338 
00339     this->mVariableNames.push_back("Wnt");
00340     this->mVariableUnits.push_back("non_dim");
00341     this->mInitialConditions.push_back(NAN); // will be filled in later
00342 
00343     this->mInitialised = true;
00344 }
00345 
00346 double WntCellCycleOdeSystem::GetWntLevel() const
00347 {
00348     return mWntLevel;
00349 }
00350 
00351 // Serialization for Boost >= 1.36
00352 #include "SerializationExportWrapperForCpp.hpp"
00353 CHASTE_CLASS_EXPORT(WntCellCycleOdeSystem)