Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 84c36601 authored by LUISELLI Juliette's avatar LUISELLI Juliette
Browse files

save and retrieve chrsm_ information to Tree for Small Insertions

parent 364497e1
No related branches found
No related tags found
No related merge requests found
...@@ -76,12 +76,18 @@ SmallInsertion::~SmallInsertion() noexcept { ...@@ -76,12 +76,18 @@ SmallInsertion::~SmallInsertion() noexcept {
void SmallInsertion::save(gzFile backup_file) const { void SmallInsertion::save(gzFile backup_file) const {
int8_t tmp_mut_type = S_INS; int8_t tmp_mut_type = S_INS;
gzwrite(backup_file, &tmp_mut_type, sizeof(tmp_mut_type)); gzwrite(backup_file, &tmp_mut_type, sizeof(tmp_mut_type));
#ifdef __EUKARYOTE
gzwrite(backup_file, &chrsm_, sizeof(chrsm_));
#endif
gzwrite(backup_file, &pos_, sizeof(pos_)); gzwrite(backup_file, &pos_, sizeof(pos_));
gzwrite(backup_file, &length_, sizeof(length_)); gzwrite(backup_file, &length_, sizeof(length_));
gzwrite(backup_file, seq_, length_ * sizeof(seq_[0])); gzwrite(backup_file, seq_, length_ * sizeof(seq_[0]));
} }
void SmallInsertion::load(gzFile backup_file) { void SmallInsertion::load(gzFile backup_file) {
#ifdef __EUKARYOTE
gzread(backup_file, &chrsm_, sizeof(chrsm_));
#endif
gzread(backup_file, &pos_, sizeof(pos_)); gzread(backup_file, &pos_, sizeof(pos_));
gzread(backup_file, &length_, sizeof(length_)); gzread(backup_file, &length_, sizeof(length_));
seq_ = new char[length_ + 1]; seq_ = new char[length_ + 1];
......
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