Documentation ¶
Overview ¶
interfaces for genomic relations irelate operates on "Relatable"s which keep a slice of related intervals.
Index ¶
- func OverlapsPosition(a, b IPosition) bool
- func Same(a, b IPosition, strict bool) bool
- func SameChrom(a, b string) bool
- func SamePosition(a, b IPosition) bool
- func SameVariant(a, b IRefAlt) bool
- func StripChr(c string) string
- type CIFace
- type IPosition
- type IRefAlt
- type IVariant
- type Info
- type PosWrap
- type Queryable
- type RAWrap
- type RelWrap
- type Relatable
- type RelatableChannel
- type RelatableIterator
- type SIPosition
- type VarWrap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OverlapsPosition ¶
SamePosition tests if 2 IPositions overlap
func Same ¶
Same tests the identity of 2 IPositions and attempts to cast to IRefAlts for more stringent checking.
func SameChrom ¶
SameChrom returns true if the strings are the same chromosome. Adjust for "chr" prefix.
func SamePosition ¶
SamePosition tests if 2 IPositions are the same
func SameVariant ¶
SameVariant tests if 2 IRefAlts share the same position and ref and alt.
Types ¶
type IVariant ¶
IVariant must implement IPosition, Ref, Alt, and Info() methods for genetic variants
type Info ¶
type Info interface { Get(key string) (interface{}, error) Set(key string, val interface{}) error Delete(key string) Keys() []string String() string Bytes() []byte }
Info must implement stuff to get info out of a variant info field.
type PosWrap ¶
type PosWrap struct { SIPosition *RelWrap }
type Queryable ¶
type Queryable interface {
Query(region IPosition) (RelatableIterator, error)
}
Queryable allows querying by genomic position. Anything that meets this interface can be used in irelate.
type RelWrap ¶
type RelWrap struct {
// contains filtered or unexported fields
}
trun an IPosition into an IRelatalbe
func (*RelWrap) AddRelated ¶
type Relatable ¶
type Relatable interface { IPosition Related() []Relatable // A slice of related Relatable's filled by IRelate AddRelated(Relatable) // Adds to the slice of relatables Source() uint32 SetSource(source uint32) }
Relatable provides all the methods for irelate to function. See Interval in parsers/interval.go for a class that satisfies this interface. Related() likely returns and AddRelated() likely appends to a slice of relatables. Note that for performance reasons, Relatable should be implemented as a pointer to your data-structure (see Interval).
type RelatableIterator ¶
RelatableIterator provides a method to iterate over Relatables