pangenome

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Types

type Graph

type Graph struct {
	K int
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph() *Graph

NewGraph is the main setup for backends.

func (*Graph) Close

func (g *Graph) Close()

Close handles teardown.

func (*Graph) CreateAll

func (g *Graph) CreateAll(km *kmers.Kmers, contextMain context.Context) (bool, error)

CreateAll Nodes+Edges for all kmers in km.

func (*Graph) CreateEdge

func (g *Graph) CreateEdge(src uint64, dst uint64, contextMain context.Context) (*api.Assigned, error)

func (*Graph) CreateNode

func (g *Graph) CreateNode(seq string, contextMain context.Context) (uint64, error)

func (*Graph) DropAll

func (g *Graph) DropAll(contextMain context.Context) (bool, error)

DropAll discards everything in Dgraph.

func (*Graph) GetKV

func (g *Graph) GetKV(key string) (int, error)

GetKV get the key: value pair in Badger.

func (*Graph) SetKV

func (g *Graph) SetKV(key string, value int) (bool, error)

SetKV sets the key: value pair in Badger.

type KmerNode

type KmerNode struct {
	UID          uint64     `json:"uid,omitempty"`
	Sequence     string     `json:"sequence,omitempty"`
	ForwardNodes []KmerNode `json:"forward,omitempty"`
	ReverseNodes []KmerNode `json:"reverse,omitempty"`
}

Jump to

Keyboard shortcuts

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