WntCellCycleOdeSystem.cpp

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

Generated by  doxygen 1.6.2