2 * This is a fragment, included from multiple places in ebwt_search.cpp.
3 * It implements the logic of the first phase of the 1-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
10 bt.setReportExacts(true);
13 cerr << "Error: Reads must be at least 2 characters long in 1-mismatch mode" << endl;
18 // First, try exact hits for the forward-oriented read
20 bt.setQuery(patsrc->bufa());
21 bt.setOffs(0, 0, s, s, s, s);
31 // Next, try exact hits for the reverse-complement read
32 bt.setQuery(patsrc->bufa());
33 bt.setOffs(0, 0, s, s, s, s);
40 if(sink->finishedWithStratum(0)) { // no more exact hits are possible
41 // the sink tells us we needn't try 1-mismatch alignments
45 bt.setReportExacts(false);
48 // Next, try hits with one mismatch on the 3' end for the reverse-complement read
49 bt.setQuery(patsrc->bufa());
50 bt.setOffs(0, 0, s5, s, s, s); // 1 mismatch allowed in 3' half
59 // Next, try hits with one mismatch on the 3' end for the reverse-complement read
60 bt.setQuery(patsrc->bufa());
61 bt.setOffs(0, 0, s5, s, s, s); // 1 mismatch allowed in 3' half