Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aevol-eukaryotes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LUISELLI Juliette
aevol-eukaryotes
Commits
3cccb8a0
Commit
3cccb8a0
authored
1 year ago
by
LUISELLI Juliette
Browse files
Options
Downloads
Patches
Plain Diff
adapt the init() of ReplicationReport to the eukaryotic case
parent
3fa3dda5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/libaevol/io/ReplicationReport.cpp
+31
-0
31 additions, 0 deletions
src/libaevol/io/ReplicationReport.cpp
src/libaevol/io/ReplicationReport.h
+16
-0
16 additions, 0 deletions
src/libaevol/io/ReplicationReport.h
src/libaevol/io/Tree.cpp
+13
-4
13 additions, 4 deletions
src/libaevol/io/Tree.cpp
with
60 additions
and
4 deletions
src/libaevol/io/ReplicationReport.cpp
+
31
−
0
View file @
3cccb8a0
...
@@ -215,6 +215,36 @@ void ReplicationReport::init(Individual* offspring, Individual* parent, int indi
...
@@ -215,6 +215,36 @@ void ReplicationReport::init(Individual* offspring, Individual* parent, int indi
mean_align_score_
=
0.0
;
mean_align_score_
=
0.0
;
}
}
#ifdef __EUKARYOTE
void
ReplicationReport
::
init
(
Individual_7
*
offspring
,
Individual_7
*
parent1
,
Individual_7
*
parent2
,
int
indiv_id
,
int
parent1_id
,
int
parent2_id
){
dna_replic_report_
.
clear
();
simd_indiv_
=
offspring
;
id_
=
(
unsigned
long
long
)
indiv_id
;
parent_id_
=
(
unsigned
long
long
)
parent1_id
;
parent2_id_
=
(
unsigned
long
long
)
parent2_id
;
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_
=
parent1
->
metaerror
;
parent_secretion_error_
=
0.0
;
parent_genome_size_
=
parent1
->
dna_length
();
mean_align_score_
=
0.0
;
parent2_metabolic_error_
=
parent2
->
metaerror
;
parent2_secretion_error_
=
0.0
;
parent2_genome_size_
=
parent2
->
dna_length
();
}
#else
void
ReplicationReport
::
init
(
Individual_7
*
offspring
,
void
ReplicationReport
::
init
(
Individual_7
*
offspring
,
Individual_7
*
parent
,
Individual_7
*
parent
,
int
indiv_id
,
int
indiv_id
,
...
@@ -246,6 +276,7 @@ void ReplicationReport::init(Individual_7* offspring,
...
@@ -246,6 +276,7 @@ void ReplicationReport::init(Individual_7* offspring,
dna_replic_report_
.
clear
();
dna_replic_report_
.
clear
();
}
}
#endif
/**
/**
* Method called at the end of the replication of an individual.
* Method called at the end of the replication of an individual.
...
...
This diff is collapsed.
Click to expand it.
src/libaevol/io/ReplicationReport.h
+
16
−
0
View file @
3cccb8a0
...
@@ -138,10 +138,17 @@ class ReplicationReport : public Observer {
...
@@ -138,10 +138,17 @@ class ReplicationReport : public Observer {
void
signal_end_of_replication
(
Individual
*
indiv
);
void
signal_end_of_replication
(
Individual
*
indiv
);
#endif
#endif
#ifdef __EUKARYOTE
void
init
(
Individual_7
*
offspring
,
Individual_7
*
parent1
,
Individual_7
*
parent2
,
int
indiv_id
,
int
parent1_id
,
int
parent2_id
);
#else
void
init
(
Individual_7
*
offspring
,
void
init
(
Individual_7
*
offspring
,
Individual_7
*
parent
,
Individual_7
*
parent
,
int
indiv_id
,
int
indiv_id
,
int
parent_id
);
int
parent_id
);
#endif
void
signal_end_of_replication
(
Individual_7
*
indiv
);
void
signal_end_of_replication
(
Individual_7
*
indiv
);
void
signal_end_of_generation
();
void
signal_end_of_generation
();
...
@@ -154,6 +161,9 @@ class ReplicationReport : public Observer {
...
@@ -154,6 +161,9 @@ class ReplicationReport : public Observer {
unsigned
long
long
id_
=
0
;
unsigned
long
long
id_
=
0
;
unsigned
long
long
parent_id_
=
0
;
unsigned
long
long
parent_id_
=
0
;
#ifdef __EUKARYOTE
unsigned
long
long
parent2_id_
=
0
;
#endif
protected
:
protected
:
// =================================================================
// =================================================================
...
@@ -186,6 +196,12 @@ Individual* indiv_ = nullptr;
...
@@ -186,6 +196,12 @@ Individual* indiv_ = nullptr;
double
parent_secretion_error_
=
-
1
;
double
parent_secretion_error_
=
-
1
;
int32_t
parent_genome_size_
=
-
1
;
int32_t
parent_genome_size_
=
-
1
;
#ifdef __EUKARYOTE
double
parent2_metabolic_error_
=
-
1
;
double
parent2_secretion_error_
=
-
1
;
int32_t
parent2_genome_size_
=
-
1
;
#endif
int32_t
donor_id_
=
-
1
;
int32_t
donor_id_
=
-
1
;
double
donor_metabolic_error_
=
-
1
;
double
donor_metabolic_error_
=
-
1
;
double
donor_secretion_error_
=
-
1
;
double
donor_secretion_error_
=
-
1
;
...
...
This diff is collapsed.
Click to expand it.
src/libaevol/io/Tree.cpp
+
13
−
4
View file @
3cccb8a0
...
@@ -199,9 +199,14 @@ Tree::~Tree() noexcept {
...
@@ -199,9 +199,14 @@ Tree::~Tree() noexcept {
}
}
void
Tree
::
update_new_indiv
(
NewIndivEvent
*
evt
)
{
void
Tree
::
update_new_indiv
(
NewIndivEvent
*
evt
)
{
replics_
[
Utils
::
mod
(
AeTime
::
time
()
-
1
,
tree_step_
)]
#ifdef __EUKARYOTE
[
evt
->
x
*
exp_manager
->
grid_height
()
+
evt
->
y
]
->
init
(
replics_
[
Utils
::
mod
(
AeTime
::
time
()
-
1
,
tree_step_
)][
evt
->
x
*
exp_manager
->
grid_height
()
+
evt
->
y
]
->
init
(
evt
->
simd_child
,
evt
->
simd_parent
,
evt
->
simd_parent2
,
evt
->
indiv_id_
,
evt
->
parent_id_
,
evt
->
parent2_id_
);
#else
replics_
[
Utils
::
mod
(
AeTime
::
time
()
-
1
,
tree_step_
)][
evt
->
x
*
exp_manager
->
grid_height
()
+
evt
->
y
]
->
init
(
evt
->
simd_child
,
evt
->
simd_parent
,
evt
->
indiv_id_
,
evt
->
parent_id_
);
evt
->
simd_child
,
evt
->
simd_parent
,
evt
->
indiv_id_
,
evt
->
parent_id_
);
#endif
}
}
void
Tree
::
update_end_replication
(
EndReplicationEvent
*
evt
)
{
void
Tree
::
update_end_replication
(
EndReplicationEvent
*
evt
)
{
...
@@ -221,9 +226,13 @@ void Tree::update(Observable&, ObservableEvent e, void* arg) {
...
@@ -221,9 +226,13 @@ void Tree::update(Observable&, ObservableEvent e, void* arg) {
// Initialize the replication report corresponding to the new individual
// Initialize the replication report corresponding to the new individual
auto
ievent
=
reinterpret_cast
<
NewIndivEvent
*>
(
arg
);
auto
ievent
=
reinterpret_cast
<
NewIndivEvent
*>
(
arg
);
replics_
[
Utils
::
mod
(
AeTime
::
time
()
-
1
,
tree_step_
)]
#ifdef __EUKARYOTE
[
ievent
->
x
*
exp_manager
->
grid_height
()
+
ievent
->
y
]
->
init
(
replics_
[
Utils
::
mod
(
AeTime
::
time
()
-
1
,
tree_step_
)][
ievent
->
x
*
exp_manager
->
grid_height
()
+
ievent
->
y
]
->
init
(
ievent
->
simd_child
,
ievent
->
simd_parent
,
ievent
->
simd_parent2
,
ievent
->
indiv_id_
,
ievent
->
parent_id_
,
ievent
->
parent2_id_
);
#else
replics_
[
Utils
::
mod
(
AeTime
::
time
()
-
1
,
tree_step_
)][
ievent
->
x
*
exp_manager
->
grid_height
()
+
ievent
->
y
]
->
init
(
ievent
->
simd_child
,
ievent
->
simd_parent
,
ievent
->
indiv_id_
,
ievent
->
parent_id_
);
ievent
->
simd_child
,
ievent
->
simd_parent
,
ievent
->
indiv_id_
,
ievent
->
parent_id_
);
#endif
break
;
break
;
}
}
case
END_GENERATION
:
{
case
END_GENERATION
:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment