Class SQTagUtil

java.lang.Object
htsjdk.samtools.SQTagUtil

@Deprecated public class SQTagUtil extends Object
Deprecated.
since 11/2018. SQ is a reserved tag that shouldn't be used and this code untested.
Utility methods for encoding and decoding the SQ tag value of SAMRecord.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Deprecated.
    The ordinals of these are stored in the high-order 2 bits of each byte of the SQ tag.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte
    baseAndProbDiffToSqValue(int base, byte probRatio)
    Deprecated.
    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
    Deprecated.
    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)
    Deprecated.
    Reverses and complements the sqValues in place.
    static byte
    sqScaledProbabilityRatio(double secondBestLikelihood, double thirdBestLikelihood)
    Deprecated.
    Convert a pair of likelihoods into a value suitable for passing to baseAndProbDiffToSqValue.
    sqValueToBase(byte sqValue)
    Deprecated.
    Retrieve the 2nd-best base call from SQ value.
    static int
    sqValueToBaseOrdinal(byte sqValue)
    Deprecated.
    Retrieve the 2nd-best base call from SQ value.
    static byte
    sqValueToProbRatio(byte sqValue)
    Deprecated.
    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 Details

  • Constructor Details

    • SQTagUtil

      public SQTagUtil()
      Deprecated.
  • Method Details

    • sqScaledProbabilityRatio

      public static byte sqScaledProbabilityRatio(double secondBestLikelihood, double thirdBestLikelihood)
      Deprecated.
      Convert a pair of likelihoods into a value suitable for passing to baseAndProbDiffToSqValue.
      Parameters:
      secondBestLikelihood - Probability of the 2nd-best base call. 1 > secondBestLikelihood > thirdBestLikelihood.
      thirdBestLikelihood - Probability of the 3rd-best base call. thirdBestLikelihood > 0.
      Returns:
      ratio of input probabilities for storing in SQ tag.
    • baseAndProbDiffToSqValue

      public static byte baseAndProbDiffToSqValue(SQTagUtil.SQBase base, byte probRatio)
      Deprecated.
      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.
      Parameters:
      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.
      Returns:
      a byte containing the index and the log probability difference.
    • baseAndProbDiffToSqValue

      public static byte baseAndProbDiffToSqValue(int base, byte probRatio)
      Deprecated.
      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.
      Parameters:
      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.
      Returns:
      a byte containing the index and the log probability difference.
    • sqValueToProbRatio

      public static byte sqValueToProbRatio(byte sqValue)
      Deprecated.
      Retrieve SQ-scaled probability ratio from SQ value.
      Parameters:
      sqValue -
      Returns:
      the log probability difference between the secondary and tertiary bases (-10log10(p3/p2)).
    • sqValueToBase

      public static SQTagUtil.SQBase sqValueToBase(byte sqValue)
      Deprecated.
      Retrieve the 2nd-best base call from SQ value.
      Parameters:
      sqValue -
      Returns:
      2nd-best base call.
    • sqValueToBaseOrdinal

      public static int sqValueToBaseOrdinal(byte sqValue)
      Deprecated.
      Retrieve the 2nd-best base call from SQ value.
      Parameters:
      sqValue -
      Returns:
      Ordinal of 2nd-best base call.
    • reverseComplementSqArray

      public static void reverseComplementSqArray(byte[] sqArray)
      Deprecated.
      Reverses and complements the sqValues in place.
      Parameters:
      sqArray - Array of SQ-values, with 2nd-best base in high-order 2 bits, and probability diff in low-order 6 bits.