Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c091a1c5 authored by LUISELLI Juliette's avatar LUISELLI Juliette Committed by David Parsons
Browse files

assert positions are in the correct order for rearrangements

parent a9408419
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@
#include "MutationEvent.h"
#include <cassert>
namespace aevol {
......@@ -55,6 +56,9 @@ void MutationEvent::small_deletion(int32_t pos, int32_t number) {
}
void MutationEvent::duplication(int32_t pos1, int32_t pos2, int32_t pos3) {
#ifdef __EUKARYOTE
assert(pos1 < pos2);
#endif
type_ = MutationEventType::DUPLICATION;
pos_1_ = pos1;
pos_2_ = pos2;
......@@ -63,6 +67,9 @@ void MutationEvent::duplication(int32_t pos1, int32_t pos2, int32_t pos3) {
void MutationEvent::translocation(int32_t pos1, int32_t pos2, int32_t pos3,
int32_t pos4, bool invert) {
#ifdef __EUKARYOTE
assert(pos1 < pos2);
#endif
type_ = MutationEventType::TRANSLOCATION;
pos_1_ = pos1;
pos_2_ = pos2;
......@@ -72,12 +79,18 @@ void MutationEvent::translocation(int32_t pos1, int32_t pos2, int32_t pos3,
}
void MutationEvent::inversion(int32_t pos1, int32_t pos2) {
#ifdef __EUKARYOTE
assert(pos1 < pos2);
#endif
type_ = MutationEventType::INVERSION;
pos_1_ = pos1;
pos_2_ = pos2;
}
void MutationEvent::deletion(int32_t pos1, int32_t pos2) {
#ifdef __EUKARYOTE
assert(pos1 < pos2);
#endif
type_ = MutationEventType::DELETION;
pos_1_ = pos1;
pos_2_ = pos2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment