Skip to content

Commit

Permalink
fix: seralization for insertion_index and insertion_column
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgrittner committed Jul 25, 2023
1 parent aec40d0 commit ee99f8d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/silo/storage/column/insertion_column.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class InsertionColumnPartition {
template <class Archive>
[[maybe_unused]] void serialize(Archive& archive, const uint32_t /* version */) {
// clang-format off
archive& values;
archive & values;
archive & insertion_index;
// clang-format on
}

Expand Down Expand Up @@ -60,6 +61,7 @@ class InsertionColumn {
template <class Archive>
[[maybe_unused]] void serialize(Archive& archive, const uint32_t /* version */) {
// clang-format off
archive & *lookup;
// clang-format on
}

Expand Down
21 changes: 21 additions & 0 deletions include/silo/storage/column/insertion_index.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,21 @@ class InsertionIndex {
[[maybe_unused]] void serialize(Archive& archive, const uint32_t /* version */) {
// clang-format off
archive & insertion_positions;
archive & collected_insertions;
// clang-format on
}

struct Insertion {
friend class boost::serialization::access;

template <class Archive>
[[maybe_unused]] void serialize(Archive& archive, const uint32_t /* version */) {
// clang-format off
archive & value;
archive & sequence_ids;
// clang-format on
}

std::string value;
sequence_ids_t sequence_ids;
};
Expand All @@ -47,6 +58,16 @@ class InsertionIndex {
using three_mer_index_t = silo::NucleotideSymbolMap<two_mer_index_t>;

struct InsertionPosition {
friend class boost::serialization::access;

template <class Archive>
[[maybe_unused]] void serialize(Archive& archive, const uint32_t /* version */) {
// clang-format off
archive & insertions;
archive & three_mer_index;
// clang-format on
}

std::vector<Insertion> insertions;
three_mer_index_t three_mer_index;

Expand Down

0 comments on commit ee99f8d

Please sign in to comment.