Packages

final case class NTBitArray(data: Array[Long], size: Int) extends Ordered[NTBitArray] with Product with Serializable

A bit-packed sequence of nucleotides, where each letter is represented by two bits. Some operations mutate this object, and others return a new object instead. A new copy can always be obtained with clone(). No operations can change the size of the contained sequence.

data

the encoded data. Array of longs, each storing up to 32 nts, with optional padding at the end. The data is left-aligned inside the long, starting from MSB.

size

the size of this data represented (in NTs)

Linear Supertypes
Serializable, Serializable, Product, Equals, Ordered[NTBitArray], Comparable[NTBitArray], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NTBitArray
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Ordered
  7. Comparable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NTBitArray(data: Array[Long], size: Int)

    data

    the encoded data. Array of longs, each storing up to 32 nts, with optional padding at the end. The data is left-aligned inside the long, starting from MSB.

    size

    the size of this data represented (in NTs)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def &=(other: NTBitArray): NTBitArray.this.type

    Bitwise and of NT bit arrays.

    Bitwise and of NT bit arrays. Applies the operation up to the shortest length of the two. Mutates this object to write the result.

  4. def <(that: NTBitArray): Boolean
    Definition Classes
    Ordered
  5. def <<=(bits: Int): NTBitArray.this.type

    Bitwise left shift of NT bit arrays.

    Bitwise left shift of NT bit arrays. Will not change the length of the array, so data will be lost. Mutates this object to write the result.

  6. def <=(that: NTBitArray): Boolean
    Definition Classes
    Ordered
  7. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def >(that: NTBitArray): Boolean
    Definition Classes
    Ordered
  9. def >=(that: NTBitArray): Boolean
    Definition Classes
    Ordered
  10. def >>>=(bits: Int): NTBitArray.this.type

    Bitwise unsigned right shift of NT bit arrays.

    Bitwise unsigned right shift of NT bit arrays. Will not change the length of the array, so data will be lost. Mutates this object to write the result.

  11. def ^=(other: NTBitArray): NTBitArray.this.type

    Bitwise xor of NT bit arrays.

    Bitwise xor of NT bit arrays. Applies the operation up to the shortest length of the two. Mutates this object to write the result.

  12. def apply(pos: Int): Byte

    Obtain the (twobit) NT at a given position.

    Obtain the (twobit) NT at a given position. Only the lowest two bits of the byte are valid. The others will be zeroed out.

  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def canonical: NTBitArray

    Return a new object that is either equal to this array or to its reverse complement, and that has forward orientation.

  15. def clear(): Unit
  16. def clone(): NTBitArray
    Definition Classes
    NTBitArray → AnyRef
  17. def cloneWithLength(length: Int): NTBitArray

    Clone this NTBitArray with a new length, adding an AAAA suffix or truncating as needed.

  18. def compare(other: NTBitArray): Int

    Lexicographic comparison of two NT bit arrays.

    Lexicographic comparison of two NT bit arrays. The arrays must have equal length.

    Definition Classes
    NTBitArray → Ordered
  19. def compareTo(that: NTBitArray): Int
    Definition Classes
    Ordered → Comparable
  20. def copySliceAsLongArray(writeTo: Array[Long], offset: Int, partSize: Int): Unit

    Write a subsequence of this sequence to the provided long array.

    Write a subsequence of this sequence to the provided long array.

    writeTo

    destination to write to (at offset zero)

    offset

    offset to read from (0-based)

    partSize

    amount to write

  21. val data: Array[Long]
  22. def dataOrBlank(offset: Int): Long
  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(obj: Any): Boolean
    Definition Classes
    NTBitArray → Equals → AnyRef → Any
  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  26. def hashCode(): Int
    Definition Classes
    NTBitArray → AnyRef → Any
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. def kmersAsLongArrays(k: Int, orientation: Orientation = Unchanged): Iterator[Array[Long]]

    Obtain all k-mers from this bit array as long arrays.

    Obtain all k-mers from this bit array as long arrays.

    k

    length of k-mers

    orientation

    orientation filter for k-mers

    returns

    All k-mers as an iterator

  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  32. def reverseComplement: NTBitArray

    Return a new array that is the reverse complement of this array

  33. def shiftAddBP(add: Byte): NTBitArray.this.type

    Shift this NT bit array one BP to the left, dropping one bp, and add one bp on the right, maintaining the same length.

    Shift this NT bit array one BP to the left, dropping one bp, and add one bp on the right, maintaining the same length. Mutates in place.

  34. val size: Int
  35. def sliceAsCopy(sliceStart: Int, sliceLength: Int): NTBitArray

    Construct a new NTBitArray from a subsequence of this one, copying data from this object.

  36. def sliceAsLongArray(offset: Int, sliceSize: Int): Array[Long]

    Create a long array representing a subsequence of this sequence.

    Create a long array representing a subsequence of this sequence.

    offset

    0-based offset

    sliceSize

    size

  37. def sliceIsForwardOrientation(pos: Int, sliceSize: Int): Boolean

    Test the orientation of a slice of this buffer.

    Test the orientation of a slice of this buffer.

    pos

    Start position

    sliceSize

    Length of slice (must be an odd number)

    returns

    True iff this slice has forward orientation.

  38. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  39. def toBinaryString: String
  40. def toInt: Int

    Represent this bit array as a right-aligned int.

    Represent this bit array as a right-aligned int. Only well-defined if the value is small enough to fit in a positive integer (size <= 15). toInt and NTBitArray$.fromLong are inverses as long as this holds true.

  41. def toLong: Long

    Represent this bit array as a right-aligned long.

    Represent this bit array as a right-aligned long. Only well-defined if the value is small enough to fit in a positive long. (size <= 31). toLong and NTBitArray$.fromLong are inverses as long as this holds true.

  42. def toString(): String
    Definition Classes
    NTBitArray → AnyRef → Any
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  45. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def writeCanonical(buffer: NTBitArray): NTBitArray

    Write either this array or its reverse complement (whichever has forward orientation) to the provided buffer.

    Write either this array or its reverse complement (whichever has forward orientation) to the provided buffer. The buffer must have the same size as this array.

    buffer

    The buffer to write the canonical form to

    returns

    The buffer for chaining

  47. def writeKmersToBuilder(destination: KmerTableBuilder, k: Int, orientation: Orientation, provider: RowTagProvider = EmptyRowTagProvider): Unit

    Write all k-mers from this bit array into a KmerTableBuilder.

    Write all k-mers from this bit array into a KmerTableBuilder.

    destination

    builder to write to

    k

    k

    orientation

    orientation filter for k-mers

    provider

    function to generate extra (tag) data for the k-mer starting at each column (offset). By default, no extra data is generated.

  48. def writeReverseComplement(buffer: NTBitArray): NTBitArray

    Write the reverse complement of this array to the provided buffer.

    Write the reverse complement of this array to the provided buffer.

    buffer

    The buffer to write the reverse complement to

    returns

    The buffer for chaining

  49. def |=(other: NTBitArray): NTBitArray.this.type

    Bitwise or of NT bit arrays.

    Bitwise or of NT bit arrays. Applies the operation up to the shortest length of the two. Mutates this object to write the result.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Ordered[NTBitArray]

Inherited from Comparable[NTBitArray]

Inherited from AnyRef

Inherited from Any

Ungrouped