Skip to content

Commit

Permalink
refactor: minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Taepper committed Aug 8, 2023
1 parent b31851c commit 3f5bf72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/silo/database.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TEST(DatabaseTest, shouldBuildDatabaseWithoutErrors) {
EXPECT_EQ(simple_database_info.sequence_count, 100);
}

TEST(DatabaseTest, shouldBuildPartitionLessDatabaseWithoutErrors) {
TEST(DatabaseTest, shouldSuccessfullyBuildDatabaseWithoutPartitionBy) {
const silo::preprocessing::InputDirectory input_directory{"./testBaseData/"};

auto config = silo::preprocessing::PreprocessingConfigReader().readConfig(
Expand Down
15 changes: 1 addition & 14 deletions src/silo/prepare_dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,6 @@ std::unordered_map<std::string, silo::preprocessing::PartitionChunk> partitionMe
);
}

void copyMetadataFile(
csv::CSVReader& metadata_reader,
silo::preprocessing::MetadataWriter& metadata_writer
) {
metadata_writer.writeHeader(metadata_reader);
for (auto& row : metadata_reader) {
std::this_thread::sleep_for(std::chrono::nanoseconds(2));
metadata_writer.writeRow(row);
}
}

std::unordered_map<silo::preprocessing::PartitionChunk, silo::ZstdFastaWriter>
getSequenceWritersForChunks(
const std::unordered_map<silo::preprocessing::PartitionChunk, std::filesystem::path>&
Expand Down Expand Up @@ -264,12 +253,10 @@ void silo::copyDataToPartitionDirectory(
const ReferenceGenomes& reference_genomes
) {
const std::filesystem::path metadata_filename = preprocessing_config.getMetadataInputFilename();
auto metadata_reader = preprocessing::MetadataReader(metadata_filename);

auto metadata_partition_filename = preprocessing_config.getMetadataPartitionFilename(0, 0);
auto metadata_writer = preprocessing::MetadataWriter(metadata_partition_filename);

copyMetadataFile(metadata_reader.reader, metadata_writer);
std::filesystem::copy(metadata_filename, metadata_partition_filename);

for (const auto& [nuc_name, reference_genome] : reference_genomes.raw_nucleotide_sequences) {
const std::filesystem::path sequence_in_filename =
Expand Down

0 comments on commit 3f5bf72

Please sign in to comment.