BitMagic-C++
|
Example: DNA substring search. More...
#include <iostream>
#include <sstream>
#include <chrono>
#include <regex>
#include <time.h>
#include <stdio.h>
#include <stdexcept>
#include <memory>
#include <vector>
#include <map>
#include <utility>
#include <algorithm>
#include <unordered_map>
#include "bm.h"
#include "bmalgo.h"
#include "bmserial.h"
#include "bmaggregator.h"
#include "bmdbg.h"
#include "bmtimer.h"
#include "bmundef.h"
Go to the source code of this file.
Data Structures | |
class | DNA_FingerprintScanner |
Utility for keeping all DNA finger print vectors and search using various techniques. More... | |
Typedefs | |
typedef std::map< std::string, unsigned > | freq_map |
typedef std::vector< std::pair< unsigned, std::string > > | dict_vect |
typedef bm::aggregator< bm::bvector<> > | aggregator_type |
using | THitList = vector< unsigned > |
Functions | |
static void | show_help () |
More... | |
static int | parse_args (int argc, char *argv[]) |
More... | |
static int | load_FASTA (const std::string &fname, std::vector< char > &seq_vect) |
More... | |
static void | generate_kmers (vector< tuple< string, int >> &top_words, vector< tuple< string, int >> &lo_words, const vector< char > &data, size_t N, unsigned word_size) |
generate the most frequent words of specified length from the input sequence More... | |
static void | find_word_2way (vector< char > &data, const char *word, unsigned word_size, THitList &r) |
2-way string matching More... | |
static void | find_words (const vector< char > &data, vector< const char * > words, unsigned word_size, vector< vector< unsigned >> &hits) |
Find all words in one pass (cache coherent algorithm) (variation of 2-way string matching for collection search) More... | |
static bool | hitlist_compare (const THitList &h1, const THitList &h2) |
Check search result match. More... | |
int | main (int argc, char *argv[]) |
More... | |
Variables | |
std::string | ifa_name |
More... | |
bool | is_diag = false |
More... | |
bool | is_timing = false |
More... | |
bool | is_bench = false |
More... | |
bool | is_search = false |
More... | |
bool | h_word_set = true |
More... | |
bm::chrono_taker ::duration_map_type | timing_map |
More... | |
static const size_t | WORD_SIZE = 28 |
More... | |
Example: DNA substring search.
Definition in file xsample04.cpp.
|
static |
2-way string matching
Definition at line 421 of file xsample04.cpp.
Referenced by main().
|
static |
Find all words in one pass (cache coherent algorithm) (variation of 2-way string matching for collection search)
Definition at line 451 of file xsample04.cpp.
Referenced by main().
|
static |
generate the most frequent words of specified length from the input sequence
Definition at line 367 of file xsample04.cpp.
Referenced by main().
Check search result match.
Definition at line 490 of file xsample04.cpp.
Referenced by main().
|
static |
Definition at line 152 of file xsample04.cpp.
References timing_map.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 508 of file xsample04.cpp.
References DNA_FingerprintScanner::Build(), DNA_FingerprintScanner::Find(), find_word_2way(), find_words(), DNA_FingerprintScanner::FindAggFused(), DNA_FingerprintScanner::FindCollection(), generate_kmers(), h_word_set, hitlist_compare(), ifa_name, is_search, is_timing, load_FASTA(), parse_args(), bm::chrono_taker< TOut >::print_duration_map(), show_help(), timing_map, and WORD_SIZE.
|
static |
Definition at line 80 of file xsample04.cpp.
References h_word_set, ifa_name, is_bench, is_diag, is_search, is_timing, and show_help().
Referenced by main().
|
static |
Definition at line 56 of file xsample04.cpp.
Referenced by main(), and parse_args().