Skip to content

Commit

Permalink
Minor polishing edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Taepper committed Dec 15, 2023
1 parent 7f57c4c commit 37a1294
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 54 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ target_link_libraries(
silo
PUBLIC
${Boost_LIBRARIES}
TBB::tbb
${duckdb_LIBRARIES}
nlohmann_json::nlohmann_json
${roaring_LIBRARIES}
${spdlog_LIBRARIES}
TBB::tbb
${yaml-cpp_LIBRARIES}
nlohmann_json::nlohmann_json
zstd::libzstd_static
${duckdb_LIBRARIES}
)

add_executable(siloApi src/silo_api/api.cpp ${SRC_SILO_API})
Expand Down
4 changes: 2 additions & 2 deletions include/silo/preprocessing/preprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class Preprocessor {

public:
Preprocessor(
const preprocessing::PreprocessingConfig& preprocessing_config,
const config::DatabaseConfig& database_config
const preprocessing::PreprocessingConfig preprocessing_config,
const config::DatabaseConfig database_config
);

Database preprocess();
Expand Down
13 changes: 0 additions & 13 deletions include/silo/storage/build_exception.h

This file was deleted.

2 changes: 1 addition & 1 deletion include/silo/zstdfasta/zstdfasta_table_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ZstdFastaTableReader {
std::unique_ptr<silo::ZstdDecompressor> decompressor;
size_t current_row;

std::string DEBUG_dictionary;
// std::string DEBUG_dictionary;

std::string genome_buffer;

Expand Down
10 changes: 5 additions & 5 deletions src/silo/preprocessing/preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
namespace silo::preprocessing {

Preprocessor::Preprocessor(
const preprocessing::PreprocessingConfig& preprocessing_config,
const config::DatabaseConfig& database_config
const preprocessing::PreprocessingConfig preprocessing_config,
const config::DatabaseConfig database_config
)
: preprocessing_config(preprocessing_config),
database_config(database_config),
: preprocessing_config(std::move(preprocessing_config)),
database_config(std::move(database_config)),
preprocessing_db(preprocessing_config.getPreprocessingDatabaseLocation().value_or(":memory:")
) {}

Expand Down Expand Up @@ -225,7 +225,7 @@ from metadata_table;
"select 0::bigint as partition_id, metadata_table.*\n"
"from metadata_table;"
);
};
}

void Preprocessor::createSequenceViews(const ReferenceGenomes& reference_genomes) {
std::string order_by_select =
Expand Down
1 change: 0 additions & 1 deletion src/silo/preprocessing/sequence_info.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "silo/preprocessing/sequence_info.h"

#include <boost/algorithm/string/join.hpp>
#include <duckdb.hpp>

#include "silo/preprocessing/preprocessing_database.h"
Expand Down
10 changes: 0 additions & 10 deletions src/silo/storage/build_exception.cpp

This file was deleted.

10 changes: 1 addition & 9 deletions src/silo/storage/column/pango_lineage_column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,7 @@ void PangoLineageColumnPartition::insert(const common::RawPangoLineage& value) {
}

void PangoLineageColumnPartition::insertNull() {
const common::UnaliasedPangoLineage resolved_lineage = alias_key.unaliasPangoLineage({""});
for (const auto& parent_lineage : resolved_lineage.getParentLineages()) {
(void)lookup.getOrCreateId(parent_lineage);
}
const Idx value_id = lookup.getOrCreateId(resolved_lineage);
const size_t row_number = value_ids.size();
value_ids.push_back(value_id);
indexed_values[value_id].add(row_number);
insertSublineageValues(resolved_lineage, row_number);
insert({""});
}

void PangoLineageColumnPartition::insertSublineageValues(
Expand Down
3 changes: 1 addition & 2 deletions src/silo/zstdfasta/zstdfasta_table_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ silo::ZstdFastaTableReader::ZstdFastaTableReader(
table_name(table_name),
where_clause(where_clause),
order_by_clause(order_by_clause),
decompressor(std::make_unique<ZstdDecompressor>(compression_dict)),
DEBUG_dictionary(compression_dict) {
decompressor(std::make_unique<ZstdDecompressor>(compression_dict)) {
SPDLOG_TRACE("Initializing ZstdFastaTableReader for table {}", table_name);
genome_buffer.resize(compression_dict.size());
reset();
Expand Down
16 changes: 8 additions & 8 deletions src/silo/zstdfasta/zstdfasta_table_reader.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ TEST(ZstdFastaTableReader, correctlyReadsZstdFastaTableFromFastaFile) {

silo::FastaReader file_reader(file_path);

duckdb::DuckDB duckDB(nullptr);
duckdb::Connection connection(duckDB);
duckdb::DuckDB duck_db(nullptr);
duckdb::Connection connection(duck_db);

silo::ZstdFastaTable::generate(connection, "test", file_reader, "ACGT");

Expand Down Expand Up @@ -47,8 +47,8 @@ TEST(ZstdFastaTableReader, correctlyReadsZstdFastaTableFromZstdFastaFile) {

silo::ZstdFastaReader file_reader(file_path, "ACGT");

duckdb::DuckDB duckDB(nullptr);
duckdb::Connection connection(duckDB);
duckdb::DuckDB duck_db(nullptr);
duckdb::Connection connection(duck_db);

silo::ZstdFastaTable::generate(connection, "test", file_reader);

Expand Down Expand Up @@ -76,8 +76,8 @@ TEST(ZstdFastaTableReader, correctlySortsZstdFastaTableFromFastaFile) {

silo::FastaReader file_reader(file_path);

duckdb::DuckDB duckDB(nullptr);
duckdb::Connection connection(duckDB);
duckdb::DuckDB duck_db(nullptr);
duckdb::Connection connection(duck_db);

silo::ZstdFastaTable::generate(connection, "test", file_reader, "ACGT");

Expand Down Expand Up @@ -105,8 +105,8 @@ TEST(ZstdFastaTableReader, correctlySortsZstdFastaTableFromZstdFastaFile) {

silo::ZstdFastaReader file_reader(file_path, "ACGT");

duckdb::DuckDB duckDB(nullptr);
duckdb::Connection connection(duckDB);
duckdb::DuckDB duck_db(nullptr);
duckdb::Connection connection(duck_db);

silo::ZstdFastaTable::generate(connection, "test", file_reader);

Expand Down

0 comments on commit 37a1294

Please sign in to comment.