feat

package
v0.0.0-...-040724e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0, BSD-3-Clause, + 1 more Imports: 1 Imported by: 0

Documentation

Overview

Package feat provides the base for storage and manipulation of biological interval information.

Index

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 the given feature relative to the deepest orientable location and the reference feature, which may be the feature itself if it is not an Orienter or has a nil Location. The returned orientation will always be Forward or Reverse. BaseOrientationOf will panic if the feature chain is deeper than 1000 links.

func OneToZero

func OneToZero(pos int) int

Convert from 1-based to 0-based indexing

func ZeroToOne

func ZeroToOne(pos int) int

Convert from 0-based to 1-based indexing

Types

type Adder

type Adder interface {
	Set
	Add(...Feature)
}

type Collection

type Collection interface {
	Set
	Location() Feature
}

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() string
	Description() string
	Location() Feature
}

type LocationSetter

type LocationSetter interface {
	SetLocation(Feature) error
}

type Moltype

type Moltype int8

Moltype represents the molecule type of a source of sequence data.

const (
	Undefined Moltype = iota - 1
	DNA
	RNA
	Protein
)

func ParseMoltype

func ParseMoltype(s string) Moltype

ParseMoltype allows conversion from a string to a Moltype.

func (Moltype) String

func (m Moltype) String() string

Return a string representation of a Moltype.

type Mutable

type Mutable interface {
	SetStart(int) error
	SetEnd(int) error
}

type Offsetter

type Offsetter interface {
	SetOffset(int) error
}

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 the given feature relative to the given reference. If f is not located within the reference OrientationWithin will return NotOriented. 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.

type Pair

type Pair interface {
	Features() [2]Feature
}

type Range

type Range interface {
	Start() int
	End() int
	Len() int
}

type Set

type Set interface {
	Features() []Feature
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL