Class DnaSequenceByte

java.lang.Object
org.snpeff.binseq.DnaSequenceByte

public class DnaSequenceByte extends Object
Binary packed DNA sequence.

Notes: - This is designed for short sequences (such as "short reads") - Every base is encoded in 2 bits {a, c, g, t} invalid input: '<'=> {0, 1, 2, 3} - All bits are stored in an array of 'bytes; - Most significant bits are the first bases in the sequence (makes comparison easier)

Author:
pcingola
  • Field Details

    • BASES_PER_BYTE

      public static final int BASES_PER_BYTE
      See Also:
    • BITS_PER_BASE

      public static final int BITS_PER_BASE
      See Also:
    • MASK

      public static final byte[] MASK
    • BASES

      public static final char[] BASES
    • BASE2CODE

      public static final byte[] BASE2CODE
  • Constructor Details

    • DnaSequenceByte

      public DnaSequenceByte(int length, byte[] codes)
    • DnaSequenceByte

      public DnaSequenceByte(String seqStr)
  • Method Details

    • getBase

      public char getBase(int index)
    • getCodes

      public byte[] getCodes()
    • getLength

      public int getLength()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • length

      public int length()
      Sequence lenth
    • set

      public void set(String seqStr)
      Set sequence
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringHex

      public String toStringHex()