Documentation ¶
Overview ¶
Streaming relation (overlap, distance, KNN) testing of (any number of) sorted files of intervals.
Index ¶
- Constants
- func AsQueryable(f string) (interfaces.Queryable, error)
- func CheckKNN(a Relatable, b Relatable) bool
- func CheckOverlapPrefix(a Relatable, b Relatable) bool
- func CheckRelatedByOverlap(a Relatable, b Relatable) bool
- func IRelate(checkRelated func(a, b Relatable) bool, relativeTo int, ...) RelatableIterator
- func Less(a Relatable, b Relatable) bool
- func LessPrefix(a Relatable, b Relatable) bool
- func NaturalLess(str1, str2 string) bool
- func NaturalLessPrefix(a Relatable, b Relatable) bool
- func PIRelate(chunk int, maxGap int, qstream interfaces.RelatableIterator, ciExtend bool, ...) interfaces.RelatableChannel
- func RegionToParts(region string) (string, int, int, error)
Constants ¶
const MaxInt32 = int(MaxUint32 >> 1)
const MaxUint32 = ^uint32(0)
const SelfRelations = -2
Set relativeTo so SelfRelations constant to allow reporting overlaps within a stream
Variables ¶
This section is empty.
Functions ¶
func AsQueryable ¶
func AsQueryable(f string) (interfaces.Queryable, error)
func CheckKNN ¶
func CheckKNN(a Relatable, b Relatable) bool
CheckKNN relates an interval to its k-nearest neighbors. The reporting function will have to do some filtering since this is only guaranteed to associate *at least* k neighbors, but it could be returning extra.
func CheckOverlapPrefix ¶
func CheckOverlapPrefix(a Relatable, b Relatable) bool
handles chromomomes like 'chr1' from one org and '1' from another.
func CheckRelatedByOverlap ¶
func CheckRelatedByOverlap(a Relatable, b Relatable) bool
CheckRelatedByOverlap returns true if Relatables overlap.
func IRelate ¶
func IRelate(checkRelated func(a, b Relatable) bool, relativeTo int, less func(a, b Relatable) bool, streams ...RelatableIterator) RelatableIterator
IRelate provides the basis for flexible overlap/proximity/k-nearest neighbor testing. IRelate receives merged, ordered Relatables via stream and takes function that checks if they are related (see CheckRelatedByOverlap). It is guaranteed that !Less(b, a) is true (we can't guarantee that Less(a, b) is true since they may have the same start). Once checkRelated returns false, it is assumed that no other `b` Relatables could possibly be related to `a` and so `a` is sent to the returnQ. streams are a variable number of iterators that send intervals.
func NaturalLess ¶
NaturalLess compares two strings using natural ordering. This means that e.g. "abc2" < "abc12".
Non-digit sequences and numbers are compared separately. The former are compared bytewise, while the latter are compared numerically (except that the number of leading zeros is used as a tie-breaker, so e.g. "2" < "02")
Limitation: only ASCII digits (0-9) are considered.
func NaturalLessPrefix ¶
func NaturalLessPrefix(a Relatable, b Relatable) bool
1, 2, 3 ... 9, 10, 11...
func PIRelate ¶
func PIRelate(chunk int, maxGap int, qstream interfaces.RelatableIterator, ciExtend bool, fn func(interfaces.Relatable), dbs ...interfaces.Queryable) interfaces.RelatableChannel
PIRelate implements a parallel IRelate
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
interfaces for genomic relations irelate operates on "Relatable"s which keep a slice of related intervals.
|
interfaces for genomic relations irelate operates on "Relatable"s which keep a slice of related intervals. |