diff --git a/endToEndTests/test/queries/fastaAligned_multiple.json b/endToEndTests/test/queries/fastaAligned_multiple.json index 3ec5c5b3a..ab32a139f 100644 --- a/endToEndTests/test/queries/fastaAligned_multiple.json +++ b/endToEndTests/test/queries/fastaAligned_multiple.json @@ -3,7 +3,10 @@ "query": { "action": { "type": "FastaAligned", - "sequenceName": ["testSecondSequence", "S"] + "sequenceName": [ + "testSecondSequence", + "S" + ] }, "filterExpression": { "type": "IntBetween", @@ -14,24 +17,24 @@ }, "expectedQueryResult": [ { - "S": "MFVFLVLLPLVSSQCVNLTTRTQLPPAYTNSFTRGVYYPDKVFRSSVLHSTQDLFLPFFSNVTWFHAI--SGTNGTKRFDNPVLPFNDGVYFASTEKSNIIRGWIFGTTLDSKTQSLLIVNNATNVVIKVCEFQFCNDPFLGV-YHKNNKSWMESEFRVYSSANNCTFEYVSQPFLMDLEGKQGNFKNLREFVFKNIDGYFKIYSKHTPINLVRDLPQGFSALEPLVDLPIGINITRFQTLLALHRSYLTPGDSSSGWTAGAAAYYVGYLQPRTFLLKYNENGTITDAVDCALDPLSETKCTLKSFTVEKGIYQTSNFRVQPTESIVRFPNITNLCPFGEVFNATRFASVYAWNRKRISNCVADYSVLYNSASFSTFKCYGVSPTKLNDLCFTNVYADSFVIRGDEVRQIAPGQTGKIADYNYKLPDDFTGCVIAWNSNNLDSKVGGNYNYLYRLFRKSNLKPFERDISTEIYQAGSTPCNGVEGFNCYFPLQSYGFQPTYGVGYQPYRVVVLSFELLHAPATVCGPKKSTNLVKNKCVNFNFNGLTGTGVLTESNKKFLPFQQFGRDIDDTTDAVRDPQTLEILDITPCSFGGVSVITPGTNTSNQVAVLYQDVNCTEVPVAIHADQLTPTWRVYSTGSNVFQTRAGCLIGAEHVNNSYECDIPIGAGICASYQTQTNSPRRARSVASQSIIAYTMSLGAENSVAYSNNSIAIPINFTISVTTEILPVSMTKTSVDCTMYICGDSTECSNLLLQYGSFCTQLNRALTGIAVEQDKNTQEVFAQVKQIYKTPPI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NFRVQPTESIVRFPNITNLCPFGEVFNATRFASVYAWNRKRISNCVADYSVLYNSASFSTFKCYGVSPTKLNDLCFTNVYADSFVIRGDEVRQIAPGQTGKIADYNYKLPDDFTGCVIAWNSNNLDSKVGGNYNYLYRLFRKSNLKPFERDISTEIYQAGSTPCNGVEGFNCYFPLQSYGFQPTYGVGYQPYRVVVLSFELLHAPATVCGPKKSTNLVKNKCVNFNFNGLTGTGVLTESNKKFLPFQQFGRDIDDTTDAVRDPQTLEILDITPCSFGGVSVITPGTNTSNQVAVLYQGVNCTEVPVAIHADQLTPTWRVYSTGSNVFQTRAGCLIGAEHVNNSYECDIPIGAGICASYQTQTNSHRRARSVASQSIIAYTMSLGAENSVAYSNNSIAIPINFTISVTTEILPVSMTKTSVDCTMYICGDSTECSNLLLQYGSFCTQLNRALTGIAVEQDKNTQEVFAQVKQIYKTPPIKDFGGFNFSQILPDPSKPSKRSFIEDLLFNKVTLADAGFIKQYGDCLGDIAARDLICAQKFNGLTVLPPLLTDEMIAQYTSALLAGTITSGWTFGAGAALQIPFAMQMAYRFNGIGVTQNVLYENQKLIANQFNSAIGKIQDSLSSTASALGKLQDVVNQNAQALNTLVKQLSSNFGAISSVLNDILARLDKVEAEVQIDRLITGRLQSLQTYVTQQLIRAAEIRASANLAATKMSECVLGQSKRVDFCGKGYHLMSFPQSAPHGVVFLHVTYVPAQEKNFTTAPAICHDGKAHFPREGVFVSNGTHWFVTQRNFYEPQIITTHNTFVSGNCDVVIGIVNNTVYDPLQPELDSFKEELDKYFKNHTSPDVDLGDISGINASVVNIQKEIDRLNEVAKNLNESLIDLQELGKYEQYIKWPWYIWLGFIAGLIAIVMVTIMLCCMTSCCSCLKGCCSCGSCCKFDEDDSEPVLKGVKLHYT*", "gisaid_epi_isl": "EPI_ISL_2016901", "testSecondSequence": "ACGT" } ] -} +} \ No newline at end of file diff --git a/include/silo/storage/aa_store.h b/include/silo/storage/aa_store.h index 859c5f8fc..74d735eec 100644 --- a/include/silo/storage/aa_store.h +++ b/include/silo/storage/aa_store.h @@ -47,7 +47,7 @@ class AAPosition { AASymbolMap bitmaps; std::optional symbol_whose_bitmap_is_flipped = std::nullopt; - void flipMostNumerousBitmap(uint32_t sequence_count); + std::optional flipMostNumerousBitmap(uint32_t sequence_count); }; class AAStorePartition { @@ -58,6 +58,7 @@ class AAStorePartition { void serialize(Archive& archive, [[maybe_unused]] const uint32_t version) { // clang-format off archive & sequence_count; + archive & indexing_differences_to_reference_sequence; archive & positions; archive & aa_symbol_x_bitmaps; // clang-format on @@ -71,6 +72,7 @@ class AAStorePartition { explicit AAStorePartition(const std::vector& reference_sequence); const std::vector& reference_sequence; + std::vector> indexing_differences_to_reference_sequence; std::vector positions; std::vector aa_symbol_x_bitmaps; uint32_t sequence_count = 0; diff --git a/include/silo/storage/sequence_store.h b/include/silo/storage/sequence_store.h index 1e3115530..8a1765d88 100644 --- a/include/silo/storage/sequence_store.h +++ b/include/silo/storage/sequence_store.h @@ -48,7 +48,7 @@ class NucPosition { NucleotideSymbolMap bitmaps; std::optional symbol_whose_bitmap_is_flipped = std::nullopt; - void flipMostNumerousBitmap(uint32_t sequence_count); + std::optional flipMostNumerousBitmap(uint32_t sequence_count); }; struct SequenceStoreInfo { @@ -64,6 +64,7 @@ class SequenceStorePartition { void serialize(Archive& archive, [[maybe_unused]] const uint32_t version) { // clang-format off archive & positions; + archive & indexing_differences_to_reference_genome; archive & nucleotide_symbol_n_bitmaps; archive & sequence_count; // clang-format on @@ -77,6 +78,7 @@ class SequenceStorePartition { explicit SequenceStorePartition(const std::vector& reference_genome); const std::vector& reference_genome; + std::vector> indexing_differences_to_reference_genome; std::vector positions; std::vector nucleotide_symbol_n_bitmaps; uint32_t sequence_count = 0; diff --git a/src/silo/query_engine/actions/aa_mutations.cpp b/src/silo/query_engine/actions/aa_mutations.cpp index f8bab4c4f..c6f9bbac1 100644 --- a/src/silo/query_engine/actions/aa_mutations.cpp +++ b/src/silo/query_engine/actions/aa_mutations.cpp @@ -221,10 +221,9 @@ void from_json(const nlohmann::json& json, std::unique_ptr& action) for (const auto& child : json["sequenceName"]) { CHECK_SILO_QUERY( child.is_string(), - "AminoAcidMutations action can have the field sequenceName of type string or an array " - "of " - "strings, but no other type; while parsing array encountered the element " + - child.dump() + " which is not of type string" + "The field sequenceName of AminoAcidMutations action must have type string or an " + "array, if present. Found:" + + child.dump() ) sequence_names.emplace_back(child.get()); } diff --git a/src/silo/query_engine/actions/fasta_aligned.cpp b/src/silo/query_engine/actions/fasta_aligned.cpp index 6b53b2f2d..4ba58a635 100644 --- a/src/silo/query_engine/actions/fasta_aligned.cpp +++ b/src/silo/query_engine/actions/fasta_aligned.cpp @@ -43,6 +43,11 @@ std::string reconstructNucSequence( silo::nucleotideSymbolToChar ); + for (const auto& [position_id, symbol] : + sequence_store.indexing_differences_to_reference_genome) { + reconstructed_sequence[position_id] = nucleotideSymbolToChar(symbol); + } + tbb:: parallel_for( tbb::blocked_range(0, sequence_store.positions.size()), @@ -74,6 +79,10 @@ std::string reconstructAASequence(const AAStorePartition& aa_store, uint32_t seq silo::aaSymbolToChar ); + for (const auto& [position_id, symbol] : aa_store.indexing_differences_to_reference_sequence) { + reconstructed_sequence[position_id] = aaSymbolToChar(symbol); + } + tbb:: parallel_for( tbb::blocked_range(0, aa_store.positions.size()), diff --git a/src/silo/storage/aa_store.cpp b/src/silo/storage/aa_store.cpp index 53fab4360..b12d82b23 100644 --- a/src/silo/storage/aa_store.cpp +++ b/src/silo/storage/aa_store.cpp @@ -21,7 +21,7 @@ silo::AAPosition::AAPosition(std::optional symbol) { symbol_whose_bitmap_is_flipped = symbol; } -void silo::AAPosition::flipMostNumerousBitmap(uint32_t sequence_count) { +std::optional silo::AAPosition::flipMostNumerousBitmap(uint32_t sequence_count) { std::optional previous_flipped_bitmap_symbol = symbol_whose_bitmap_is_flipped; std::optional new_flipped_bitmap_symbol = std::nullopt; uint32_t max_count = 0; @@ -50,7 +50,9 @@ void silo::AAPosition::flipMostNumerousBitmap(uint32_t sequence_count) { bitmaps[*new_flipped_bitmap_symbol].shrinkToFit(); } symbol_whose_bitmap_is_flipped = new_flipped_bitmap_symbol; + return symbol_whose_bitmap_is_flipped; } + return std::nullopt; } silo::AAStorePartition::AAStorePartition(const std::vector& reference_sequence) diff --git a/src/silo/storage/database_partition.cpp b/src/silo/storage/database_partition.cpp index 8baa65f1e..0bb3ca26f 100644 --- a/src/silo/storage/database_partition.cpp +++ b/src/silo/storage/database_partition.cpp @@ -1,5 +1,6 @@ #include "silo/storage/database_partition.h" +#include #include #include "silo/storage/column_group.h" @@ -22,20 +23,44 @@ DatabasePartition::DatabasePartition(std::vector chu void DatabasePartition::flipBitmaps() { for (auto& [_, seq_store] : nuc_sequences) { + tbb::enumerable_thread_specific + flipped_bitmaps; + auto& positions = seq_store.positions; tbb::parallel_for(tbb::blocked_range(0, positions.size()), [&](const auto& local) { + auto& local_flipped_bitmaps = flipped_bitmaps.local(); for (auto position = local.begin(); position != local.end(); ++position) { - positions[position].flipMostNumerousBitmap(sequence_count); + auto flipped_symbol = positions[position].flipMostNumerousBitmap(sequence_count); + if (flipped_symbol.has_value()) { + local_flipped_bitmaps.emplace_back(position, *flipped_symbol); + } } }); + for (const auto& local : flipped_bitmaps) { + for (auto& element : local) { + seq_store.indexing_differences_to_reference_genome.emplace_back(element); + } + } } - for (auto& [_, seq_store] : aa_sequences) { - auto& positions = seq_store.positions; + for (auto& [_, aa_store] : aa_sequences) { + tbb::enumerable_thread_specific + flipped_bitmaps; + + auto& positions = aa_store.positions; tbb::parallel_for(tbb::blocked_range(0, positions.size()), [&](const auto& local) { + auto& local_flipped_bitmaps = flipped_bitmaps.local(); for (auto position = local.begin(); position != local.end(); ++position) { - positions[position].flipMostNumerousBitmap(sequence_count); + auto flipped_symbol = positions[position].flipMostNumerousBitmap(sequence_count); + if (flipped_symbol.has_value()) { + local_flipped_bitmaps.emplace_back(position, *flipped_symbol); + } } }); + for (const auto& local : flipped_bitmaps) { + for (auto& element : local) { + aa_store.indexing_differences_to_reference_sequence.emplace_back(element); + } + } } } diff --git a/src/silo/storage/sequence_store.cpp b/src/silo/storage/sequence_store.cpp index 9c5befd9b..0c6715264 100644 --- a/src/silo/storage/sequence_store.cpp +++ b/src/silo/storage/sequence_store.cpp @@ -23,7 +23,9 @@ silo::NucPosition::NucPosition(std::optional symbol) { symbol_whose_bitmap_is_flipped = symbol; } -void silo::NucPosition::flipMostNumerousBitmap(uint32_t sequence_count) { +std::optional silo::NucPosition::flipMostNumerousBitmap( + uint32_t sequence_count +) { std::optional flipped_bitmap_before = symbol_whose_bitmap_is_flipped; std::optional max_symbol = std::nullopt; uint32_t max_count = 0; @@ -51,7 +53,9 @@ void silo::NucPosition::flipMostNumerousBitmap(uint32_t sequence_count) { bitmaps[*max_symbol].shrinkToFit(); } symbol_whose_bitmap_is_flipped = max_symbol; + return symbol_whose_bitmap_is_flipped; } + return std::nullopt; } silo::SequenceStorePartition::SequenceStorePartition(