cnveval

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package cnveval provides a way to evalute CNVs based on a truth-set.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CNV

type CNV struct {
	Chrom  string
	Start  int
	End    int
	Sample string
	CN     int
	// contains filtered or unexported fields
}

CNV indicates the region, sample and copy-number of a region.

func (CNV) String

func (c CNV) String() string

type CohortStats

type CohortStats map[TS]*Stat

func Evaluate

func Evaluate(cnvs []CNV, truths []Truth, po float64) CohortStats

func (CohortStats) Precision

func (c CohortStats) Precision(class SC) float64

func (CohortStats) Recall

func (c CohortStats) Recall(class SC) float64

func (CohortStats) TP

func (c CohortStats) TP(class SC) int

func (CohortStats) Tabulate

func (c CohortStats) Tabulate() [4]Stat

type SC

type SC int

SC is a size-class

var (
	// Any is used to avoid any size-class designation when reporting results.
	Any    SC
	Small  SC = 20000
	Medium SC = 100000
	Large  SC = math.MaxInt64
)

func (SC) Order

func (s SC) Order() int

func (SC) String

func (s SC) String() string

type Stat

type Stat struct {
	FP, FN, TP, TN int
}

func (Stat) Precision

func (s Stat) Precision() float64

func (Stat) Recall

func (s Stat) Recall() float64

func (Stat) String

func (s Stat) String() string

type TS

type TS struct {
	SizeClass SC
	Sample    string
}

TS indicates a sample and SizeClass

type Truth

type Truth struct {
	Chrom   string
	Start   int
	End     int
	Samples []string
	CN      int
	// contains filtered or unexported fields
}

Truth indicates the region, samples and copy-number for a truth-set.

func (Truth) String

func (t Truth) String() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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