public abstract class BarcodeMatcher extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
allowedMismatches
The number of allowed mismatchines when matching to a barcode.
|
protected it.unimi.dsi.fastutil.ints.Int2LongMap |
barcodeIndexToHitsMap
Map of barcode index to the number of entries found for that barcode.
|
protected int |
barcodeLength
The length of the actual barcode (not including the adapter).
|
protected it.unimi.dsi.lang.MutableString[] |
barcodes
The barcode strings (including adapters).
|
| Constructor and Description |
|---|
BarcodeMatcher() |
| Modifier and Type | Method and Description |
|---|---|
int |
getAllowedMismatches()
The number of allowed mismatches when matching a sequence to the barcodes.
|
it.unimi.dsi.fastutil.ints.Int2LongMap |
getBarcodeIndexToHitsMap()
Get the map of barcode index to the number of entries found for that barcode.
|
int |
getBarcodeLength()
The length of the actual barcode (without the adapter).
|
it.unimi.dsi.lang.MutableString |
getBarcodeOnlyAtIndex(int index)
Get the barcode WITHOUT the adapter for the given barcode index.
|
it.unimi.dsi.lang.MutableString |
getBarcodeWithAdapterAtIndex(int index)
Get the barcode with adapter for the given barcode index.
|
void |
init(String[] barcodesStrArray,
int barcodeLength,
int allowedMismatches)
Used by constructors to make a BarcodeMatcher.
|
BarcodeMatcherResult |
matchSequence(it.unimi.dsi.lang.MutableString sequence)
Determines which barcode this sequence matches or returns null if a barcode isn't found for
the sequence (withing the number of allowedMismatches).
|
protected final it.unimi.dsi.fastutil.ints.Int2LongMap barcodeIndexToHitsMap
protected it.unimi.dsi.lang.MutableString[] barcodes
protected int barcodeLength
protected int allowedMismatches
public void init(String[] barcodesStrArray, int barcodeLength, int allowedMismatches)
barcodesStrArray - MutableString version of the barcodes strings (including trailing adapter).barcodeLength - the length of the barcode (not including the adapter)allowedMismatches - the number of allowed mismatches when matching to be acceptablepublic BarcodeMatcherResult matchSequence(it.unimi.dsi.lang.MutableString sequence)
sequence - the sequence to get the barcode forpublic it.unimi.dsi.fastutil.ints.Int2LongMap getBarcodeIndexToHitsMap()
public it.unimi.dsi.lang.MutableString getBarcodeWithAdapterAtIndex(int index)
index - barcode indexpublic it.unimi.dsi.lang.MutableString getBarcodeOnlyAtIndex(int index)
index - barcode indexpublic int getBarcodeLength()
public int getAllowedMismatches()
Copyright © 2018 Campagne Laboratory. All rights reserved.