giTaxid

package
v0.0.0-...-f5125eb Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: GPL-2.0 Imports: 10 Imported by: 2

Documentation

Overview

Package giTaxid provides functionality to work with GI to Taxid mapping files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GiMapper

type GiMapper interface {
	GiTaxid(string) (string, error)
}

GiMapper is the interface that wraps the GiTaxid method GiTaxid maps Gi to Taxids

func Load

func Load(fname string, savemem bool) (GiMapper, error)

Load loads the binary representation of the Gi => Taxid mapper from the fname file Returns a GiMapper or any error it may encounter in the process If savemem is true, the mapper is not loaded into memory and will be kept in the file

type OnFile

type OnFile struct {
	FileMap *os.File
	FileLen int64
	// contains filtered or unexported fields
}

OnFile is the type of the GiTaxid mapper kept in file

func (*OnFile) GiTaxid

func (r *OnFile) GiTaxid(gi string) (string, error)

GiTaxid maps Gi to Taxids

type OnMemory

type OnMemory []uint8

OnMemory is the type of the GiTaxid mapper loaded in memory

func New

func New(files []string) (OnMemory, error)

New creates a new binary dict file from the input text dict file/s Returns a the binary structure or any error it may encounter in the process

func (OnMemory) GiTaxid

func (m OnMemory) GiTaxid(gi string) (string, error)

GiTaxid maps Gi to Taxids

func (OnMemory) Store

func (m OnMemory) Store(fname string) error

Store stores the binary representation of the Gi => Taxid mapper into the fname file Returns nil or any error it may encounter in the process

Jump to

Keyboard shortcuts

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