diff --git a/src/parser.h b/src/parser.h index 3eefc4c..f62006c 100644 --- a/src/parser.h +++ b/src/parser.h @@ -187,6 +187,10 @@ std::pair ReadIntervals(kh_O64_t *intervals, kh_S64_t *kMers, st --beforeKMerEnd; if (beforeKMerEnd == 0) { bool represented = kh_get_S64(kMers, currentKMer) != kh_end(kMers); + if (!represented && complements) { + auto rc = ReverseComplement(currentKMer, k); + represented = kh_get_S64(kMers, rc) != kh_end(kMers); + } bool set = false; if (represented) { interval_used = true; diff --git a/tests/masks_unittest.h b/tests/masks_unittest.h index 0d1e93c..a497fdd 100644 --- a/tests/masks_unittest.h +++ b/tests/masks_unittest.h @@ -115,7 +115,7 @@ namespace { TEST(Mask, OptimizeRuns2) { std::string path = std::filesystem::current_path(); - path += "/tests/testdata/runstest2.fa"; // ACTaGta + path += "/tests/testdata/runstest2.fa"; // ACtaGta struct TestCase { std::vector kMers; diff --git a/tests/testdata/runstest2.fa b/tests/testdata/runstest2.fa index e46b425..9cd3768 100644 --- a/tests/testdata/runstest2.fa +++ b/tests/testdata/runstest2.fa @@ -1,2 +1,2 @@ > superstring -ACTaGta \ No newline at end of file +ACtaGta \ No newline at end of file