File: base.cpp

package info (click to toggle)
seqan2 2.3.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 222,320 kB
  • ctags: 40,872
  • sloc: cpp: 252,894; ansic: 86,805; python: 6,534; sh: 985; xml: 570; makefile: 236; awk: 51
file content (61 lines) | stat: -rw-r--r-- 1,973 bytes parent folder | download | duplicates (7)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <seqan/basic.h>
#include <seqan/sequence.h>

using namespace seqan;

//![assignment2]
template <typename TString, typename TPattern>
void findPatternInReference(String<int> & hits,
                            TString const & reference,
                            TPattern const & pattern)
{
// [A] Check whether pattern fits into the sequence.

// [B] Iterate over all positions at which the pattern might occur.

// [C] Evaluate all positions of the pattern until you find a mismatch or you have found a hit.

// [D] Report begin position at which pattern matches the sequence.
}
//![assignment2]

//![assignment3]
template <typename TJournalEntriesIterator, typename TPattern>
void _findInOriginalNode(String<int> & hitTarget,
                         TJournalEntriesIterator & entriesIt,
                         TPattern const & pattern,
                         String<int> const & refHits)
{
// [A] Check if hits exist in the reference.

// [B] Find upper bound to current physical position in sorted refHits using std::upper_bound.

// [C] Make sure we do not miss hits that begin at physical position of current node.

// [D] Store all hits that are found in the region of the reference which is covered by this node.

// [E] Store the correct virtual position and check next hit.
}
//![assignment3]

//![assignment4]
template <typename TJournalEntriesIterator, typename TJournal, typename TPattern>
void _searchAtBorder(String<int> & hitTarget,
                     TJournalEntriesIterator & entriesIt,
                     TJournal const & journal,
                     TPattern const & pattern)
{
// [A] Determine first position of the at which pattern crosses the border of current node.

// [B] Determine last position before pattern exits the current node or reaches the end of the sequence.

// [C] Move step by step over search region.

// [D] Scan pattern in current window and report possible hits.
}
//![assignment4]

int main()
{
	return 0;
}