cmd

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "0.16.0"

VERSION of taxonkit

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "taxonkit",
	Short: "NCBI Taxonomy Toolkit",
	Long:  "",
}

RootCmd represents the base command when called without any subcommands

Functions

func CopyString added in v0.11.0

func CopyString(s string) string

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func MaxInts added in v0.11.0

func MaxInts(a int, vals ...int) int

Types

type Config

type Config struct {
	Threads      int
	OutFile      string
	DataDir      string
	NodesFile    string
	NamesFile    string
	DelNodesFile string
	MergedFile   string
	Verbose      bool
	LineBuffered bool
}

Config is the struct containing all global flags

type ProfileNode added in v0.9.0

type ProfileNode struct {
	Taxid         uint32
	Rank          string
	TaxonName     string
	LineageNames  []string // complete lineage
	LineageTaxids []uint32
	Abundance     float64
}

type Target added in v0.9.0

type Target struct {
	Taxid     uint32
	Abundance float64

	Rank          string
	TaxonName     string
	LineageNames  []string
	LineageTaxids []string

	CompleteLineageNames  []string
	CompleteLineageTaxids []uint32
}

func (*Target) AddTaxonomy added in v0.9.0

func (t *Target) AddTaxonomy(taxdb *taxdump.Taxonomy, showRanksMap map[string]interface{}, taxid uint32) bool

type Targets added in v0.9.0

type Targets []*Target

func (Targets) Len added in v0.9.0

func (t Targets) Len() int

func (Targets) Less added in v0.9.0

func (t Targets) Less(i, j int) bool

func (Targets) Swap added in v0.9.0

func (t Targets) Swap(i, j int)

type TaxidChange added in v0.4.0

type TaxidChange struct {
	Version       int16
	TaxidVersion  int16
	Change        TaxidChangeCode
	LineageTaxids []uint32
	ChangeValue   []uint32
}

TaxidChange means a taxid change record

func (TaxidChange) String added in v0.4.0

func (c TaxidChange) String() string

type TaxidChangeCode added in v0.4.0

type TaxidChangeCode uint32

TaxidChangeCode represents code of taxid change type

const (
	// TaxidUnchanged means taxid not changed
	TaxidUnchanged TaxidChangeCode = iota
	// TaxidNew means a new taxid
	TaxidNew
	// TaxidReuseDeleted means deleted taxids are reused again
	TaxidReuseDeleted
	// TaxidReuseMerged means merged taxids are reused again
	TaxidReuseMerged
	// TaxidDelete means a taxid is deleted
	TaxidDelete
	// TaxidMerge means a taxid is merged into another taxid
	TaxidMerge
	// TaxidAbsorb means another taxid is merged into this one
	TaxidAbsorb
	// TaxidNameChanged means scientific name is changed
	TaxidNameChanged
	// TaxidRankChanged means the rank is changed
	TaxidRankChanged
	// TaxidLineageChangedLin means lineage taxids remain, but lineage changed
	TaxidLineageChangedLin
	// TaxidLineageChangedTax means lineage taxids changed
	TaxidLineageChangedTax
	// TaxidLineageChangedLen means number of lineage taxids changed
	TaxidLineageChangedLen // number of lineage taxids changed
)

func (TaxidChangeCode) String added in v0.4.0

func (c TaxidChangeCode) String() string

type TaxidChanges added in v0.4.0

type TaxidChanges []TaxidChange

TaxidChanges represents a list of TaxidChange

func (TaxidChanges) Len added in v0.4.0

func (changes TaxidChanges) Len() int

func (TaxidChanges) Less added in v0.4.0

func (changes TaxidChanges) Less(i, j int) bool

func (TaxidChanges) Swap added in v0.4.0

func (changes TaxidChanges) Swap(i, j int)

Jump to

Keyboard shortcuts

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