Documentation ¶
Overview ¶
Package feat provides the base for storage and manipulation of biological interval information.
Index ¶
- func BaseOrientationOf(f Feature) (ori Orientation, ref Feature)
- func OneToZero(pos int) int
- func PositionWithin(f, ref Feature, position int) (pos int, ok bool)
- func ZeroToOne(pos int) int
- type Adder
- type Collection
- type Conformation
- type Conformationer
- type Feature
- type LocationSetter
- type Moltype
- type Mutable
- type Offsetter
- type OrientSetter
- type Orientation
- type Orienter
- type Pair
- type Range
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseOrientationOf ¶
func BaseOrientationOf(f Feature) (ori Orientation, ref Feature)
BaseOrientationOf returns the orientation of f relative to a reference which is the first non-nil, non-orientable feature location, and that reference feature. The returned reference feature should be used by callers of BaseOrientationOf to verify that orientations are comparable. If f is not orientable, the returned orientation will be NotOriented and the reference will be the first orientable or last non-nil feature. BaseOrientationOf will panic if the feature chain is deeper than 1000 links.
func PositionWithin ¶
PositionWithin returns the position in f coordinates converted to coordinates relative to the given reference feature and a boolean indicating whether f can be located relative to ref. PositionWithin will panic if the feature chain is deeper than 1000 links.
Types ¶
type Collection ¶
type Conformation ¶
type Conformation int8
const ( UndefinedConformation Conformation = iota - 1 Linear Circular )
func (Conformation) String ¶
func (c Conformation) String() string
type Conformationer ¶
type Conformationer interface { Conformation() Conformation SetConformation(Conformation) error }
type Feature ¶
type Feature interface { Range // Name returns the name of the feature. Name() string // Description returns the description of the feature. Description() string // Location returns the reference feature on which the feature is located. Location() Feature }
Feature is a Range whose coordinates are defined relative to a feature location. Start and End return the coordinates of the feature relative to its location which can be nil. In the latter case callers should make no assumptions whether coordinates of such features are comparable.
func BasePositionOf ¶
BasePositionOf returns the position in f coordinates converted to coordinates relative to the first nil feature location, and a reference which is the feature location preceding the nil. The returned reference feature should be used by callers of BasePositionOf to verify that coordinates are comparable. BasePositionOf will panic if the feature chain is deeper than 1000 links.
type LocationSetter ¶
type Moltype ¶
type Moltype int8
Moltype represents the molecule type of a source of sequence data.
func ParseMoltype ¶
ParseMoltype allows conversion from a string to a Moltype.
type OrientSetter ¶
type OrientSetter interface {
SetOrientation(Orientation) error
}
type Orientation ¶
type Orientation int8
const ( Reverse Orientation = iota - 1 NotOriented Forward )
func OrientationWithin ¶
func OrientationWithin(f, ref Feature) Orientation
OrientationWithin returns the orientation of f relative to the given reference feature. The returned orientation will be NotOriented if f is not located within the reference or if f is not orientable. OrientationWithin will panic if the feature chain is deeper than 1000 links.
func (Orientation) String ¶
func (o Orientation) String() string
type Orienter ¶
type Orienter interface {
Orientation() Orientation
}
Orienter wraps the Orientation method.
Orientation returns the orientation of the feature relative to its location.
Directories ¶
Path | Synopsis |
---|---|
Package gene contains the types and methods to handle the definition of a gene.
|
Package gene contains the types and methods to handle the definition of a gene. |
Package genome defines types useful for representing cytogenetic features.
|
Package genome defines types useful for representing cytogenetic features. |
cow/bt7
Package bt7 defines chromosome and assembly fragment intervals for the bt7 genome assembly for cow.
|
Package bt7 defines chromosome and assembly fragment intervals for the bt7 genome assembly for cow. |
drosophila/dm3
Package dm3 defines chromosome and band intervals for the drosophila karyotype based on the dm3 assembly.
|
Package dm3 defines chromosome and band intervals for the drosophila karyotype based on the dm3 assembly. |
human/hg19
Package hg19 defines chromosome and band intervals for the human karyotype based on the hg19 assembly.
|
Package hg19 defines chromosome and band intervals for the human karyotype based on the hg19 assembly. |
mouse/mm10
Package mm10 defines chromosome and band intervals for the mouse karyotype based on the mm10 assembly.
|
Package mm10 defines chromosome and band intervals for the mouse karyotype based on the mm10 assembly. |