Documentation ¶
Overview ¶
Package twobit implements the 2bit compact randomly-accessible file format for storing DNA sequence data.
Index ¶
- Constants
- Variables
- func Pack(s string) ([]byte, error)
- func Unpack(raw []byte, sz int) string
- type Block
- type Reader
- func (r *Reader) Count() int
- func (r *Reader) Length(name string) (int, error)
- func (r *Reader) LengthNoN(name string) (int, error)
- func (r *Reader) NBlocks(name string) ([]*Block, error)
- func (r *Reader) Names() []string
- func (r *Reader) Read(name string) ([]byte, error)
- func (r *Reader) ReadRange(name string, start, end int) ([]byte, error)
- func (r *Reader) Version() int
- type Writer
Constants ¶
View Source
const BASE_A = 'A'
View Source
const BASE_C = 'C'
View Source
const BASE_G = 'G'
View Source
const BASE_N = 'N'
View Source
const BASE_T = 'T'
View Source
const SIG = 0x1A412743
Variables ¶
View Source
var NT2BYTES = []byte{}
Functions ¶
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
Block represents either blocks of Ns or masked (lower-case) blocks
type Reader ¶
type Reader twoBit
func NewReader ¶
func NewReader(r io.ReadSeeker) (*Reader, error)
NewReader returns a new TwoBit file reader which reads from r
Click to show internal directories.
Click to hide internal directories.