tumopp: Tumor growth simulator in C++
|
Cancer cell. More...
#include <cell.hpp>
Public Types | |
using | param_type = CellParams |
Alias. | |
Public Member Functions | |
Cell ()=default | |
Default constructor. | |
Cell (const coord_t &v, unsigned i, std::shared_ptr< EventRates > er=std::make_shared< EventRates >()) noexcept | |
Constructor for first cells. | |
Cell (const Cell &other) noexcept | |
Copy constructor. | |
~Cell () noexcept=default | |
Destructor. | |
Cell & | operator= (const Cell &)=delete |
Copy assignment operator. | |
Cell (Cell &&other)=default | |
Move constructor. | |
Cell & | operator= (Cell &&)=default |
Move assignment operator. | |
std::string | mutate (urbg_t &) |
driver mutation | |
std::string | force_mutate (urbg_t &) |
driver mutation on all traits | |
double | delta_time (urbg_t &, double now, double positional_value, bool surrounded=false) |
Calc dt and set next_event_. | |
void | differentiate (urbg_t &) |
Change proliferation_capacity_ stochastically. | |
void | set_time_of_birth (double t, unsigned i, const std::shared_ptr< Cell > &ancestor) noexcept |
Set time_of_birth_; reset other properties. | |
void | set_cycle_dependent_death (urbg_t &, double death_prob) |
Set event_rates_->death_prob and next_event_. | |
void | increase_death_rate () noexcept |
Increase event_rates_->death_rate to birth_rate() for simulating Moran-like situation. | |
bool | is_differentiated () const noexcept |
Check proliferation_capacity_. | |
Setter functions | |
void | add_coord (const coord_t &direction) noexcept |
Add to coord_. | |
void | set_coord (const coord_t &v) noexcept |
Set coord_. | |
void | set_coord (coord_t &&v) noexcept |
Set coord_. | |
void | set_time_of_death (double t) noexcept |
Set time_of_death_. | |
Getter functions | |
static param_type | PARAM_ |
Parameters shared among instances. | |
std::shared_ptr< Cell > | ancestor_ |
pointer to the ancestor | |
std::shared_ptr< EventRates > | event_rates_ |
Set of event rates (copy-on-write) | |
double | time_of_birth_ = 0.0 |
time of birth | |
double | time_of_death_ = 0.0 |
time of death | |
coord_t | coord_ = {} |
Position in a tumor. | |
unsigned | id_ |
ID. | |
int8_t | proliferation_capacity_ = -1 |
\(\omega\); stem cell if negative | |
Event | next_event_ = Event::birth |
next event: birth, death, or migration | |
double | birth_rate () const noexcept |
Get EventRates.birth_rate. | |
double | death_rate () const noexcept |
Get EventRates.death_rate. | |
double | death_prob () const noexcept |
Get EventRates.death_prob. | |
double | migration_rate () const noexcept |
Get EventRates.migration_rate. | |
Event | next_event () const noexcept |
Get next_event_. | |
const coord_t & | coord () const noexcept |
Get coord_. | |
std::ostream & | write (std::ostream &ost) const |
TSV. | |
std::ostream & | traceback (std::ostream &ost, std::unordered_set< unsigned > *done) const |
Write TSV while tracing back ancestor_ recursively. | |
static const char * | header () |
TSV header. | |
static void | param (const param_type &p) |
Set PARAM_. | |
static const param_type & | param () |
Get PARAM_. | |
std::ostream & | operator<< (std::ostream &ost, const Cell &x) |
Stream operator for debug print. | |
Cancer cell.