BitMagic-C++: DNA_FingerprintScanner Class Reference

BitMagic-C++

Public Types | Public Member Functions | Protected Member Functions
DNA_FingerprintScanner Class Reference

Utility for keeping all DNA finger print vectors and search using various techniques. More...

## Public Types
enum | { eA = 0, eC, eG, eT, eN, eEnd }
enum | { eA = 0, eC, eG, eT, eN, eEnd }

## Public Member Functions
| DNA_FingerprintScanner ()
void | Build (const vector< char > &sequence)
| Build fingerprint bit-vectors from the original sequence. More...
const bm::bvector & | GetVector (char letter) const
| Return fingerprint bit-vector. More...
void | Find (const string &word, vector< unsigned > &res)
| Find word strings using shift + and on fingerprint vectors (horizontal, non-fused basic method) More...
void | FindAggFused (const string &word, vector< unsigned > &res)
| This method uses cache blocked aggregator with fused SHIFT+AND kernel. More...
void | FindCollection (const vector< tuple< string, int > > &words, vector< vector< unsigned >> &hits)
| Find a set of words in one pass using pipeline of aggregators (this is very experimental) More...
| DNA_FingerprintScanner ()
void | Build (const vector< char > &sequence)
| Build fingerprint bit-vectors from the original sequence. More...
void | BuildBulk (const vector< char > &sequence)
| Build index using bulk insert iterator. More...
void | BuildParallel (const vector< char > &sequence, unsigned threads)
| Build fingerprint bit-vectors using bulk insert iterator and parallel processing. More...
void | MergeVector (char letter, bm::bvector<> &bv)
| Thread sync bit-vector merge. More...
const bm::bvector & | GetVector (char letter) const
| Return fingerprint bit-vector. More...

## Protected Member Functions
void | TranslateResults (const bm::bvector<> &bv, unsigned left_shift, vector< unsigned > &res)
| Translate search results vector using (word size) left shift. More...

## Detailed Description

Utility for keeping all DNA finger print vectors and search using various techniques.

Examples
  xsample04.cpp, and xsample04a.cpp.

Definition at line 180 of file xsample04.cpp.

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
eA |
eC |
eG |
eT |
eN |
eEnd |

Definition at line 183 of file xsample04.cpp.

## ◆ anonymous enum

anonymous enum

Enumerator
eA |
eC |
eG |
eT |
eN |
eEnd |

Definition at line 154 of file xsample04a.cpp.

## Constructor & Destructor Documentation

## ◆ DNA_FingerprintScanner() [1/2]

DNA_FingerprintScanner::DNA_FingerprintScanner | ( |  | ) |
| inline

Definition at line 185 of file xsample04.cpp.

## ◆ DNA_FingerprintScanner() [2/2]

DNA_FingerprintScanner::DNA_FingerprintScanner | ( |  | ) |
| inline

Definition at line 156 of file xsample04a.cpp.

## Member Function Documentation

## ◆ Build() [1/2]

void DNA_FingerprintScanner::Build | ( | const vector< char > & | sequence | ) |
| inline

Build fingerprint bit-vectors from the original sequence.

Definition at line 160 of file xsample04a.cpp.

## ◆ Build() [2/2]

void DNA_FingerprintScanner::Build | ( | const vector< char > & | sequence | ) |
| inline

Build fingerprint bit-vectors from the original sequence.

Examples
  xsample04.cpp, and xsample04a.cpp.

Definition at line 189 of file xsample04.cpp.

References bm::BM_SORTED.

Referenced by main().

## ◆ BuildBulk()

void DNA_FingerprintScanner::BuildBulk | ( | const vector< char > & | sequence | ) |
| inline

Build index using bulk insert iterator.

Definition at line 196 of file xsample04a.cpp.

References bm::BM_SORTED.

## ◆ BuildParallel()

void DNA_FingerprintScanner::BuildParallel | ( | const vector< char > & | sequence,
|  | unsigned | threads
| ) |  |
| inline

Build fingerprint bit-vectors using bulk insert iterator and parallel processing.

Examples
  xsample04a.cpp.

Definition at line 234 of file xsample04a.cpp.

References bm::BM_SORTED, bm::bvector< Alloc >::bulk_insert_iterator::flush(), and MergeVector().

Referenced by main().

## ◆ Find()

void DNA_FingerprintScanner::Find | ( | const string & | word,
|  | vector< unsigned > & | res
| ) |  |
| inline

Find word strings using shift + and on fingerprint vectors (horizontal, non-fused basic method)

Examples
  xsample04.cpp.

Definition at line 250 of file xsample04.cpp.

References bm::bvector< Alloc >::any(), and bm::bvector< Alloc >::shift_right().

Referenced by main().

## ◆ FindAggFused()

void DNA_FingerprintScanner::FindAggFused | ( | const string & | word,
|  | vector< unsigned > & | res
| ) |  |
| inline

This method uses cache blocked aggregator with fused SHIFT+AND kernel.

Examples
  xsample04.cpp.

Definition at line 277 of file xsample04.cpp.

Referenced by main().

## ◆ FindCollection()

void DNA_FingerprintScanner::FindCollection | ( | const vector< tuple< string, int > > & | words,
|  | vector< vector< unsigned >> & | hits
| ) |  |
| inline

Find a set of words in one pass using pipeline of aggregators (this is very experimental)

Examples
  xsample04.cpp.

Definition at line 302 of file xsample04.cpp.

References bm::aggregator_pipeline_execute(), bm::aggregator< bm::bvector<> >::BM_SHIFT_R_AND, and bm::aggregator< BV >::get_target().

Referenced by main().

## ◆ GetVector() [1/2]

const bm::bvector& DNA_FingerprintScanner::GetVector | ( | char | letter | ) | const
| inline

Return fingerprint bit-vector.

Examples
  xsample04a.cpp.

Definition at line 226 of file xsample04.cpp.

Referenced by fingerprint_compare().

## ◆ GetVector() [2/2]

const bm::bvector& DNA_FingerprintScanner::GetVector | ( | char | letter | ) | const
| inline

Return fingerprint bit-vector.

Definition at line 371 of file xsample04a.cpp.

## ◆ MergeVector()

void DNA_FingerprintScanner::MergeVector | ( | char | letter,
|  | bm::bvector<> & | bv
| ) |  |
| inline

Thread sync bit-vector merge.

Examples
  xsample04a.cpp.

Definition at line 324 of file xsample04a.cpp.

Referenced by BuildParallel().

## ◆ TranslateResults()

void DNA_FingerprintScanner::TranslateResults | ( | const bm::bvector<> & | bv,
|  | unsigned | left_shift,
|  | vector< unsigned > & | res
| ) |  |
| inlineprotected

Translate search results vector using (word size) left shift.

Definition at line 344 of file xsample04.cpp.

References bm::bvector< Alloc >::first(), and bm::bvector< Alloc >::iterator_base::valid().

The documentation for this class was generated from the following files:

- xsample04.cpp
- xsample04a.cpp