File: search_exact.c

package info (click to toggle)
bowtie 1.2.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,704 kB
  • sloc: cpp: 35,614; perl: 5,903; ansic: 1,247; sh: 1,128; python: 483; makefile: 426
file content (27 lines) | stat: -rw-r--r-- 746 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * This is a fragment, included from multiple places in ebwt_search.cpp.
 * It implements the logic of the exact-search routine.  It is
 * implemented as a code fragment so that it can be reused in both
 * paired and unpaired alignment.
 */
{
	uint32_t plen = (uint32_t)length(patsrc->bufa().patFw);
	if(!nofw) {
		// Match against forward strand
		params.setFw(true);
		bt.setQuery(patsrc->bufa());
		bt.setOffs(0, 0, plen, plen, plen, plen);
		// If we matched on the forward strand, ignore the reverse-
		// complement strand
		if(bt.backtrack()) {
			continue;
		}
	}
	if(!norc) {
		// Process reverse-complement read
		params.setFw(false);
		bt.setQuery(patsrc->bufa());
		bt.setOffs(0, 0, plen, plen, plen, plen);
		bt.backtrack();
	}
}