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
50184f3b
Commit
50184f3b
authored
2 years ago
by
LUISELLI Juliette
Committed by
David Parsons
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
manage mutations on linear chromosomes
parent
17c599b3
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/Dna_7.cpp
+29
-1
29 additions, 1 deletion
src/libaevol/7/Dna_7.cpp
with
29 additions
and
1 deletion
src/libaevol/7/Dna_7.cpp
+
29
−
1
View file @
50184f3b
...
...
@@ -237,7 +237,11 @@ Mutation* Dna_7::do_switch(size_type pos
// Look for potential new promoters containing the switched base
if
(
length
()
>=
PROM_SIZE
)
#ifdef __EUKARYOTE
ann_chrsm_
->
promoter_list
().
look_for_new_promoters_around
(
*
this
,
pos
,
pos
+
1
);
#else
ann_chrsm_
->
promoter_list
().
look_for_new_promoters_around
(
*
this
,
pos
,
Utils
::
mod
(
pos
+
1
,
length
()));
#endif
#ifdef BASE_2
return
new
PointMutation
(
pos
);
...
...
@@ -247,6 +251,13 @@ Mutation* Dna_7::do_switch(size_type pos
}
Mutation
*
Dna_7
::
do_small_insertion
(
size_type
pos
,
int16_t
nb_insert
,
char
*
seq
)
{
size_type
end_look
;
#ifdef __EUKARYOTE
end_look
=
std
::
max
(
length_
,
pos
+
nb_insert
);
#else
end_look
=
Utils
::
mod
(
pos
+
nb_insert
,
length_
);
#endif
// Remove the promoters that will be broken
ann_chrsm_
->
promoter_list
().
remove_promoters_around
(
pos
,
length_
);
...
...
@@ -264,7 +275,7 @@ Mutation* Dna_7::do_small_insertion(size_type pos, int16_t nb_insert, char* seq)
}
else
{
ann_chrsm_
->
promoter_list
().
move_all_promoters_after
(
pos
,
nb_insert
,
length_
);
ann_chrsm_
->
promoter_list
().
look_for_new_promoters_around
(
*
this
,
pos
,
Utils
::
mod
(
pos
+
nb_insert
,
length_
)
);
ann_chrsm_
->
promoter_list
().
look_for_new_promoters_around
(
*
this
,
pos
,
end_look
);
}
}
...
...
@@ -298,6 +309,10 @@ Mutation* Dna_7::do_small_deletion(size_type pos, int16_t nb_del) {
}
}
else
{
// the deletion contains the origin of replication
#ifdef __EUKARYOTE
printf
(
"Deleting across position 0 : not permitted in linear chromosomes"
);
assert
(
false
);
#endif
// Do the deletion
int32_t
nb_del_at_pos_0
=
nb_del
-
length
()
+
pos
;
...
...
@@ -413,6 +428,11 @@ Mutation* Dna_7::do_duplication(size_type pos_1, size_type pos_2, size_type pos_
}
Mutation
*
Dna_7
::
do_translocation
(
size_type
pos_1
,
size_type
pos_2
,
size_type
pos_3
,
size_type
pos_4
,
bool
invert
)
{
#ifdef __EUKARYOTE
printf
(
"Code not tested with translocation in eukaryote. Are you sure ?"
);
assert
(
false
);
#endif
auto
pos_min
=
std
::
min
(
pos_1
,
std
::
min
(
pos_2
,
std
::
min
(
pos_3
,
pos_4
)));
if
(
not
invert
)
{
...
...
@@ -463,6 +483,10 @@ Mutation* Dna_7::do_inversion(size_type pos_1, size_type pos_2) {
// pos_2 <-'
//
#ifdef __EUKARYOTE
assert
(
pos_1
<=
pos_2
);
#endif
if
(
length_
==
1
)
{
printf
(
"*** genome of size 1 ; inversion not done ***
\n
"
);
...
...
@@ -509,6 +533,10 @@ Mutation* Dna_7::do_inversion(size_type pos_1, size_type pos_2) {
Mutation
*
Dna_7
::
do_deletion
(
size_type
pos_1
,
size_type
pos_2
)
{
#ifdef __EUKARYOTE
assert
(
pos_1
<=
pos_2
);
#endif
// Delete segment going from pos_1 (included) to pos_2 (excluded)
if
(
length_
==
1
)
{
...
...
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