public final class KMapper2 extends Object implements Serializable
align(NucleotideSequence, int, int) and align(NucleotideSequence) methods of this object are thread-safe and can
be concurrently used by several threads if no new sequences added after its first invocation.
Algorithm inspired by: Liao Y et al. The Subread aligner: fast, accurate and scalable read mapping by seed-and-vote. Nucleic Acids Res. 2013 May 1;41(10):e108. doi: 10.1093/nar/gkt214. Epub 2013 Apr 4.
| Modifier and Type | Field and Description |
|---|---|
static int |
SEED_NOT_FOUND_OFFSET |
| Constructor and Description |
|---|
KMapper2(int nValue,
int kValue,
int minDistance,
int maxDistance,
int absoluteMinClusterScore,
int extraClusterScore,
int absoluteMinScore,
float relativeMinScore,
int matchScore,
int mismatchScore,
int offsetShiftScore,
int slotCount,
int maxClusters,
int maxClusterIndels,
int kMersPerPosition,
boolean floatingLeftBound,
boolean floatingRightBound)
Creates new KMer mapper.
|
KMapper2(int nValue,
int kValue,
int minDistance,
int maxDistance,
int absoluteMinClusterScore,
int extraClusterScore,
int absoluteMinScore,
float relativeMinScore,
int matchScore,
int mismatchScore,
int offsetShiftScore,
int slotCount,
int maxClusters,
int maxClusterIndels,
int kMersPerPosition,
boolean floatingLeftBound,
boolean floatingRightBound,
KAligner2Statistics stat)
Creates new KMer mapper.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addReference(NucleotideSequence sequence)
Adds new reference sequence to the base of this mapper and returns index assigned to it.
|
KMappingResult2 |
align(NucleotideSequence sequence)
Performs an alignment.
|
KMappingResult2 |
align(NucleotideSequence sequence,
int from,
int to)
Performs an alignment for a part of the target sequence.
|
KMappingResult2 |
align(NucleotideSequence sequence,
int from,
int to,
BitArray filter)
Performs an alignment for a part of the target sequence.
|
KMappingHit2 |
calculateHit(int id,
IntArrayList data,
IntArrayList seedPositions)
Array list wrapper for
calculateHit(int, int[], int, int, IntArrayList). |
static KMapper2 |
createFromParameters(KAlignerParameters2 parameters)
Factory method to create KMapper2 using parameters specified in the
KAlignerParameters2
object. |
static KMapper2 |
createFromParameters(KAlignerParameters2 parameters,
KAligner2Statistics stat)
Factory method to create KMapper2 using parameters specified in the
KAlignerParameters2
object. |
protected void |
finalize() |
int |
getAbsoluteMinClusterScore()
Returns minimal score for the cluster
|
int |
getExtraClusterScore() |
int |
getKValue() |
int |
getMaxDistance()
Returns maximal distance between kMer seed positions in target sequence
|
int |
getMinDistance()
Returns minimal distance between kMer seed positions in target sequence
|
int |
getNValue()
Returns number of nucleotides in kMer (value of k)
|
org.apache.commons.math3.stat.descriptive.SummaryStatistics |
getRecordSizeSummaryStatistics()
Method used internally.
|
float |
getRelativeMinScore()
Returns maximal ratio between best hit score and other hits scores in returned result
|
static int |
positionInTarget(IntArrayList seedPositions,
int record) |
String |
toString() |
public static final int SEED_NOT_FOUND_OFFSET
public KMapper2(int nValue,
int kValue,
int minDistance,
int maxDistance,
int absoluteMinClusterScore,
int extraClusterScore,
int absoluteMinScore,
float relativeMinScore,
int matchScore,
int mismatchScore,
int offsetShiftScore,
int slotCount,
int maxClusters,
int maxClusterIndels,
int kMersPerPosition,
boolean floatingLeftBound,
boolean floatingRightBound)
nValue - nucleotides in kMer (value of k)minDistance - minimal distance between kMer seed positions in target sequencemaxDistance - maximal distance between kMer seed positions in target sequenceabsoluteMinClusterScore - minimal scorerelativeMinScore - maximal ratio between best hit score and other hits scores in returned resultmatchScore - reward for match (must be > 0)mismatchScore - penalty for mismatch (must be < 0)floatingLeftBound - true if left bound of alignment could be floatingfloatingRightBound - true if right bound of alignment could be floatingpublic KMapper2(int nValue,
int kValue,
int minDistance,
int maxDistance,
int absoluteMinClusterScore,
int extraClusterScore,
int absoluteMinScore,
float relativeMinScore,
int matchScore,
int mismatchScore,
int offsetShiftScore,
int slotCount,
int maxClusters,
int maxClusterIndels,
int kMersPerPosition,
boolean floatingLeftBound,
boolean floatingRightBound,
KAligner2Statistics stat)
nValue - nucleotides in kMer (value of k)minDistance - minimal distance between kMer seed positions in target sequencemaxDistance - maximal distance between kMer seed positions in target sequenceabsoluteMinClusterScore - minimal scorerelativeMinScore - maximal ratio between best hit score and other hits scores in returned resultmatchScore - reward for match (must be > 0)mismatchScore - penalty for mismatch (must be < 0)floatingLeftBound - true if left bound of alignment could be floatingfloatingRightBound - true if right bound of alignment could be floatingstat - statpublic static KMapper2 createFromParameters(KAlignerParameters2 parameters)
KAlignerParameters2
object.parameters - parameters instancepublic static KMapper2 createFromParameters(KAlignerParameters2 parameters, KAligner2Statistics stat)
KAlignerParameters2
object.parameters - parameters instancestat - statpublic int addReference(NucleotideSequence sequence)
sequence - sequencepublic KMappingResult2 align(NucleotideSequence sequence)
This methods is thread-safe and can be concurrently used by several threads if no new sequences added after its first invocation.
sequence - target sequencepublic KMappingResult2 align(NucleotideSequence sequence, int from, int to)
This methods is thread-safe and can be concurrently used by several threads if no new sequences added after its first invocation.
sequence - target sequencefrom - first nucleotide to align (inclusive)to - last nucleotide to align (exclusive)public KMappingResult2 align(NucleotideSequence sequence, int from, int to, BitArray filter)
This methods is thread-safe and can be concurrently used by several threads if no new sequences added after its first invocation.
sequence - target sequencefrom - first nucleotide to align (inclusive)to - last nucleotide to align (exclusive)filter - record filter (align only records with filter[id] == true)public KMappingHit2 calculateHit(int id, IntArrayList data, IntArrayList seedPositions)
calculateHit(int, int[], int, int, IntArrayList).public static int positionInTarget(IntArrayList seedPositions, int record)
public int getNValue()
public int getKValue()
public int getAbsoluteMinClusterScore()
public int getExtraClusterScore()
public int getMaxDistance()
public int getMinDistance()
public float getRelativeMinScore()
public org.apache.commons.math3.stat.descriptive.SummaryStatistics getRecordSizeSummaryStatistics()
Copyright © 2018. All rights reserved.