SimpleOxygenBasedCellCycleModel.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "SimpleOxygenBasedCellCycleModel.hpp"
00030 #include "RandomNumberGenerator.hpp"
00031 #include "ApoptoticCellProperty.hpp"
00032 #include "CellPropertyRegistry.hpp"
00033 #include "Exception.hpp"
00034
00035 SimpleOxygenBasedCellCycleModel::SimpleOxygenBasedCellCycleModel()
00036 : mTimeSpentInG1Phase(0.0),
00037 mCurrentHypoxicDuration(0.0),
00038 mHypoxicConcentration(0.4),
00039 mQuiescentConcentration(1.0),
00040 mCriticalHypoxicDuration(2.0)
00041 {
00042 mCurrentHypoxiaOnsetTime = SimulationTime::Instance()->GetTime();
00043 }
00044
00045 double SimpleOxygenBasedCellCycleModel::GetCurrentHypoxicDuration()
00046 {
00047 return mCurrentHypoxicDuration;
00048 }
00049
00050 double SimpleOxygenBasedCellCycleModel::GetCurrentHypoxiaOnsetTime()
00051 {
00052 return mCurrentHypoxiaOnsetTime;
00053 }
00054
00055 void SimpleOxygenBasedCellCycleModel::UpdateCellCyclePhase()
00056 {
00057
00058
00059 bool cell_is_apoptotic = mpCell->HasCellProperty<ApoptoticCellProperty>();
00060
00061 if (!cell_is_apoptotic)
00062 {
00063 UpdateHypoxicDuration();
00064
00065
00066 double oxygen_concentration;
00067 switch (mDimension)
00068 {
00069 case 1:
00070 {
00071 const unsigned DIM = 1;
00072 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00073 break;
00074 }
00075 case 2:
00076 {
00077 const unsigned DIM = 2;
00078 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00079 break;
00080 }
00081 case 3:
00082 {
00083 const unsigned DIM = 3;
00084 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00085 break;
00086 }
00087
00088 default:
00089 NEVER_REACHED;
00090 }
00091
00092 AbstractSimpleCellCycleModel::UpdateCellCyclePhase();
00093
00094 if (mCurrentCellCyclePhase == G_ONE_PHASE)
00095 {
00096
00097 double dt = SimulationTime::Instance()->GetTimeStep();
00098
00099 if (oxygen_concentration < mQuiescentConcentration)
00100 {
00101 mG1Duration += (1 - std::max(oxygen_concentration, 0.0)/mQuiescentConcentration)*dt;
00102 mTimeSpentInG1Phase += dt;
00103 }
00104 }
00105 }
00106 }
00107
00108 AbstractCellCycleModel* SimpleOxygenBasedCellCycleModel::CreateCellCycleModel()
00109 {
00110
00111 SimpleOxygenBasedCellCycleModel* p_model = new SimpleOxygenBasedCellCycleModel();
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126 p_model->SetBirthTime(mBirthTime);
00127 p_model->SetDimension(mDimension);
00128 p_model->SetCellProliferativeType(mCellProliferativeType);
00129 p_model->SetMinimumGapDuration(mMinimumGapDuration);
00130 p_model->SetStemCellG1Duration(mStemCellG1Duration);
00131 p_model->SetTransitCellG1Duration(mTransitCellG1Duration);
00132 p_model->SetSDuration(mSDuration);
00133 p_model->SetG2Duration(mG2Duration);
00134 p_model->SetMDuration(mMDuration);
00135 p_model->SetHypoxicConcentration(mHypoxicConcentration);
00136 p_model->SetQuiescentConcentration(mQuiescentConcentration);
00137 p_model->SetCriticalHypoxicDuration(mCriticalHypoxicDuration);
00138 p_model->SetCurrentHypoxiaOnsetTime(mCurrentHypoxiaOnsetTime);
00139
00140 return p_model;
00141 }
00142
00143 void SimpleOxygenBasedCellCycleModel::UpdateHypoxicDuration()
00144 {
00145 assert(!(mpCell->HasCellProperty<ApoptoticCellProperty>()));
00146 assert(!mpCell->HasApoptosisBegun());
00147
00148
00149 double oxygen_concentration;
00150 switch (mDimension)
00151 {
00152 case 1:
00153 {
00154 const unsigned DIM = 1;
00155 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00156 break;
00157 }
00158 case 2:
00159 {
00160 const unsigned DIM = 2;
00161 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00162 break;
00163 }
00164 case 3:
00165 {
00166 const unsigned DIM = 3;
00167 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00168 break;
00169 }
00170 default:
00171 NEVER_REACHED;
00172 }
00173
00174 if (oxygen_concentration < mHypoxicConcentration)
00175 {
00176
00177 mCurrentHypoxicDuration = (SimulationTime::Instance()->GetTime() - mCurrentHypoxiaOnsetTime);
00178
00179
00180 double prob_of_death = 0.9 - 0.5*(oxygen_concentration/mHypoxicConcentration);
00181 if (mCurrentHypoxicDuration > mCriticalHypoxicDuration && RandomNumberGenerator::Instance()->ranf() < prob_of_death)
00182 {
00183 mpCell->AddCellProperty(CellPropertyRegistry::Instance()->Get<ApoptoticCellProperty>());
00184 }
00185 }
00186 else
00187 {
00188
00189 mCurrentHypoxicDuration = 0.0;
00190 mCurrentHypoxiaOnsetTime = SimulationTime::Instance()->GetTime();
00191 }
00192 }
00193
00194 double SimpleOxygenBasedCellCycleModel::GetHypoxicConcentration()
00195 {
00196 return mHypoxicConcentration;
00197 }
00198
00199 void SimpleOxygenBasedCellCycleModel::SetHypoxicConcentration(double hypoxicConcentration)
00200 {
00201 assert(hypoxicConcentration<=1.0);
00202 assert(hypoxicConcentration>=0.0);
00203 mHypoxicConcentration = hypoxicConcentration;
00204 }
00205
00206 double SimpleOxygenBasedCellCycleModel::GetQuiescentConcentration()
00207 {
00208 return mQuiescentConcentration;
00209 }
00210
00211 void SimpleOxygenBasedCellCycleModel::SetQuiescentConcentration(double quiescentConcentration)
00212 {
00213 assert(quiescentConcentration <= 1.0);
00214 assert(quiescentConcentration >= 0.0);
00215 mQuiescentConcentration = quiescentConcentration;
00216 }
00217
00218 double SimpleOxygenBasedCellCycleModel::GetCriticalHypoxicDuration()
00219 {
00220 return mCriticalHypoxicDuration;
00221 }
00222
00223 void SimpleOxygenBasedCellCycleModel::SetCriticalHypoxicDuration(double criticalHypoxicDuration)
00224 {
00225 assert(criticalHypoxicDuration >= 0.0);
00226 mCriticalHypoxicDuration = criticalHypoxicDuration;
00227 }
00228
00229 void SimpleOxygenBasedCellCycleModel::SetCurrentHypoxiaOnsetTime(double currentHypoxiaOnsetTime)
00230 {
00231 assert(currentHypoxiaOnsetTime >= 0.0);
00232 mCurrentHypoxiaOnsetTime = currentHypoxiaOnsetTime;
00233 }
00234
00235 void SimpleOxygenBasedCellCycleModel::OutputCellCycleModelParameters(out_stream& rParamsFile)
00236 {
00237 *rParamsFile << "\t\t\t<HypoxicConcentration>" << mHypoxicConcentration << "</HypoxicConcentration>\n";
00238 *rParamsFile << "\t\t\t<QuiescentConcentration>" << mQuiescentConcentration << "</QuiescentConcentration>\n";
00239 *rParamsFile << "\t\t\t<CriticalHypoxicDuration>" << mCriticalHypoxicDuration << "</CriticalHypoxicDuration>\n";
00240
00241
00242 AbstractSimpleCellCycleModel::OutputCellCycleModelParameters(rParamsFile);
00243 }
00244
00245
00246 #include "SerializationExportWrapperForCpp.hpp"
00247 CHASTE_CLASS_EXPORT(SimpleOxygenBasedCellCycleModel)