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
a9408419
Commit
a9408419
authored
2 years ago
by
LUISELLI Juliette
Committed by
David Parsons
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
make sure no mutation occurs at the breaking point
parent
bdb9f991
No related branches found
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/DnaMutator.cpp
+23
-3
23 additions, 3 deletions
src/libaevol/7/DnaMutator.cpp
with
23 additions
and
3 deletions
src/libaevol/7/DnaMutator.cpp
+
23
−
3
View file @
a9408419
...
...
@@ -165,9 +165,14 @@ MutationEvent* DnaMutator::generate_next_mutation(int32_t length) {
if
(
pos_1
<
pos_2
)
{
seqlen
=
pos_2
-
pos_1
;
}
else
{
int32_t
tmp1_len
=
length_
-
pos_1
;
int32_t
tmp2_len
=
pos_2
;
seqlen
=
tmp1_len
+
tmp2_len
;
#ifdef __EUKARYOTE
Utils
::
exchange
(
pos_1
,
pos_2
);
seqlen
=
pos_2
-
pos_1
;
#else
int32_t
tmp1_len
=
length_
-
pos_1
;
int32_t
tmp2_len
=
pos_2
;
seqlen
=
tmp1_len
+
tmp2_len
;
#endif
}
int32_t
genome_size_after
=
length_
+
seqlen
;
...
...
@@ -206,8 +211,13 @@ MutationEvent* DnaMutator::generate_next_mutation(int32_t length) {
if
(
pos_1
<
pos_2
)
{
genome_size_after
=
length_
-
(
pos_2
-
pos_1
);
}
else
{
#ifdef __EUKARYOTE
Utils
::
exchange
(
pos_1
,
pos_2
);
genome_size_after
=
length_
-
(
pos_2
-
pos_1
);
#else
genome_size_after
=
length_
-
(
length_
-
pos_1
);
genome_size_after
=
genome_size_after
-
pos_2
;
#endif
}
// printf("Remove %d %d : LB %d LA %d\n",pos_1,pos_2,length_,genome_size_after);
...
...
@@ -226,6 +236,9 @@ MutationEvent* DnaMutator::generate_next_mutation(int32_t length) {
}
else
if
(
random_value
<
nb_large_dupl_
+
nb_large_del_
+
nb_large_trans_
)
{
#ifdef __EUKARYOTE
std
::
cout
<<
"Warning : performing a translocation with a eukaryotic individual"
<<
std
::
endl
;
#endif
nb_large_trans_
--
;
if
(
length_
==
1
)
...
...
@@ -292,6 +305,7 @@ MutationEvent* DnaMutator::generate_next_mutation(int32_t length) {
// if (pos_1 == pos_2) return nullptr; // Invert everything <=> Invert nothing!
// Invert the segment that don't contain OriC
// Convenient for prokaryotes, absolutely necessary for eukaryotes
if
(
pos_1
>
pos_2
)
Utils
::
exchange
(
pos_1
,
pos_2
);
mevent
=
new
MutationEvent
();
...
...
@@ -374,6 +388,12 @@ MutationEvent* DnaMutator::generate_next_mutation(int32_t length) {
if
(
length_
-
nb_pos_to_del
<
min_genome_length_
)
return
nullptr
;
#ifdef __EUKARYOTE
if
(
pos
+
nb_pos_to_del
>
length_
){
nb_pos_to_del
=
length_
-
pos
;
// Doing the maximal possible deletion
}
#endif
length_
=
length_
-
nb_pos_to_del
;
...
...
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