gobwa

package
v0.0.0-...-324d411 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnumerateContigs

func EnumerateContigs(ref *GoBwaReference, callback func(name string, length int))

func GoBwaMemMateSW

func GoBwaMemMateSW(ref *GoBwaReference, settings *GoBwaSettings, read1 *[]byte, read2 *[]byte, arena *Arena, score_delta int) ([]EasyAlignment, []EasyAlignment)

func SequenceConvert

func SequenceConvert(seq string) []byte

This takes a sequence written in ASCII (AaCcTtGg) and converts it to an array of bytes with A-->0, C-->1 G-->2, T-->3 anything else -->4

Types

type Arena

type Arena struct {
	Pointers []uintptr
}

func NewArena

func NewArena() *Arena

func (*Arena) Free

func (a *Arena) Free()

func (*Arena) Push

func (a *Arena) Push(p uintptr)

type Chain

type Chain struct {
	Offset   int64
	Contig   string
	Reversed bool
	// contains filtered or unexported fields
}

func GoBwaChain

func GoBwaChain(ref *GoBwaReference, settings *GoBwaSettings, seq string) []Chain

func InterpretChain

func InterpretChain(ref *GoBwaReference, chn *C.mem_chain_t) Chain

type EasyAlignment

type EasyAlignment struct {
	Offset        int64
	Alignment_end int64
	Contig        string
	Reversed      bool
	ChainedHit    *C.mem_alnreg_t
	Score         int
	Secondary     bool
	ReadS         int
	ReadE         int
}

* Represents a candidate alignment

func GoBwaAlign

func GoBwaAlign(ref *GoBwaReference, settings *GoBwaSettings, seq string, arena *Arena) []EasyAlignment

* This attempts to align "seq", which is a string of ACGTacgt letters. It returns * an array of EasyAlignment objects. * TODO: Actually return that list.

func InterpretAlign

func InterpretAlign(ref *GoBwaReference, caln *C.mem_alnreg_t) EasyAlignment

type GoBwaReference

type GoBwaReference struct {
	BWTData unsafe.Pointer // Secret pointer to a *btw_t type
	// contains filtered or unexported fields
}

* Holds a loaded BWA reference object.

func GoBwaLoadReference

func GoBwaLoadReference(path string) *GoBwaReference

func (GoBwaReference) GetReferenceContigsInfo

func (r GoBwaReference) GetReferenceContigsInfo() ([]string, []int64)

gets contig names and lengths

func (GoBwaReference) GetSeq

func (r GoBwaReference) GetSeq(chrom string, start, end int64, reversed bool) []byte

type GoBwaSettings

type GoBwaSettings struct {
	Settings unsafe.Pointer // Secret pointer to a *mem_opt_t type
}

* Sets a set of BWA settings

func GoBwaAllocSettings

func GoBwaAllocSettings() *GoBwaSettings

type SingleReadAlignment

type SingleReadAlignment struct {
	Pos                 int64
	Chrom               string
	Flag                int //what is this?
	Reversed            bool
	Alt                 int
	Mapq                int
	EditDistance        int
	Cigar               []uint32
	AlternativeMappings string
	Score               int
	Sub                 int //what is this?
	AltSC               int //what is this?
	ReadS               int //What part of the read is covered by this alignment
	ReadE               int
	// contains filtered or unexported fields
}

func GoBwaSmithWaterman

func GoBwaSmithWaterman(ref *GoBwaReference, settings *GoBwaSettings, seq string, alignment unsafe.Pointer, arena *Arena) SingleReadAlignment

func InterpretSingleReadAlignment

func InterpretSingleReadAlignment(ref *GoBwaReference, alignment *C.mem_aln_t) SingleReadAlignment

Jump to

Keyboard shortcuts

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