distance

package
v0.0.0-...-639af57 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JCDist

func JCDist(dna1 seq.DNA, dna2 seq.DNA) float64

JCDist calculates Jukes-Cantor distance between two sequences

func K80Dist

func K80Dist(dna1 seq.DNA, dna2 seq.DNA) float64

K80Dist calculates Kimure-Nei distance between two sequences

func PDist

func PDist(dna1 seq.DNA, dna2 seq.DNA) float64

PDist calculates p-distance between two sequences

func PrettyPrintDist

func PrettyPrintDist(dmat DistMat)

PrettyPrintDist prints a distance matrix to the stdout in a nice table format.

func PrettySaveDist

func PrettySaveDist(dmat DistMat, path string, name string)

PrettySaveDist saves a distance matrix in the disk in a nice table format.

Types

type DistMat

type DistMat struct {
	Ids       []string
	Matrix    [][]float64
	Method    string
	Alignment *seq.DNAPool
}

DistMat is a distance matrix structure

func PairDist

func PairDist(pool seq.DNAPool, method string) DistMat

PairDist calculates pairwise distances between all sequences in a DNAPool using the specified method (OLD).

func PairDistConc

func PairDistConc(pool seq.DNAPool, model string) DistMat

PairDistConc concurrently calculates the pairwise distances betwen all sequences in a DNAPool using the specified method.

Jump to

Keyboard shortcuts

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