Bit array representation of nucleotide sequence. This module contains functions to store StrictNucleotides in a bit sequence. This module import the bit sequence implementation in the bitty package.
Nucleotide bit patterns:
Nucleotide | Bit Pattern |
---|---|
A | 00 |
G | 10 |
C | 01 |
T | 11 |
Types
TwoBitSequence[T] = ref object bitArray: BitArray len: int
- Source Edit
Procs
func `$`[T](s: TwoBitSequence[T]): string
- Source Edit
func `[]=`[T](s: var TwoBitSequence[T]; loc: int; val: T)
- Source Edit
func `[]`[T](s: TwoBitSequence[T]; loc: int): T
- Source Edit
func bitSeq[T](s: TwoBitSequence[T]): BitArray
- Gives read only access to bitArray. Source Edit
func len[T](s: TwoBitSequence[T]): int
- Returns len Source Edit
func newTwoBitSequence[T](len: int): TwoBitSequence[T]
- Create new two bit sequence array Source Edit
func toDNA[T](s: var TwoBitSequence[T]): TwoBitSequence[StrictDNA]
- Convert sequence to DNA Source Edit
func toRNA[T](s: var TwoBitSequence[T]): TwoBitSequence[StrictRNA]
- Convert sequence to RNA Source Edit