kaori
A C++ library for barcode extraction and matching
|
Search for barcodes with mismatches anywhere. More...
#include <MismatchTrie.hpp>
Classes | |
struct | Result |
Results of search() . More... | |
Public Member Functions | |
AnyMismatches ()=default | |
AnyMismatches (SeqLength barcode_length, DuplicateAction duplicates) | |
TrieAddStatus | add (const char *barcode_seq) |
SeqLength | length () const |
BarcodeIndex | size () const |
void | optimize () |
Result | search (const char *search_seq, int max_mismatches) const |
Search for barcodes with mismatches anywhere.
Given an input sequence, this class performs a mismatch-aware search to a trie containing a pool of known barcode sequences. It will then return the barcode with the fewest mismatches to the input sequence. Any number of mismatches are supported, distributed anywhere throughout the sequence.
|
default |
Default constructor. This is only provided to enable composition, the resulting object should not be used until it is copy-assigned to a properly constructed instance.
|
inline |
barcode_length | Length of the barcode sequences. |
duplicates | How duplicate sequences across add() calls should be handled. |
|
inline |
[in] | barcode_seq | Pointer to a character array containing a barcode sequence. The array should have length equal to length() and should only contain IUPAC nucleotides or their lower-case equivalents (excepting U or gap characters). |
|
inline |
|
inline |
Attempt to optimize the trie for more cache-friendly look-ups. This is not necessary if sorted sequences are supplied in add()
.
|
inline |
[in] | search_seq | Pointer to a character array of length equal to length() , containing an input sequence to search against the barcode pool. |
max_mismatches | Maximum number of mismatches to consider in the search. This value should be non-negative. |
|
inline |
add()
.