File: MapBySuffixArray.hpp

package info (click to toggle)
pbseqlib 5.3.5%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,020 kB
  • sloc: cpp: 77,250; python: 331; sh: 103; makefile: 41
file content (39 lines) | stat: -rw-r--r-- 1,848 bytes parent folder | download | duplicates (4)
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
#ifndef _BLASR_MAP_BY_SUFFIX_ARRAY_HPP_
#define _BLASR_MAP_BY_SUFFIX_ARRAY_HPP_

#include <algorithm>

#include <alignment/algorithms/alignment/SWAlign.hpp>
#include <alignment/algorithms/alignment/ScoreMatrices.hpp>
#include <alignment/datastructures/anchoring/AnchorParameters.hpp>
#include <alignment/datastructures/anchoring/MatchPos.hpp>
#include <alignment/suffixarray/SuffixArray.hpp>

/*
 * Parameters:
 * Eventually this should be strongly typed, since this is specific to
 * suffix array searching on DNASequence read/genome types.
 * reference  - should be of type DNASequence
 * sa         - shuld be of type SuffixArray
 * read       - may be of any DNASequence subclass.
 * tupleSize  - The length of the keyword used to speed up searching.
 * Out:
 *   matchLow - The starting point in the suffix array for the LCP
 *              match for the read at pos p.
 *   matchHigh -The same array but for the upper bound.
 *   saMatchLength - The length of the lcp.
 */
template <typename T_SuffixArray, typename T_RefSequence, typename T_Sequence>
int LocateAnchorBoundsInSuffixArray(T_RefSequence &reference, T_SuffixArray &sa, T_Sequence &read,
                                    unsigned int minPrefixMatchLength,
                                    std::vector<DNALength> &matchLow,
                                    std::vector<DNALength> &matchHigh,
                                    std::vector<DNALength> &matchLength, AnchorParameters &params);

template <typename T_SuffixArray, typename T_RefSequence, typename T_Sequence, typename T_MatchPos>
int MapReadToGenome(T_RefSequence &reference, T_SuffixArray &sa, T_Sequence &read,
                    unsigned int minPrefixMatchLength, std::vector<T_MatchPos> &matchPosList,
                    AnchorParameters &anchorParameters);

#include "MapBySuffixArrayImpl.hpp"
#endif