SimpleWntCellCycleModel.cpp

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(unsigned dimension, bool useCellTypeDependentG1Duration)
00032     : mUseCellTypeDependentG1Duration(useCellTypeDependentG1Duration),
00033       mDimension(dimension)
00034 {
00035 }
00036 
00037 
00038 AbstractCellCycleModel* SimpleWntCellCycleModel::CreateCellCycleModel()
00039 {
00040     return new SimpleWntCellCycleModel(*this);
00041 }
00042 
00043 
00044 unsigned SimpleWntCellCycleModel::GetDimension()
00045 {
00046     return mDimension;
00047 }
00048 
00049 
00050 void SimpleWntCellCycleModel::SetG1Duration()
00051 {
00052     assert(mpCell!=NULL);
00053 
00054     TissueConfig *p_params = TissueConfig::Instance();
00055     RandomNumberGenerator *p_gen = RandomNumberGenerator::Instance();
00056 
00057     switch (mpCell->GetCellType())
00058     {
00059         case STEM:
00060             if (mUseCellTypeDependentG1Duration)
00061             {
00062                 mG1Duration = p_gen->NormalRandomDeviate(p_params->GetStemCellG1Duration(), 1.0);
00063             }
00064             else
00065             {
00066                 // Normally stem cells should behave just like transit cells in a Wnt simulation
00067                 mG1Duration = p_gen->NormalRandomDeviate(p_params->GetTransitCellG1Duration(), 1.0);
00068             }
00069             break;
00070         case TRANSIT:
00071             mG1Duration = p_gen->NormalRandomDeviate(p_params->GetTransitCellG1Duration(), 1.0);
00072             break;
00073         case DIFFERENTIATED:
00074             mG1Duration = DBL_MAX;
00075             break;
00076         default:
00077             NEVER_REACHED;
00078     }
00079 
00080     // Check that the normal random deviate has not returned a small or negative G1 duration
00081     if (mG1Duration < p_params->GetMinimumGapDuration())
00082     {
00083         mG1Duration = p_params->GetMinimumGapDuration();
00084     }
00085 }
00086 
00087 
00088 double SimpleWntCellCycleModel::GetWntLevel()
00089 {
00090     assert(mpCell != NULL);
00091     double level = 0;
00092 
00093     switch (mDimension)
00094     {
00095         case 1:
00096         {
00097             const unsigned DIM = 1;
00098             level = WntConcentration<DIM>::Instance()->GetWntLevel(mpCell);
00099             break;
00100         }
00101         case 2:
00102         {
00103             const unsigned DIM = 2;
00104             level = WntConcentration<DIM>::Instance()->GetWntLevel(mpCell);
00105             break;
00106         }
00107         case 3:
00108         {
00109             const unsigned DIM = 3;
00110             level = WntConcentration<DIM>::Instance()->GetWntLevel(mpCell);
00111             break;
00112         }
00113         default:
00114             NEVER_REACHED;
00115     }
00116     return level;
00117 }
00118 
00119 
00120 WntConcentrationType SimpleWntCellCycleModel::GetWntType()
00121 {
00122     WntConcentrationType wnt_type;
00123     switch (mDimension)
00124     {
00125         case 1:
00126         {
00127             const unsigned DIM = 1;
00128             wnt_type = WntConcentration<DIM>::Instance()->GetType();
00129             break;
00130         }
00131         case 2:
00132         {
00133             const unsigned DIM = 2;
00134             wnt_type = WntConcentration<DIM>::Instance()->GetType();
00135             break;
00136         }
00137         case 3:
00138         {
00139             const unsigned DIM = 3;
00140             wnt_type = WntConcentration<DIM>::Instance()->GetType();
00141             break;
00142         }
00143         default:
00144             NEVER_REACHED;
00145     }
00146     return wnt_type;
00147 }
00148 
00149 
00150 void SimpleWntCellCycleModel::UpdateCellCyclePhase()
00151 {
00152     TissueConfig *p_params = TissueConfig::Instance();
00153 
00154     // The cell can divide if the Wnt concentration >= wnt_division_threshold
00155     double wnt_division_threshold = DBL_MAX;
00156 
00157     // Set up under what level of Wnt stimulus a cell will divide
00158     double healthy_threshold = p_params->GetWntTransitThreshold();
00159     switch (mpCell->GetMutationState())
00160     {
00161         case HEALTHY:
00162             wnt_division_threshold = healthy_threshold;
00163             break;
00164         case LABELLED:
00165             wnt_division_threshold = healthy_threshold;
00166             break;
00167         case APC_ONE_HIT:  // should be less than healthy values
00168             wnt_division_threshold = 0.77*healthy_threshold;
00169             break;
00170         case BETA_CATENIN_ONE_HIT:  // less than above value
00171             wnt_division_threshold = 0.155*healthy_threshold;
00172             break;
00173         case APC_TWO_HIT:  // should be zero (no Wnt-dependence)
00174             wnt_division_threshold = 0.0;
00175             break;
00176         default:
00177             NEVER_REACHED;
00178     }
00179 
00180     double wnt_level = GetWntLevel();
00181     WntConcentrationType wnt_type = GetWntType();
00182 
00183     // Set the cell type to TRANSIT if the Wnt stimulus exceeds wnt_division_threshold
00184     if (wnt_level >= wnt_division_threshold)
00185     {
00186         CellType cell_type = TRANSIT;
00187 
00188         // For a RADIAL Wnt type, override the cell type to STEM if the Wnt stimulus exceeds a higher threshold
00189         if ( (wnt_type == RADIAL) && (wnt_level > p_params->GetWntStemThreshold()) )
00190         {
00191             cell_type = STEM;
00192         }
00193 
00194         mpCell->SetCellType(cell_type);
00195         AbstractSimpleCellCycleModel::UpdateCellCyclePhase();
00196     }
00197     else
00198     {
00199         // The cell is DIFFERENTIATED and so in G0 phase
00200         mpCell->SetCellType(DIFFERENTIATED);
00201         mCurrentCellCyclePhase = G_ZERO_PHASE;
00202     }
00203 }
00204 
00205 
00206 void SimpleWntCellCycleModel::ResetForDivision()
00207 {
00208     AbstractSimpleCellCycleModel::ResetForDivision();
00209 }
00210 
00211 
00212 void SimpleWntCellCycleModel::InitialiseDaughterCell()
00213 {
00214     WntConcentrationType wnt_type = GetWntType();
00215 
00216     if (wnt_type == RADIAL)
00217     {
00218         mpCell->SetCellType(TRANSIT);
00219     }
00220 
00221     AbstractSimpleCellCycleModel::InitialiseDaughterCell();
00222 }

Generated on Tue Aug 4 16:10:21 2009 for Chaste by  doxygen 1.5.5