00001 /* 00002 00003 Copyright (C) University of Oxford, 2005-2009 00004 00005 University of Oxford means the Chancellor, Masters and Scholars of the 00006 University of Oxford, having an administrative office at Wellington 00007 Square, Oxford OX1 2JD, UK. 00008 00009 This file is part of Chaste. 00010 00011 Chaste is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU Lesser General Public License as published 00013 by the Free Software Foundation, either version 2.1 of the License, or 00014 (at your option) any later version. 00015 00016 Chaste is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00019 License for more details. The offer of Chaste under the terms of the 00020 License is subject to the License being interpreted in accordance with 00021 English Law and subject to any action against the University of Oxford 00022 being under the jurisdiction of the English Courts. 00023 00024 You should have received a copy of the GNU Lesser General Public License 00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>. 00026 00027 */ 00028 #include "SimpleWntCellCycleModel.hpp" 00029 00030 00031 SimpleWntCellCycleModel::SimpleWntCellCycleModel(double g1Duration, 00032 bool useCellTypeDependentG1Duration) 00033 : AbstractSimpleCellCycleModel(g1Duration), 00034 mUseCellTypeDependentG1Duration(useCellTypeDependentG1Duration) 00035 { 00036 } 00037 00038 00039 SimpleWntCellCycleModel::SimpleWntCellCycleModel(bool useCellTypeDependentG1Duration) 00040 : mUseCellTypeDependentG1Duration(useCellTypeDependentG1Duration) 00041 { 00042 } 00043 00044 00045 AbstractCellCycleModel* SimpleWntCellCycleModel::CreateDaughterCellCycleModel() 00046 { 00047 // Use a private constructor that doesn't reset mG1Duration 00048 return new SimpleWntCellCycleModel(mG1Duration, mUseCellTypeDependentG1Duration); 00049 } 00050 00051 00052 void SimpleWntCellCycleModel::SetG1Duration() 00053 { 00054 assert(mpCell!=NULL); 00055 00056 CancerParameters* p_params = CancerParameters::Instance(); 00057 RandomNumberGenerator* p_gen = RandomNumberGenerator::Instance(); 00058 00059 switch (mpCell->GetCellType()) 00060 { 00061 case STEM: 00062 if (mUseCellTypeDependentG1Duration) 00063 { 00064 mG1Duration = p_gen->NormalRandomDeviate(p_params->GetStemCellG1Duration(), 1.0); 00065 } 00066 else 00067 { 00068 // Normally stem cells should behave just like transit cells in a Wnt simulation 00069 mG1Duration = p_gen->NormalRandomDeviate(p_params->GetTransitCellG1Duration(), 1.0); 00070 } 00071 break; 00072 case TRANSIT: 00073 mG1Duration = p_gen->NormalRandomDeviate(p_params->GetTransitCellG1Duration(), 1.0); 00074 break; 00075 case DIFFERENTIATED: 00076 mG1Duration = DBL_MAX; 00077 break; 00078 default: 00079 NEVER_REACHED; 00080 } 00081 00082 // Check that the normal random deviate has not returned a small or negative G1 duration 00083 if (mG1Duration < p_params->GetMinimumGapDuration()) 00084 { 00085 mG1Duration = p_params->GetMinimumGapDuration(); 00086 } 00087 } 00088 00089 00090 void SimpleWntCellCycleModel::UpdateCellCyclePhase() 00091 { 00092 CancerParameters* p_params = CancerParameters::Instance(); 00093 WntConcentration* p_wnt = WntConcentration::Instance(); 00094 00095 // The cell is of type STEM if the Wnt concentration > wnt_stem_cell_threshold 00096 double wnt_stem_cell_threshold = DBL_MAX; 00097 00098 // The cell can divide if the Wnt concentration >= wnt_division_threshold 00099 double wnt_division_threshold = DBL_MAX; 00100 double healthy_threshold = p_params->GetWntTransitThreshold(); 00101 00102 /* 00103 * In the case of a RADIAL Wnt concentration, set up under what level 00104 * of Wnt stimulus a cell will change type 00105 */ 00106 if (p_wnt->GetType()==RADIAL) 00107 { 00108 wnt_stem_cell_threshold = p_params->GetWntStemThreshold(); 00109 } 00110 00111 // Set up under what level of Wnt stimulus a cell will divide 00112 switch (mpCell->GetMutationState()) 00113 { 00114 case HEALTHY: 00115 wnt_division_threshold = healthy_threshold; 00116 break; 00117 case LABELLED: 00118 wnt_division_threshold = healthy_threshold; 00119 break; 00120 case APC_ONE_HIT: // should be less than healthy values 00121 wnt_division_threshold = 0.77*healthy_threshold; 00122 break; 00123 case BETA_CATENIN_ONE_HIT: // less than above value 00124 wnt_division_threshold = 0.155*healthy_threshold; 00125 break; 00126 case APC_TWO_HIT: // should be zero (no Wnt-dependence) 00127 wnt_division_threshold = 0.0; 00128 break; 00129 default: 00130 NEVER_REACHED; 00131 } 00132 00133 /* 00134 * If the Wnt stimulus exceeds the threshold, the cell is 00135 * of type TRANSIT, and hence its cell cycle phase depends 00136 * on its age, just as in AbstractSimpleCellCycleModel. 00137 */ 00138 if (p_wnt->GetWntLevel(mpCell) >= wnt_division_threshold) 00139 { 00140 CellType cell_type = TRANSIT; 00141 00142 if (p_wnt->GetType()==RADIAL) 00143 { 00144 if (p_wnt->GetWntLevel(mpCell) > wnt_stem_cell_threshold) 00145 { 00146 cell_type = STEM; 00147 } 00148 } 00149 00150 // Update the cell type to reflect the Wnt concentration 00151 mpCell->SetCellType(cell_type); 00152 00153 AbstractSimpleCellCycleModel::UpdateCellCyclePhase(); 00154 } 00155 else 00156 { 00157 /* 00158 * If the Wnt stimulus is below the threshold, the cell is 00159 * of type DIFFERENTIATED and hence in G0 phase 00160 */ 00161 mpCell->SetCellType(DIFFERENTIATED); 00162 mCurrentCellCyclePhase = G_ZERO_PHASE; 00163 } 00164 } 00165 00166 00167 void SimpleWntCellCycleModel::ResetForDivision() 00168 { 00169 AbstractSimpleCellCycleModel::ResetForDivision(); 00170 } 00171 00172 00173 void SimpleWntCellCycleModel::InitialiseDaughterCell() 00174 { 00175 if (WntConcentration::Instance()->GetType()==RADIAL) 00176 { 00177 mpCell->SetCellType(TRANSIT); 00178 } 00179 AbstractSimpleCellCycleModel::InitialiseDaughterCell(); 00180 }