Search for barcodes with mismatches anywhere.
More...
#include <MismatchTrie.hpp>
Search for barcodes with mismatches anywhere.
This MismatchTrie
subclass will search for the best match to known sequences in a barcode pool. Any number of mismatches are supported, distributed anywhere throughout the sequence.
◆ AnyMismatches() [1/2]
kaori::AnyMismatches::AnyMismatches |
( |
| ) |
|
|
inline |
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.
◆ AnyMismatches() [2/2]
kaori::AnyMismatches::AnyMismatches |
( |
size_t |
barcode_length, |
|
|
DuplicateAction |
duplicates |
|
) |
| |
|
inline |
- Parameters
-
barcode_length | Length of the barcode sequences. |
duplicates | How duplicate sequences across add() calls should be handled. |
◆ search()
std::pair< int, int > kaori::AnyMismatches::search |
( |
const char * |
search_seq, |
|
|
int |
max_mismatches |
|
) |
| const |
|
inline |
- Parameters
-
[in] | search_seq | Pointer to a character array containing a sequence to use for searching the barcode pool. This is assumed to be of length equal to get_length() and is typically derived from a read. |
| max_mismatches | Maximum number of mismatches in the search. |
- Returns
- Pair containing:
- The index of the barcode sequence with the lowest number of mismatches to
search_seq
. This is only non-negative if a barcode was unambiguously matched with no more mismatches than max_mismatches
. If multiple sequences have the same lowest number of mismatches, the match is ambiguous and MismatchTrie::STATUS_AMBIGUOUS
is returned. If all sequences have more mismatches than max_mismatches
, MismatchTrie::STATUS_MISSING
is returned.
- The number of mismatches.
The documentation for this class was generated from the following file: