WntCellCycleOdeSystem.cpp

00001 /*
00002 
00003 Copyright (c) 2005-2015, 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 
00036 #include "WntCellCycleOdeSystem.hpp"
00037 #include "CellwiseOdeSystemInformation.hpp"
00038 #include "IsNan.hpp"
00039 
00040 // These #includes are needed for the constructor and EvaluateYDerivatives()
00041 #include "ApcOneHitCellMutationState.hpp"
00042 #include "ApcTwoHitCellMutationState.hpp"
00043 #include "BetaCateninOneHitCellMutationState.hpp"
00044 
00045 WntCellCycleOdeSystem::WntCellCycleOdeSystem(double wntLevel,
00046                                              boost::shared_ptr<AbstractCellMutationState> pMutationState,
00047                                              std::vector<double> stateVariables)
00048     : AbstractOdeSystem(9),
00049       mpMutationState(pMutationState),
00050       mWntLevel(wntLevel)
00051 {
00052     mpSystemInfo.reset(new CellwiseOdeSystemInformation<WntCellCycleOdeSystem>);
00053 
00068     Init(); // set up parameter values
00069 
00070     // Set up a Wnt signalling pathway in a steady state
00071     double destruction_level = ma5d/(ma4d*wntLevel+ma5d);
00072     double beta_cat_level_1 = -1.0;
00073     double beta_cat_level_2 = -1.0;
00074 
00075     if (!mpMutationState)
00076     {
00077         // No mutations specified
00078     }
00079     else if (mpMutationState && mpMutationState->IsType<ApcOneHitCellMutationState>())
00080     {
00081         // APC +/- : only half are active
00082         beta_cat_level_1 = 0.5*ma2d/(ma2d+0.5*ma3d*destruction_level);
00083         beta_cat_level_2 = 0.5*ma2d/(ma2d+0.5*ma3d*destruction_level);
00084     }
00085     else if (mpMutationState && mpMutationState->IsType<ApcTwoHitCellMutationState>())
00086     {
00087         // APC -/-
00088         destruction_level = 0.0; // no active destruction complex
00089         beta_cat_level_1 = 0.5; // fully active beta-catenin
00090         beta_cat_level_2 = 0.5; // fully active beta-catenin
00091     }
00092     else if (mpMutationState && mpMutationState->IsType<BetaCateninOneHitCellMutationState>())
00093     {
00094         // Beta-cat delta 45
00095         beta_cat_level_1 = 0.5*ma2d/(ma2d+ma3d*destruction_level);
00096         beta_cat_level_2 = 0.5;
00097     }
00098     else
00099     {
00100         // healthy cells
00101         beta_cat_level_1 = 0.5*ma2d/(ma2d+ma3d*destruction_level);
00102         beta_cat_level_2 = 0.5*ma2d/(ma2d+ma3d*destruction_level);
00103     }
00104 
00105     // Cell-specific initial conditions
00106     SetDefaultInitialCondition(5, destruction_level);
00107     SetDefaultInitialCondition(6, beta_cat_level_1);
00108     SetDefaultInitialCondition(7, beta_cat_level_2);
00109     SetDefaultInitialCondition(8, wntLevel);
00110 
00111     if (stateVariables != std::vector<double>())
00112     {
00113         SetStateVariables(stateVariables);
00114     }
00115 }
00116 
00117 void WntCellCycleOdeSystem::SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState)
00118 {
00119     mpMutationState = pMutationState;
00120 }
00121 
00122 WntCellCycleOdeSystem::~WntCellCycleOdeSystem()
00123 {
00124     // Do nothing
00125 }
00126 
00127 void WntCellCycleOdeSystem::Init()
00128 {
00129     // Initialise model parameter values
00130     // Swat (2004) Parameters
00131     double k1 = 1.0;
00132     double k2 = 1.6;
00133     double k3 = 0.05;
00134     double k16 = 0.4;
00135     double k34 = 0.04;
00136     double k43 = 0.01;
00137     double k61 = 0.3;
00138     double k23 = 0.3;
00139     double a = 0.04;
00140     double J11 = 0.5;
00141     double J12 = 5.0;
00142     double J61 = 5.0;
00143     double J62 = 8.0;
00144     double J13 = 0.002;
00145     double J63 = 2.0;
00146     double Km1 = 0.5;
00147     double Km2 = 4.0;
00148     double Km4 = 0.3;
00149     double kp = 0.05;
00150     double phi_pRb = 0.005;
00151     double phi_E2F1 = 0.1;
00152     double phi_CycDi = 0.023;
00153     double phi_CycDa = 0.03;
00154     double phi_pRbp = 0.06;
00155 
00156     // Mirams et al. parameter values
00157     double a1 = 0.423;
00158     double a2 = 2.57e-4;
00159     double a3 = 1.72;
00160     double a4 = 10.0;
00161     double a5 = 0.5;
00162     double WntMax = 10.0;
00163     double mitogenic_factorF = 6.0e-4;
00164     double APC_Total = 0.02;
00165 
00166     // Non-dimensionalise...
00167     mk2d = k2/(Km2*phi_E2F1);
00168     mk3d = k3*a1*mitogenic_factorF/(Km4*phi_E2F1*a2);
00169     mk34d = k34/phi_E2F1;
00170     mk43d = k43/phi_E2F1;
00171     mk23d = k23*Km2/(Km4*phi_E2F1);
00172     mad = a/Km2;
00173     mJ11d = J11*phi_E2F1/k1;
00174     mJ12d = J12*phi_E2F1/k1;
00175     mJ13d = J13*phi_E2F1/k1;
00176     mJ61d = J61*phi_E2F1/k1;
00177     mJ62d = J62*phi_E2F1/k1;
00178     mJ63d = J63*phi_E2F1/k1;
00179     mKm1d = Km1/Km2;
00180     mkpd = kp/(Km2*phi_E2F1);
00181     mphi_r = phi_pRb/phi_E2F1;
00182     mphi_i = phi_CycDi/phi_E2F1;
00183     mphi_j = phi_CycDa/phi_E2F1;
00184     mphi_p = phi_pRbp/phi_E2F1;
00185     ma2d = a2/phi_E2F1;
00186     ma3d = a3*APC_Total/phi_E2F1;
00187     ma4d = a4*WntMax/phi_E2F1;
00188     ma5d = a5/phi_E2F1;
00189     mk16d = k16*Km4/phi_E2F1;
00190     mk61d = k61/phi_E2F1;
00191     mPhiE2F1 = phi_E2F1;
00192 }
00193 
00194 void WntCellCycleOdeSystem::EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY)
00195 {
00196     double r = rY[0];
00197     double e = rY[1];
00198     double i = rY[2];
00199     double j = rY[3];
00200     double p = rY[4];
00201     double c = rY[5];
00202     double b1 = rY[6];
00203     double b2 = rY[7];
00204     double wnt_level = rY[8];
00205 
00206     double dx1 = 0.0;
00207     double dx2 = 0.0;
00208     double dx3 = 0.0;
00209     double dx4 = 0.0;
00210     double dx5 = 0.0;
00211     double dx6 = 0.0;
00212     double dx7 = 0.0;
00213     double dx8 = 0.0;
00214 
00215     /*
00216      * The variables are
00217      * 1. r = pRb
00218      * 2. e = E2F1
00219      * 3. i = CycD (inactive)
00220      * 4. j = CycD (active)
00221      * 5. p = pRb-p
00222      * 6. c = APC (Active)
00223      * 7. b = Beta-Catenin
00224     */
00225 
00226     // Bit back-to-front, but work out the Wnt section first...
00227 
00228     // Mutations take effect by altering the level of beta-catenin
00229     if (!mpMutationState)
00230     {
00231         // No mutations specified
00232     }
00233     else if (mpMutationState->IsType<ApcOneHitCellMutationState>()) // APC +/-
00234     {
00235         dx6 = ma5d*(1.0-c) - ma4d*wnt_level*c;
00236         dx7 = ma2d*(0.5-b1) - 0.5*ma3d*b1*c;
00237         dx8 = ma2d*(0.5-b2) - 0.5*ma3d*b2*c;
00238     }
00239     else if (mpMutationState->IsType<ApcTwoHitCellMutationState>()) // APC -/-
00240     {
00241         dx6 = 0.0;
00242         dx7 = ma2d*(0.5-b1);
00243         dx8 = ma2d*(0.5-b2);
00244     }
00245     else if (mpMutationState->IsType<BetaCateninOneHitCellMutationState>()) // Beta-Cat D45
00246     {
00247         dx6 = ma5d*(1.0-c) - ma4d*wnt_level*c;
00248         dx7 = ma2d*(0.5-b1) - ma3d*b1*c;
00249         dx8 = ma2d*(0.5-b2);
00250     }
00251     else
00252     {
00253         // da
00254         dx6 = ma5d*(1.0-c) - ma4d*wnt_level*c;
00255         // db
00256         dx7 = ma2d*(0.5-b1) - ma3d*b1*c;
00257         dx8 = ma2d*(0.5-b2) - ma3d*b2*c;
00258     }
00259 
00260     // Now the cell cycle stuff...
00261 
00262     // dr
00263     dx1 = e/(mKm1d+e)*mJ11d/(mJ11d+r)*mJ61d/(mJ61d+p) - mk16d*r*j+mk61d*p-mphi_r*r;
00264     // de
00265     dx2 = mkpd+mk2d*(mad*mad+e*e)/(1+e*e)*mJ12d/(mJ12d+r)*mJ62d/(mJ62d+p) - e;
00266     // di
00267     dx3 = mk3d*(b1+b2) + mk23d*e*mJ13d/(mJ13d+r)*mJ63d/(mJ63d+p) + mk43d*j - mk34d*i*j/(1+j) - mphi_i*i;
00268     // dj
00269     dx4 = mk34d*i*j/(1+j) - (mk43d+mphi_j)*j;
00270     // dp
00271     dx5 = mk16d*r*j - mk61d*p - mphi_p*p;
00272 
00273     double factor = mPhiE2F1*60.0;  // convert non-dimensional d/dt s to d/dt in hours
00274 
00275     rDY[0] = dx1*factor;
00276     rDY[1] = dx2*factor;
00277     rDY[2] = dx3*factor;
00278     rDY[3] = dx4*factor;
00279     rDY[4] = dx5*factor;
00280     rDY[5] = dx6*factor;
00281     rDY[6] = dx7*factor; // beta-cat allele 1
00282     rDY[7] = dx8*factor; // beta-cat allele 2
00283     rDY[8] = 0.0; // do not change the Wnt level
00284 }
00285 
00286 const boost::shared_ptr<AbstractCellMutationState> WntCellCycleOdeSystem::GetMutationState() const
00287 {
00288     return mpMutationState;
00289 }
00290 
00291 bool WntCellCycleOdeSystem::CalculateStoppingEvent(double time, const std::vector<double>& rY)
00292 {
00293     double r = rY[0];
00294     double e = rY[1];
00295     double p = rY[4];
00296     double dY1 = mkpd+mk2d*(mad*mad+e*e)/(1+e*e)*mJ12d/(mJ12d+r)*mJ62d/(mJ62d+p) - e;
00297     double factor = mPhiE2F1*60.0;  // Convert non-dimensional d/dt s to d/dt in hours.
00298     dY1 = dY1*factor;
00299 
00300     assert(!std::isnan(rY[1]));
00301     assert(!std::isnan(dY1));
00302     return (rY[1] > 1.0 && dY1 > 0.0);
00303 }
00304 
00305 double WntCellCycleOdeSystem::CalculateRootFunction(double time, const std::vector<double>& rY)
00306 {
00307     return rY[1] - 1.0;
00308 }
00309 
00310 template<>
00311 void CellwiseOdeSystemInformation<WntCellCycleOdeSystem>::Initialise()
00312 {
00313     this->mVariableNames.push_back("pRb");
00314     this->mVariableUnits.push_back("non_dim");
00315     this->mInitialConditions.push_back(7.357000000000000e-01);
00316 
00317     this->mVariableNames.push_back("E2F1");
00318     this->mVariableUnits.push_back("non_dim");
00319     this->mInitialConditions.push_back(1.713000000000000e-01);
00320 
00321     this->mVariableNames.push_back("CycD_i");
00322     this->mVariableUnits.push_back("non_dim");
00323     this->mInitialConditions.push_back(6.900000000000001e-02);
00324 
00325     this->mVariableNames.push_back("CycD_a");
00326     this->mVariableUnits.push_back("non_dim");
00327     this->mInitialConditions.push_back(3.333333333333334e-03);
00328 
00329     this->mVariableNames.push_back("pRb_p");
00330     this->mVariableUnits.push_back("non_dim");
00331     this->mInitialConditions.push_back(1.000000000000000e-04);
00332 
00333     this->mVariableNames.push_back("APC");
00334     this->mVariableUnits.push_back("non_dim");
00335     this->mInitialConditions.push_back(NAN); // will be filled in later
00336 
00337     this->mVariableNames.push_back("Beta_Cat1");
00338     this->mVariableUnits.push_back("non_dim");
00339     this->mInitialConditions.push_back(NAN); // will be filled in later
00340 
00341     this->mVariableNames.push_back("Beta_Cat2");
00342     this->mVariableUnits.push_back("non_dim");
00343     this->mInitialConditions.push_back(NAN); // will be filled in later
00344 
00345     this->mVariableNames.push_back("Wnt");
00346     this->mVariableUnits.push_back("non_dim");
00347     this->mInitialConditions.push_back(NAN); // will be filled in later
00348 
00349     this->mInitialised = true;
00350 }
00351 
00352 double WntCellCycleOdeSystem::GetWntLevel() const
00353 {
00354     return mWntLevel;
00355 }
00356 
00357 // Serialization for Boost >= 1.36
00358 #include "SerializationExportWrapperForCpp.hpp"
00359 CHASTE_CLASS_EXPORT(WntCellCycleOdeSystem)

Generated by  doxygen 1.6.2