reporter

package
v0.0.0-...-0778f37 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

the reporter package computes multiple statistics that quantify the quality of a collection of contigs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntHeap

type IntHeap []int

An IntHeap is a max-heap of ints

func (IntHeap) Len

func (h IntHeap) Len() int

Len returns the number of items in the heap

func (IntHeap) Less

func (h IntHeap) Less(i, j int) bool

Less tells whether elements at position j is less than the one at position i

func (*IntHeap) Pop

func (h *IntHeap) Pop() interface{}

Pop returns the element at the top of the heap

func (*IntHeap) Push

func (h *IntHeap) Push(x interface{})

func (IntHeap) Swap

func (h IntHeap) Swap(i, j int)

Swap swaps two elements in the heap

type Report

type Report struct {
	// AssemblyName is the name of the assembly the Report represents
	AssemblyName string

	// Processed is an indicator that represents whether the reporter process has been executed
	Processed bool
	// N50 score of the assembly
	N50 int32
	// L50 score of the assembly
	L50 int32
	// contains filtered or unexported fields
}

Report represents the struct that holds the stats that characterize an assembly

func (*Report) GetAssemblyName

func (r *Report) GetAssemblyName() string

GetAssemblyName returns the reporter assembly name

func (*Report) GetL50

func (r *Report) GetL50() (int32, error)

GetL50 returns the computed L50 value stored on the Report. An error is returned if the reporter process has not been executed

func (*Report) GetN50

func (r *Report) GetN50() (int32, error)

GetN50 returns the computed N50 value stored on the Report. An error is returned if the reporter process has not been executed

func (*Report) Process

func (r *Report) Process() error

Process constructs the Report for the given assembler results

type Reporter

type Reporter interface {
	// Process constructs the Report for the given assembler results
	Process() error
	// GetL50 returns the computed L50 value stored on the Report. An error is returned if the reporter process has not been executed
	GetL50() (int32, error)
	// GetN50 returns the N50 score of the Report contigs. An error is returned if the reporter process has not been executed
	GetN50() (int32, error)
	// GetAssemblyName returns the name of the reporter
	GetAssemblyName() string
}

Reporter defines the interface of the reporter that constructs stats' of the assemblies

func NewReporter

func NewReporter(assemblyName string, result *result.Result) Reporter

NewReporter returns a new instance of a Report that implements the Reporter interface

Jump to

Keyboard shortcuts

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