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.8.2.
Show more breadcrumbs
LUISELLI Juliette
aevol-eukaryotes
Commits
e6dbd248
Commit
e6dbd248
authored
3 months ago
by
David Parsons
Browse files
Options
Downloads
Patches
Plain Diff
recombine on alignment if enabled
parent
aa1a7a30
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/libaevol/7/ExpManager_7.cpp
+19
-5
19 additions, 5 deletions
src/libaevol/7/ExpManager_7.cpp
with
19 additions
and
5 deletions
src/libaevol/7/ExpManager_7.cpp
+
19
−
5
View file @
e6dbd248
...
...
@@ -30,6 +30,7 @@
#include
"Promoter.h"
#include
"Protein.h"
#include
"Rna.h"
#include
"alignments/RecombAlignmentSearcher.h"
#include
"phenotype/fuzzy/AbstractFuzzy.h"
#include
"phenotype/fuzzy/Discrete_Double_Fuzzy.h"
#include
"phenotype/fuzzy/FuzzyFactory_7.h"
...
...
@@ -607,11 +608,24 @@ auto ExpManager_7::create_offspring(
recombination_info
[
parent_idx
].
chrsm_end
=
recombination_info
[
parent_idx
].
chrsm_start
==
Chrsm
::
B
?
Chrsm
::
A
:
Chrsm
::
B
;
// Pick random points for recombination
recombination_info
[
parent_idx
].
recomb_pos_1
=
prng
.
random
(
individuals_
[
reproducers_info
[
parent_idx
]]
->
dna
(
recombination_info
[
parent_idx
].
chrsm_start
).
length
());
recombination_info
[
parent_idx
].
recomb_pos_2
=
prng
.
random
(
individuals_
[
reproducers_info
[
parent_idx
]]
->
dna
(
recombination_info
[
parent_idx
].
chrsm_end
).
length
());
// Pick points for recombination, either alignment-based or at random
auto
alignment_params
=
exp_setup
->
alignment_params
();
if
(
alignment_params
)
{
// Search for an alignement to determine the breakpoints for recombination
const
auto
&
alignment
=
align
::
RecombAlignmentSearcher
::
find_alignment
(
{
&
individuals_
[
reproducers_info
[
parent_idx
]]
->
dna
(
recombination_info
[
parent_idx
].
chrsm_start
),
&
individuals_
[
reproducers_info
[
parent_idx
]]
->
dna
(
recombination_info
[
parent_idx
].
chrsm_end
)},
prng
,
*
alignment_params
);
recombination_info
[
parent_idx
].
recomb_pos_1
=
alignment
.
posA
;
recombination_info
[
parent_idx
].
recomb_pos_2
=
alignment
.
posB
;
}
else
{
// Pick random points for recombination
recombination_info
[
parent_idx
].
recomb_pos_1
=
prng
.
random
(
individuals_
[
reproducers_info
[
parent_idx
]]
->
dna
(
recombination_info
[
parent_idx
].
chrsm_start
).
length
());
recombination_info
[
parent_idx
].
recomb_pos_2
=
prng
.
random
(
individuals_
[
reproducers_info
[
parent_idx
]]
->
dna
(
recombination_info
[
parent_idx
].
chrsm_end
).
length
());
}
}
// Create recombinant chromosomes
...
...
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