2 * This is a fragment, included from multiple places in ebwt_search.cpp.
3 * It implements the logic of the first phase of the 2/3-mismatch search
4 * routine. It is implemented as a code fragment so that it can be
5 * reused in both the half-index-in-memory and full-index-in-memory
9 // If requested, check that this read has the same length
10 // as all the previous ones
11 btr1.setReportExacts(true);
14 cerr << "Error: Read (" << name << ") is less than 3 characters long" << endl;
18 cerr << "Error: Read (" << name << ") is less than 4 characters long" << endl;
22 // Do an exact-match search on the forward pattern, just in
23 // case we can pick it off early here
25 btr1.setQuery(patsrc->bufa());
26 btr1.setOffs(0, 0, plen, plen, plen, plen);
27 if(btr1.backtrack()) {
33 // Set up backtracker with reverse complement
35 // Set up the revisitability of the halves
36 btr1.setQuery(patsrc->bufa());
37 btr1.setOffs(0, 0, s5, s5, two ? s : s5, s);
38 if(btr1.backtrack()) {
43 if(nofw && sink->finishedWithStratum(0)) { // no more exact hits are possible