目录

binning: Interval binning for Go

GoDoc Build Status

These are some utility functions for working with the interval binning scheme as used in the UCSC Genome Browser.

This scheme can be used to implement fast overlap-based querying of intervals, essentially mimicking an R-tree index.

Note that some database systems natively support spatial index methods such as R-trees. See for example the PostGIS extension for PostgreSQL.

Although in principle the method can be used for binning any kind of intervals, be aware that the largest position supported by this implementation is 2^29 (which covers the longest human chromosome).

// Use the standard UCSC binning scheme.
b := binning.StandardBinning()

// Get the bin for some interval.
bin, error := b.Assign(74012, 173034)
if error != nil {
    log.Fatal("Binning.Assign error:", error)
}

fmt.Println(bin)
// Output: 73
关于

用于对基因组序列进行区间分箱的工具

35.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号