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
Admin message
GitLab upgrade completed. Current version is 17.11.6.
Show more breadcrumbs
LUISELLI Juliette
aevol-eukaryotes
Commits
ad359c29
"README.md" did not exist on "e6d5df62ed06f2193fde986284a50b7f93a4bd3a"
Commit
ad359c29
authored
5 years ago
by
ROUZAUD-CORNABAS Jonathan
Browse files
Options
Downloads
Patches
Plain Diff
ReplicationReport fixed
parent
6bfa4ee8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libaevol/DnaReplicationReport.h
+1
-1
1 addition, 1 deletion
src/libaevol/DnaReplicationReport.h
src/libaevol/ReplicationReport.cpp
+45
-14
45 additions, 14 deletions
src/libaevol/ReplicationReport.cpp
with
46 additions
and
15 deletions
src/libaevol/DnaReplicationReport.h
+
1
−
1
View file @
ad359c29
...
@@ -47,7 +47,7 @@ class DnaReplicationReport {
...
@@ -47,7 +47,7 @@ class DnaReplicationReport {
// =================================================================
// =================================================================
// Constructors
// Constructors
// =================================================================
// =================================================================
DnaReplicationReport
()
=
default
;
DnaReplicationReport
()
{}
;
DnaReplicationReport
(
const
DnaReplicationReport
&
);
DnaReplicationReport
(
const
DnaReplicationReport
&
);
DnaReplicationReport
(
DnaReplicationReport
&&
)
=
delete
;
DnaReplicationReport
(
DnaReplicationReport
&&
)
=
delete
;
...
...
This diff is collapsed.
Click to expand it.
src/libaevol/ReplicationReport.cpp
+
45
−
14
View file @
ad359c29
...
@@ -63,6 +63,36 @@ namespace aevol {
...
@@ -63,6 +63,36 @@ namespace aevol {
// =================================================================
// =================================================================
// Constructors
// Constructors
// =================================================================
// =================================================================
ReplicationReport
::
ReplicationReport
()
{
indiv_
=
nullptr
;
simd_indiv_
=
nullptr
;
id_
=
0
;
rank_
=
-
1
;
parent_id_
=
0
;
// donor_id_ is set further down
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_
=
-
1
;
parent_secretion_error_
=
-
1
;
parent_genome_size_
=
-
1
;
mean_align_score_
=
0.0
;
donor_id_
=
-
1
;
donor_metabolic_error_
=
0.0
;
donor_secretion_error_
=
0.0
;
donor_genome_size_
=
0
;
}
ReplicationReport
::
ReplicationReport
(
Individual
*
indiv
,
ReplicationReport
::
ReplicationReport
(
Individual
*
indiv
,
const
Individual
*
parent
,
const
Individual
*
parent
,
Individual
*
donor
/*= NULL*/
)
Individual
*
donor
/*= NULL*/
)
...
@@ -106,8 +136,8 @@ ReplicationReport::ReplicationReport(Individual* indiv,
...
@@ -106,8 +136,8 @@ ReplicationReport::ReplicationReport(Individual* indiv,
// Creates an independent copy of the original report
// Creates an independent copy of the original report
ReplicationReport
::
ReplicationReport
(
const
ReplicationReport
&
other
)
:
ReplicationReport
::
ReplicationReport
(
const
ReplicationReport
&
other
)
//
:
dna_replic_report_
(
other
.
dna_replic_report_
)
//
dna_replic_report_(other.dna_replic_report_)
{
{
parent_id_
=
other
.
parent_id_
;
parent_id_
=
other
.
parent_id_
;
donor_id_
=
other
.
donor_id_
;
donor_id_
=
other
.
donor_id_
;
...
@@ -150,9 +180,9 @@ ReplicationReport::ReplicationReport(gzFile tree_file, Individual* indiv)
...
@@ -150,9 +180,9 @@ ReplicationReport::ReplicationReport(gzFile tree_file, Individual* indiv)
gzread
(
tree_file
,
&
nb_coding_RNAs_
,
sizeof
(
nb_coding_RNAs_
));
gzread
(
tree_file
,
&
nb_coding_RNAs_
,
sizeof
(
nb_coding_RNAs_
));
gzread
(
tree_file
,
&
nb_non_coding_RNAs_
,
sizeof
(
nb_non_coding_RNAs_
));
gzread
(
tree_file
,
&
nb_non_coding_RNAs_
,
sizeof
(
nb_non_coding_RNAs_
));
dna_replic_report_
.
read_from_tree_file
(
tree_file
);
//
dna_replic_report_.read_from_tree_file(tree_file);
dna_replic_report_
.
compute_stats
();
//
dna_replic_report_.compute_stats();
parent_metabolic_error_
=
-
1
;
parent_metabolic_error_
=
-
1
;
parent_secretion_error_
=
-
1
;
parent_secretion_error_
=
-
1
;
...
@@ -209,8 +239,8 @@ void ReplicationReport::init(Tree* tree, Internal_SIMD_Struct* offspring, Intern
...
@@ -209,8 +239,8 @@ void ReplicationReport::init(Tree* tree, Internal_SIMD_Struct* offspring, Intern
simd_indiv_
=
offspring
;
simd_indiv_
=
offspring
;
id_
=
indiv_id
;
id_
=
(
unsigned
long
long
)
indiv_id
;
parent_id_
=
parent_id
;
parent_id_
=
(
unsigned
long
long
)
parent_id
;
rank_
=
0
;
rank_
=
0
;
...
@@ -228,8 +258,8 @@ void ReplicationReport::init(Tree* tree, Internal_SIMD_Struct* offspring, Intern
...
@@ -228,8 +258,8 @@ void ReplicationReport::init(Tree* tree, Internal_SIMD_Struct* offspring, Intern
mean_align_score_
=
0.0
;
mean_align_score_
=
0.0
;
// Set ourselves an observer of indiv_'s MUTATION and END_REPLICATION
// Set ourselves an observer of indiv_'s MUTATION and END_REPLICATION
simd_indiv_
->
addObserver
(
this
,
MUTATION
);
//
simd_indiv_->addObserver(this, MUTATION);
simd_indiv_
->
addObserver
(
tree
,
END_REPLICATION
);
//
simd_indiv_->addObserver(tree, END_REPLICATION);
}
}
void
ReplicationReport
::
init
(
LightTree
*
tree
,
Individual
*
offspring
,
Individual
*
parent
,
int
indiv_id
,
int
parent_id
)
void
ReplicationReport
::
init
(
LightTree
*
tree
,
Individual
*
offspring
,
Individual
*
parent
,
int
indiv_id
,
int
parent_id
)
...
@@ -264,8 +294,8 @@ void ReplicationReport::init(Tree* tree, Internal_SIMD_Struct* offspring, Intern
...
@@ -264,8 +294,8 @@ void ReplicationReport::init(Tree* tree, Internal_SIMD_Struct* offspring, Intern
simd_indiv_
=
offspring
;
simd_indiv_
=
offspring
;
id_
=
indiv_id
;
id_
=
(
unsigned
long
long
)
indiv_id
;
parent_id_
=
parent_id
;
parent_id_
=
(
unsigned
long
long
)
parent_id
;
rank_
=
0
;
rank_
=
0
;
...
@@ -331,8 +361,8 @@ void ReplicationReport::signal_end_of_generation() {
...
@@ -331,8 +361,8 @@ void ReplicationReport::signal_end_of_generation() {
void
ReplicationReport
::
write_to_tree_file
(
gzFile
tree_file
)
const
void
ReplicationReport
::
write_to_tree_file
(
gzFile
tree_file
)
const
{
{
// Store individual identifiers and rank
// Store individual identifiers and rank
/*
gzwrite(tree_file, &id_, sizeof(id_));
gzwrite(tree_file, &id_, sizeof(id_));
//printf("ID %d\n",id_);
int32_t rankx = -1;
int32_t rankx = -1;
if (SIMD_Individual::standalone_simd) {
if (SIMD_Individual::standalone_simd) {
...
@@ -353,8 +383,9 @@ void ReplicationReport::write_to_tree_file(gzFile tree_file) const
...
@@ -353,8 +383,9 @@ void ReplicationReport::write_to_tree_file(gzFile tree_file) const
gzwrite(tree_file, &nb_non_fun_genes_, sizeof(nb_non_fun_genes_));
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_coding_RNAs_, sizeof(nb_coding_RNAs_));
gzwrite(tree_file, &nb_non_coding_RNAs_, sizeof(nb_non_coding_RNAs_));
gzwrite(tree_file, &nb_non_coding_RNAs_, sizeof(nb_non_coding_RNAs_));
*/
dna_replic_report_
.
write_to_tree_file
(
tree_file
);
//
dna_replic_report_.write_to_tree_file(tree_file);
}
}
...
@@ -370,13 +401,13 @@ void ReplicationReport::write_to_tree_file(gzFile tree_file) const
...
@@ -370,13 +401,13 @@ void ReplicationReport::write_to_tree_file(gzFile tree_file) const
// Non inline accessors
// Non inline accessors
// =================================================================
// =================================================================
void
ReplicationReport
::
update
(
Observable
&
o
,
ObservableEvent
e
,
void
*
arg
)
{
void
ReplicationReport
::
update
(
Observable
&
o
,
ObservableEvent
e
,
void
*
arg
)
{
//
printf("Receive ??? events\n");
printf
(
"Receive ??? events
\n
"
);
switch
(
e
)
{
switch
(
e
)
{
case
MUTATION
:
case
MUTATION
:
//printf("Receive mutation events\n");
//printf("Receive mutation events\n");
//#pragma omp critical
//#pragma omp critical
//{
//{
dna_replic_report_
.
add_mut
(
reinterpret_cast
<
Mutation
*>
(
arg
));
//
dna_replic_report_.add_mut(reinterpret_cast<Mutation *>(arg));
//}
//}
break
;
break
;
default
:
default
:
...
...
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