|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object htsjdk.samtools.SQTagUtil
public class SQTagUtil
Utility methods for encoding and decoding the SQ tag value of SAMRecord.
Nested Class Summary | |
---|---|
static class |
SQTagUtil.SQBase
The ordinals of these are stored in the high-order 2 bits of each byte of the SQ tag. |
Field Summary | |
---|---|
static byte |
MAX_QUALITY
|
Constructor Summary | |
---|---|
SQTagUtil()
|
Method Summary | |
---|---|
static byte |
baseAndProbDiffToSqValue(int base,
byte probRatio)
Compress a base and a log probabiliy difference (-10log10(p3/p2)) into a single byte so that it can be output in a SAMRecord's SQ field. |
static byte |
baseAndProbDiffToSqValue(SQTagUtil.SQBase base,
byte probRatio)
Compress a base and a log probabiliy difference (-10log10(p3/p2)) into a single byte so that it can be output in a SAMRecord's SQ field. |
static void |
reverseComplementSqArray(byte[] sqArray)
Reverses and complements the sqValues in place. |
static byte |
sqScaledProbabilityRatio(double secondBestLikelihood,
double thirdBestLikelihood)
Convert a pair of likelihoods into a value suitable for passing to baseAndProbDiffToSqValue. |
static SQTagUtil.SQBase |
sqValueToBase(byte sqValue)
Retrieve the 2nd-best base call from SQ value. |
static int |
sqValueToBaseOrdinal(byte sqValue)
Retrieve the 2nd-best base call from SQ value. |
static byte |
sqValueToProbRatio(byte sqValue)
Retrieve SQ-scaled probability ratio from SQ value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte MAX_QUALITY
Constructor Detail |
---|
public SQTagUtil()
Method Detail |
---|
public static byte sqScaledProbabilityRatio(double secondBestLikelihood, double thirdBestLikelihood)
secondBestLikelihood
- Probability of the 2nd-best base call. 1 > secondBestLikelihood > thirdBestLikelihood.thirdBestLikelihood
- Probability of the 3rd-best base call. thirdBestLikelihood > 0.
public static byte baseAndProbDiffToSqValue(SQTagUtil.SQBase base, byte probRatio)
base
- the 2nd-best base.probRatio
- the log probability difference between the secondary and tertiary bases (-10log10(p3/p2)),
rounded to an integer and capped so it fits in 6 bits.
public static byte baseAndProbDiffToSqValue(int base, byte probRatio)
base
- the 2nd-best base (A=0, C=1, G=2, T=3).probRatio
- the log probability difference between the secondary and tertiary bases (-10log10(p3/p2)),
rounded to an integer and capped so it fits in 6 bits. If this value is > MAX_QUALITY, it is truncated to that.
public static byte sqValueToProbRatio(byte sqValue)
sqValue
-
public static SQTagUtil.SQBase sqValueToBase(byte sqValue)
sqValue
-
public static int sqValueToBaseOrdinal(byte sqValue)
sqValue
-
public static void reverseComplementSqArray(byte[] sqArray)
sqArray
- Array of SQ-values, with 2nd-best base in high-order 2 bits, and probability diff
in low-order 6 bits.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |