summarise

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintGroupBy

func PrintGroupBy(w io.Writer, groups []GroupCount, dimension string, topN int)

PrintGroupBy writes a ranked list of group counts to w.

func PrintSummary

func PrintSummary(w io.Writer, s Summary, topN int)

PrintSummary writes a formatted default summary report to w. topN controls how many top species and datasets are shown.

Types

type GroupCount

type GroupCount struct {
	Value string
	Count int
}

GroupCount holds a dimension value and the number of rows with that value.

func GroupBy

func GroupBy(rows []query.ResultRow, dimension string) []GroupCount

GroupBy groups rows by the given dimension column and returns counts sorted descending by count, then alphabetically by value for ties.

type Summary

type Summary struct {
	Total      int
	HQCount    int
	TopSpecies []GroupCount
	Datasets   []GroupCount
}

Summary holds aggregate statistics for a collection of genome rows.

func DefaultSummary

func DefaultSummary(rows []query.ResultRow) Summary

DefaultSummary computes aggregate statistics over a slice of result rows.

Jump to

Keyboard shortcuts

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