Skip to content

Commit

Permalink
Fixed LTO issue, ppos output fields in realign.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbuchfink committed Feb 20, 2023
1 parent 9006cd7 commit 4276e74
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
`--iterate` option to activate linear-time feature.
- Added the option `--linsearch` to activate linear-time feature for the search
workflows.
- Fixed a bug that caused the `ppos` and `positive` output fields not to work
for the `realign` workflow.
- Fixed an issue that caused motif masking not to work when compiled with link
time optimization.

[2.1.1]
- Fixed compilation errors on non-x86 systems and for the clang compiler.
Expand Down
2 changes: 2 additions & 0 deletions src/basic/match.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ struct TypeSerializer<HspContext> {
buf_->write(h.subject_len);
buf_->write(h.identities());
buf_->write(h.mismatches());
buf_->write(h.positives());
buf_->write(h.gaps());
buf_->write(h.length());
buf_->write(h.gap_openings());
Expand Down Expand Up @@ -488,6 +489,7 @@ struct TypeDeserializer<HspContext> {
file_->read(h.subject_len);
file_->read(h.hsp_.identities);
file_->read(h.hsp_.mismatches);
file_->read(h.hsp_.positives);
file_->read(h.hsp_.gaps);
file_->read(h.hsp_.length);
file_->read(h.hsp_.gap_openings);
Expand Down
3 changes: 2 additions & 1 deletion src/masking/masking.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,5 @@ struct MaskingTable {
};

const size_t MOTIF_LEN = 8;
extern const std::unordered_set<Kmer<MOTIF_LEN>, Kmer<MOTIF_LEN>::Hash> motif_table;
extern std::unordered_set<Kmer<MOTIF_LEN>, Kmer<MOTIF_LEN>::Hash> motif_table;
void init_motif_table();
13 changes: 11 additions & 2 deletions src/masking/motifs.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "masking.h"

const std::unordered_set<Kmer<MOTIF_LEN>, Kmer<MOTIF_LEN>::Hash> motif_table = {
std::unordered_set<Kmer<MOTIF_LEN>, Kmer<MOTIF_LEN>::Hash> motif_table;

static const char motif_strings[][9] = {
"FRKYTAFT",
"KYTAFTIP",
"RKYTAFTI",
Expand Down Expand Up @@ -8001,4 +8003,11 @@ const std::unordered_set<Kmer<MOTIF_LEN>, Kmer<MOTIF_LEN>::Hash> motif_table = {
"EYRLYLDA",
"YRLYLDAY",
"QFHQKLLK",*/
};
};

void init_motif_table() {
const auto n = sizeof(motif_strings) / sizeof(motif_strings[0]);
motif_table.reserve(n);
for (size_t i = 0; i < n; ++i)
motif_table.insert(motif_strings[i]);
}
1 change: 1 addition & 0 deletions src/run/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ namespace Incremental {
int main(int ac, const char* av[])
{
try {
init_motif_table();
CommandLineParser parser;
config = Config(ac, av, true, parser);

Expand Down

0 comments on commit 4276e74

Please sign in to comment.