Skip to content

Commit

Permalink
Fix index.saved
Browse files Browse the repository at this point in the history
  • Loading branch information
Yenaled committed Oct 14, 2023
1 parent 47ead20 commit a93a259
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/KmerIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,11 @@ void KmerIndex::write(std::ofstream& out, int threads) {
}

void KmerIndex::write(const std::string& index_out, bool writeKmerTable, int threads) {

if (writeKmerTable) {
std::cerr << "KmerIndex::write() must have writeKmerTable set to false" << std::endl;
exit(1);
}

std::ofstream out;
out.open(index_out, std::ios::out | std::ios::binary);
Expand Down Expand Up @@ -1145,6 +1150,11 @@ void KmerIndex::write(const std::string& index_out, bool writeKmerTable, int thr
tmp_size = 0;
out.write((char *)&tmp_size, sizeof(tmp_size));
}
// Don't write out a D-list:
uint64_t dlist_size = 0;
uint64_t dlist_overhang = 1;
out.write((char*)&dlist_size, sizeof(dlist_size));
out.write((char*)&dlist_overhang, sizeof(dlist_overhang));

// 3. serialize nodes
if (writeKmerTable) {
Expand Down

0 comments on commit a93a259

Please sign in to comment.