Documentation ¶
Index ¶
- func CheckBytes(b *bufio.Reader, buf []byte) (bool, error)
- func QueryIndex(index *rtreego.Rtree, begin, end float64) []rtreego.Spatial
- func QueryIndexByElement(index *rtreego.Rtree, begin, end float64, element string) []rtreego.Spatial
- type Feature
- func (f *Feature) Bounds() *rtreego.Rect
- func (f *Feature) Chr() string
- func (f *Feature) Clone() *Feature
- func (f *Feature) Element() string
- func (f *Feature) End() float64
- func (f *Feature) Out() string
- func (f *Feature) SetBounds(newLocation *rtreego.Rect)
- func (f *Feature) SetTags(tags map[string][]byte)
- func (f *Feature) Start() float64
- func (f *Feature) String() string
- func (f *Feature) Tag(key string) string
- type FeatureReader
- type FeatureSlice
- type Format
- type Location
- type RtreeMap
- type Scanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBytes ¶
CheckBytes peeks at a buffered stream and checks if the first read bytes match.
func QueryIndex ¶
QueryIndex perform a SearchIntersect on the specified index given a start and end position.
Types ¶
type Feature ¶
type Feature struct {
// contains filtered or unexported fields
}
Feature represents an annotated element.
func NewFeature ¶
NewFeature returns a new instance of a Feature
type FeatureReader ¶
type FeatureReader struct {
// contains filtered or unexported fields
}
FeatureReader is a struct for readinf features
func NewFeatureReader ¶
func NewFeatureReader(r io.Reader, chrs map[string]int) *FeatureReader
NewFeatureReader returns a new instance of FeatureReader
func (*FeatureReader) Read ¶
func (r *FeatureReader) Read() (f *Feature, err error)
type FeatureSlice ¶
type FeatureSlice []*Feature
FeatureSlice represents a slice of Feature, sortable by start position
func NewFeatureSlice ¶
func NewFeatureSlice(intervals []rtreego.Spatial) FeatureSlice
NewFeatureSlice returns a new FeatureSlice instance from a slice of rtreego.Spatial
func (FeatureSlice) Len ¶
func (s FeatureSlice) Len() int
func (FeatureSlice) Less ¶
func (s FeatureSlice) Less(i, j int) bool
func (FeatureSlice) Swap ¶
func (s FeatureSlice) Swap(i, j int)
type Location ¶
type Location struct {
// contains filtered or unexported fields
}
Location represents a genomic region
func NewLocation ¶
NewLocation returns a new Location instance
func (*Location) GetElements ¶
GetElements returns all elements overlapping with buf
type RtreeMap ¶
RtreeMap is a map of pointers to Rtree with string keys. type RtreeMap map[string]*rtreego.Rtree
func CreateIndex ¶
CreateIndex creates the Rtree indices for the specified annotation file. It builds a Rtree for each chromosome and returns a RtreeMap having the chromosome names as keys.