Commit 798dd9f8 authored by TURPIN Laurent's avatar TURPIN Laurent
Browse files

[Modularize] Stop recording stats in rep-reports

In ReplicationReport, remove attributes that correspond to statistics of
individual that can be recomputed by reading the genome. A major problem
was also when recording Trees, if statistics was not computed, the
values are completely wrong. Finally, checking if execution is
repeatable, the contant of tree files might change according to a spooky
and hardly predictable state (AEVOL_NO_STATS)
parent 708920ac
......@@ -70,11 +70,6 @@ ReplicationReport::ReplicationReport(const ReplicationReport& other) :
genome_size_ = other.genome_size_;
metabolic_error_ = other.metabolic_error_;
nb_genes_activ_ = other.nb_genes_activ_;
nb_genes_inhib_ = other.nb_genes_inhib_;
nb_non_fun_genes_ = other.nb_non_fun_genes_;
nb_coding_RNAs_ = other.nb_coding_RNAs_;
nb_non_coding_RNAs_ = other.nb_non_coding_RNAs_;
parent_metabolic_error_ = other.parent_metabolic_error_;
parent_secretion_error_ = other.parent_secretion_error_;
......@@ -92,11 +87,6 @@ ReplicationReport::ReplicationReport(gzFile tree_file) {
gzread(tree_file, &genome_size_, sizeof(genome_size_));
gzread(tree_file, &metabolic_error_, sizeof(metabolic_error_));
gzread(tree_file, &nb_genes_activ_, sizeof(nb_genes_activ_));
gzread(tree_file, &nb_genes_inhib_, sizeof(nb_genes_inhib_));
gzread(tree_file, &nb_non_fun_genes_, sizeof(nb_non_fun_genes_));
gzread(tree_file, &nb_coding_RNAs_, sizeof(nb_coding_RNAs_));
gzread(tree_file, &nb_non_coding_RNAs_, sizeof(nb_non_coding_RNAs_));
dna_replic_report_.read_from_tree_file(tree_file);
......@@ -139,11 +129,6 @@ void ReplicationReport::init(Individual_7* offspring,
genome_size_ = 0;
metabolic_error_ = 0.0;
nb_genes_activ_ = 0;
nb_genes_inhib_ = 0;
nb_non_fun_genes_ = 0;
nb_coding_RNAs_ = 0;
nb_non_coding_RNAs_ = 0;
parent_metabolic_error_ = parent->metaerror;
parent_secretion_error_ = 0.0;
......@@ -169,11 +154,6 @@ void ReplicationReport::signal_end_of_replication(Individual_7* indiv) {
// Retrieve data from the individual
genome_size_ = simd_indiv_->dna_->length();
metabolic_error_ = simd_indiv_->metaerror;
nb_genes_activ_ = simd_indiv_->nb_genes_activ;
nb_genes_inhib_ = simd_indiv_->nb_genes_inhib;
nb_non_fun_genes_ = simd_indiv_->nb_func_genes;
nb_coding_RNAs_ = simd_indiv_->nb_coding_RNAs;
nb_non_coding_RNAs_ = simd_indiv_->nb_non_coding_RNAs;
}
void ReplicationReport::write_to_tree_file(gzFile tree_file)
......@@ -187,11 +167,6 @@ void ReplicationReport::write_to_tree_file(gzFile tree_file)
gzwrite(tree_file, &genome_size_, sizeof(genome_size_));
gzwrite(tree_file, &metabolic_error_, sizeof(metabolic_error_));
gzwrite(tree_file, &nb_genes_activ_, sizeof(nb_genes_activ_));
gzwrite(tree_file, &nb_genes_inhib_, sizeof(nb_genes_inhib_));
gzwrite(tree_file, &nb_non_fun_genes_, sizeof(nb_non_fun_genes_));
gzwrite(tree_file, &nb_coding_RNAs_, sizeof(nb_coding_RNAs_));
gzwrite(tree_file, &nb_non_coding_RNAs_, sizeof(nb_non_coding_RNAs_));
dna_replic_report_.write_to_tree_file(tree_file);
}
......
......@@ -130,11 +130,6 @@ class ReplicationReport{
int32_t genome_size_ = -1;
double metabolic_error_ = -1;
int16_t nb_genes_activ_ = -1;
int16_t nb_genes_inhib_ = -1;
int16_t nb_non_fun_genes_ = -1;
int16_t nb_coding_RNAs_ = -1;
int16_t nb_non_coding_RNAs_ = -1;
// List of each genetic unit's replication report
DnaReplicationReport dna_replic_report_;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment