Documentation ¶
Index ¶
Constants ¶
const Version uint8 = 2
Version is the version of index format
Variables ¶
var ErrInvalidIndexFileFormat = errors.New("unikmer/index: invalid index format")
ErrInvalidIndexFileFormat means invalid index format.
var ErrNameAndIndexMismatch = errors.New("unikmer/index: size of names and indices unequal")
ErrNameAndIndexMismatch means size of names and sizes are not equal.
var ErrNameAndSizeMismatch = errors.New("unikmer/index: size of names and sizes unequal")
ErrNameAndSizeMismatch means size of names and sizes are not equal.
var ErrTruncateIndexFile = errors.New("unikmer/index: truncated index file")
ErrTruncateIndexFile means the file is truncated
var ErrUnfishedWrite = errors.New("unikmer/index: index not fished writing")
ErrUnfishedWrite means writing not finished
var ErrVersionMismatch = errors.New("unikmer/index: version mismatch")
ErrVersionMismatch means version mismatch between files and program
var ErrWrongWriteDataSize = errors.New("unikmer/index: write data with wrong size")
ErrWrongWriteDataSize means the size of data to write is invalid
var Magic = [8]byte{'.', 'u', 'n', 'i', 'k', 'i', 'd', 'x'}
Magic number of index file.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct { Version uint8 // uint8 K int // uint8 Canonical bool // uint8 NumHashes uint8 // uint8 NumSigs uint64 Names []string Indices []uint32 Sizes []uint64 NumRowBytes int // length of bytes for storing one row of signiture for n names }
Header contains metadata
func (Header) Compatible ¶
Compatible checks compatibility
type Reader ¶
type Reader struct { Header // contains filtered or unexported fields }
Reader is for reading KmerCode.
type Writer ¶
type Writer struct { Header // contains filtered or unexported fields }
Writer writes KmerCode.
func NewWriter ¶
func NewWriter(w io.Writer, k int, canonical bool, numHashes uint8, numSigs uint64, names []string, indices []uint32, sizes []uint64) (*Writer, error)
NewWriter creates a Writer.
func (*Writer) WriteBatch ¶
WriteBatch writes a batch of data
func (*Writer) WriteHeader ¶
WriteHeader writes file header