virus

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

package virus contains an interface for matching strings to names of viruses, plasmids, prions and other non-cellular entities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VirusMatcher

type VirusMatcher interface {
	// Init loads cached data into memory, or creates cache, if it does not
	// exist yet.
	Init() error

	// SetConfig updates configuration of the matcher.
	SetConfig(cfg config.Config)

	// MatchVirus takes a virus name and returns back matched items for
	// the name. In case if there were too many returned results, returns an
	// error. Matching is successful if entered name matches the start of the
	// virus name string from the database. If there are too many matches,
	// the result is truncated. "Curated" databases have a priority in
	// returned results.
	MatchVirus(s string) ([]mlib.MatchItem, error)

	// NameToBytes normalizes a virus name by removing all extra spaces,
	// converting all runes to lower case, adding '\x00' to the start and
	// returning result as bytes.
	NameToBytes(s string) []byte
}

Jump to

Keyboard shortcuts

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