Commit patch to not break on spaces.
[bowtie.git] / search_1mm_phase2.c
1 /*
2  * This is a fragment, included from multiple places in ebwt_search.cpp.
3  * It implements the logic of the second 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
6  * situations.
7  */
8 {
9         bt.setEbwt(&ebwtBw);
10         bt.setReportExacts(false);
11
12         if(!norc) {
13                 params.setFw(false);
14                 // Next, try hits with one mismatch on the 3' end for the reverse-complement read
15                 bt.setQuery(patsrc->bufa());
16                 bt.setOffs(0, 0, s3, s, s, s); // 1 mismatch allowed in 3' half
17                 if(bt.backtrack()) {
18                         continue;
19                 }
20         }
21
22         if(!nofw) {
23                 params.setFw(true);
24                 // Next, try hits with one mismatch on the 3' end for the reverse-complement read
25                 bt.setQuery(patsrc->bufa());
26                 bt.setOffs(0, 0, s3, s, s, s); // 1 mismatch allowed in 3' half
27                 if(bt.backtrack()) {
28                         continue;
29                 }
30         }
31 }