Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrIncompleteHashValues = fmt.Errorf("strobemers: incomplete hash values")
ErrIncompleteHashValues means incomplete hash values
var ErrInvalidOrder = fmt.Errorf("strobemers: strobemer order too small")
ErrInvalidOrder means
var ErrInvalidSequence = fmt.Errorf("strobemers: invalid DNA sequence")
ErrInvalidSequence means the given sequence is invalid
var ErrInvalidWindowOffsets = fmt.Errorf("strobemers: window offset should be > 0, and wMin <= wMax")
ErrInvalidWindowOffsets means invalid window offsets
var ErrOrderNotSupported = fmt.Errorf("strobemers: strobemer order not supported")
ErrOrderNotSupported means a big strobemer order is not supported.
var ErrPrimeNumberTooSmall = fmt.Errorf("strobemers: the primer number is too small")
var ErrSequenceTooShort = fmt.Errorf("strobemers: sequence too short")
ErrSequenceTooShort means the sequence is too short
var ErrStrobeLengthTooSmall = fmt.Errorf("strobemers: strobe length too small")
ErrStrobeLengthTooSmall means the strobe length is too small
Functions ¶
This section is empty.
Types ¶
type MinStrobes ¶
type MinStrobes struct {
// contains filtered or unexported fields
}
MinStrobes is a iterator for MinStrobes
func NewMinStrobes ¶
NewMinStrobes creates a MinStrobes iterator. Parametems:
n - strobemer order l - strobes length wMin - minimum window offset, wMin > 0 wMax - maximum window offset, wMin <= wMax.
func (*MinStrobes) Index ¶
func (ms *MinStrobes) Index() int
Index returns the current index (0-based) of strobemers
func (*MinStrobes) Indexes ¶
func (ms *MinStrobes) Indexes() []int
Indexes returns current indexes (0-based) of strobes
func (*MinStrobes) Next ¶
func (ms *MinStrobes) Next() (uint64, bool)
Next returns the next hash value of randstrobe
func (*MinStrobes) SetPrime ¶
func (ms *MinStrobes) SetPrime(q uint64)
SetPrime sets the prime number (q) in minimizing h(m)+h(mj) mod q. In this package, we use (h(m)+h(mj)) & q, where q = roundup(q) - 1. The value should not be too small, at least 256.
func (*MinStrobes) SetWindowShrink ¶
func (ms *MinStrobes) SetWindowShrink(shrink bool)
SetWindowShrink decides whether shrink the search window at positions near the end of the sequence. Default is true.
type RandStrobes ¶
type RandStrobes struct {
// contains filtered or unexported fields
}
RandStrobes is a iterator for randstrobes
func NewRandStrobes ¶
NewRandStrobes creates a RandStrobes iterator. Parameters:
n - strobemer order l - strobes length wMin - minimum window offset, wMin > 0 wMax - maximum window offset, wMin <= wMax.
func (*RandStrobes) Index ¶
func (rs *RandStrobes) Index() int
Index returns the current index (0-based) of strobemers
func (*RandStrobes) Indexes ¶
func (rs *RandStrobes) Indexes() []int
Indexes returns current indexes (0-based) of strobes
func (*RandStrobes) Next ¶
func (rs *RandStrobes) Next() (uint64, bool)
Next returns the next hash value of randstrobe
func (*RandStrobes) SetPrime ¶
func (rs *RandStrobes) SetPrime(q uint64)
SetPrime sets the prime number (q) in minimizing h(m)+h(mj) mod q. In this package, we use (h(m)+h(mj)) & q, where q = roundup(q) - 1. The value should not be too small, at least 256.
func (*RandStrobes) SetWindowShrink ¶
func (rs *RandStrobes) SetWindowShrink(shrink bool)
SetWindowShrink decides whether shrink the search window at positions near the end of the sequence. Default is true.