1 #ifndef ALGO_BLAST_API___SEEDTOP__HPP
2 #define ALGO_BLAST_API___SEEDTOP__HPP
57 size_t tail_start = 0;
58 bool parse_failed =
false;
62 tail_start = unit.find(
']');
63 if (tail_start == string::npos){
68 allowed_letters =
string(unit, 1, tail_start - 2);
71 tail_start = unit.find(
'}');
72 if (tail_start == string::npos){
77 disallowed_letters =
string(unit, 1, tail_start - 2);
84 if (unit[0] >
'Z' || unit[0] <
'A'){
89 allowed_letters =
string(unit, 0, 1);
98 if (tail_start >= unit.size()) {
102 if (unit[tail_start] !=
'(' || unit[unit.size()-1] !=
')') {
106 string rep(unit, tail_start + 1, unit.size()-2-tail_start);
107 size_t pos_comma = rep.find(
',');
108 if (pos_comma == rep.npos) {
110 at_most = at_least + 1;
111 }
else if (pos_comma == rep.size() -1) {
117 pos_comma + 1, rep.size()-1-pos_comma)) + 1;
125 if (allowed_letters !=
"") {
126 return (allowed_letters.find(
letter) != allowed_letters.npos);
128 return (disallowed_letters.find(
letter) == disallowed_letters.npos);
158 void x_ParsePattern();
159 void x_MakeLookupTable();
160 void x_MakeScoreBlk();
162 void x_GetPatternRanges(vector<int> &pos,
166 vector<vector<int> > &ranges);
Contains C++ wrapper classes to structures in algo/blast/core as well as some auxiliary functions to ...
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
EBlastProgramType
Defines the engine's notion of the different applications of the BLAST algorithm.
Defines interface for retrieving sequence identifiers.
Defines BLAST error codes (user errors included)
Wrapper class for BlastScoreBlk .
Wrapper class for LookupTableWrap .
Include a standard set of the NCBI C++ Toolkit most basic headers.
string disallowed_letters
CBlastScoreBlk m_ScoreBlk
CLookupTableWrap m_Lookup
vector< CConstRef< CSeq_loc > > TSeedTopResults
vector< struct SPatternUnit > m_Units
SPatternUnit(const string unit)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
uint8_t Uint1
1-byte (8-bit) unsigned integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
void Run(void)
Enter the main loop.
Declares class which provides internal BLAST database representations to the internal BLAST APIs.
static Uint4 letter(char c)