Skip to content

Commit

Permalink
fixup! feat!: remove tsv/fasta/sam input format (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taepper committed Nov 14, 2024
1 parent 0245972 commit ac9fda0
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 146 deletions.
23 changes: 0 additions & 23 deletions include/silo/common/input_stream_wrapper.h

This file was deleted.

6 changes: 0 additions & 6 deletions include/silo/preprocessing/preprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ class Preprocessor {
silo::SequenceStorePartition<SymbolType>& sequence_store
);

template <typename SymbolType>
ColumnFunction createInsertionLambda(
const std::string& sequence_name,
silo::SequenceStorePartition<SymbolType>& sequence_store
);

template <typename SymbolType>
void buildSequenceStore(
Database& database,
Expand Down
57 changes: 0 additions & 57 deletions src/silo/common/input_stream_wrapper.cpp

This file was deleted.

2 changes: 2 additions & 0 deletions src/silo/config/preprocessing_config.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ TEST(PreprocessingConfig, shouldReadConfigWithOverriddenDefaults) {
const std::string input_directory = "./testBaseData/exampleDataset/";
ASSERT_EQ(config.getNdjsonInputFilename(), input_directory + "input_file.ndjson");
ASSERT_EQ(config.getLineageDefinitionsFilename(), input_directory + "lineage_definitions.yaml");
ASSERT_EQ(config.getDuckdbMemoryLimitInG(), 8);
ASSERT_EQ(config.getPreprocessingDatabaseLocation(), "preprocessing.duckdb");

ASSERT_EQ(config.getOutputDirectory(), "./output/custom/");
}
Expand Down
3 changes: 0 additions & 3 deletions src/silo/preprocessing/preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@
#include "silo/common/table_reader.h"
#include "silo/config/preprocessing_config.h"
#include "silo/database.h"
#include "silo/database_info.h"
#include "silo/preprocessing/metadata_info.h"
#include "silo/preprocessing/preprocessing_database.h"
#include "silo/preprocessing/preprocessing_exception.h"
#include "silo/preprocessing/sequence_info.h"
#include "silo/preprocessing/sql_function.h"
#include "silo/preprocessing/validated_ndjson_file.h"
#include "silo/storage/reference_genomes.h"
#include "silo/storage/unaligned_sequence_store.h"
Expand Down
56 changes: 0 additions & 56 deletions src/silo/preprocessing/preprocessor.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,62 +99,6 @@ const Scenario NDJSON_WITH_NUMERIC_NAMES = {
)
};

const Scenario TSV_FILE_WITH_SQL_KEYWORD_AS_FIELD = {
.input_directory = "testBaseData/tsvWithSqlKeywordField/",
.expected_sequence_count = NDJSON_WITH_SQL_KEYWORD_AS_FIELD.expected_sequence_count,
.query = NDJSON_WITH_SQL_KEYWORD_AS_FIELD.query,
.expected_query_result = NDJSON_WITH_SQL_KEYWORD_AS_FIELD.expected_query_result
};

const Scenario TSV_FILE_WITH_QUOTE_IN_FIELD_NAME = {
.input_directory = "testBaseData/tsvWithQuoteInFieldName/",
.expected_sequence_count = 2,
.query = R"(
{
"action": {
"type": "Aggregated",
"groupByFields": ["x\"y"],
"orderByFields": ["x\"y"]
},
"filterExpression": {
"type": "StringEquals",
"column": "x\"y",
"value": "a"
}
}
)",
.expected_query_result = nlohmann::json::parse(
R"([
{"count": 1, "x\"y": "a"}
])"
)
};

const Scenario TSV_FILE_WITH_QUOTE_IN_PARTITION_BY = {
.input_directory = "testBaseData/tsvWithQuoteInPartitionBy/",
.expected_sequence_count = 100,
.query = R"(
{
"action": {
"type": "Aggregated",
"groupByFields": ["pango_\"lineage"],
"orderByFields": ["pango_\"lineage"],
"limit": 3
},
"filterExpression": {
"type": "True"
}
}
)",
.expected_query_result = nlohmann::json::parse(
R"([
{"count":1,"pango_\"lineage":null},
{"count":1,"pango_\"lineage":"AY.122"},
{"count":4,"pango_\"lineage":"AY.43"}
])"
)
};

const Scenario EMPTY_INPUT_NDJSON = {
.input_directory = "testBaseData/emptyInputNdjson/",
.expected_sequence_count = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ outputDirectory: "./output/custom/"
intermediateResultsDirectory: "./output/overriddenTemp/"
ndjsonInputFilename: "input_file.ndjson"
lineageDefinitionsFilename: "lineage_definitions.yaml"
referenceGenomeFilename: "reference_genomes.json"
referenceGenomeFilename: "reference_genomes.json"
preprocessingDatabaseLocation: "preprocessing.duckdb"
duckdbMemoryLimitInG: 8

0 comments on commit ac9fda0

Please sign in to comment.