gtaxon: github.com/shenwei356/gtaxon/taxon/nodes Index | Files

package nodes

import "github.com/shenwei356/gtaxon/taxon/nodes"

Package nodes a

Package nodes a

Package nodes a

Package nodes a

Package nodes a

Index

Package Files

Taxa.go division.go gencode.go name.go node.go

Variables

var Divisions map[string]Division

Divisions is a map storing all divisions

var GenCodes map[string]GenCode

GenCodes is a map storing all divisions

var Names map[string]Name

Names is a map storing all names

var Nodes map[string]Node

Nodes is a map storing all nodes

func SetDivisions Uses

func SetDivisions(divisions map[string]Division)

SetDivisions sets Nodes

func SetGenCodes Uses

func SetGenCodes(divisions map[string]GenCode)

SetGenCodes sets GenCodes

func SetNames Uses

func SetNames(names map[string]Name)

SetNames sets Names

func SetNodes Uses

func SetNodes(nodes map[string]Node)

SetNodes sets Nodes

type Division Uses

type Division struct {
    DivisionID   string `json:"DivisionID"`
    DivisionCode string `json:"DivisionCode"`
    DivisionName string `json:"DivisionName"`
    Comments     string `json:"Comments"`
}

Division defines the NCBI taxonomy division

func DivisionFromArgs Uses

func DivisionFromArgs(items []string) Division

DivisionFromArgs is used when importing data from divisions.dmp

func DivisionFromJSON Uses

func DivisionFromJSON(s string) (Division, error)

DivisionFromJSON return node object from JSON string

func (Division) ToJSON Uses

func (division Division) ToJSON() (string, error)

ToJSON get the JSON string of a division

type GenCode Uses

type GenCode struct {
    GenCodeID        string `json:"GenCodeID"`
    Abbreviation     string `json:"Abbreviation"`
    Name             string `json:"Name"`
    TranslationTable string `json:"TranslationTable"`
    StartCodons      string `json:"StartCodons"`
}

GenCode defines the NCBI taxonomy division

func GenCodeFromArgs Uses

func GenCodeFromArgs(items []string) GenCode

GenCodeFromArgs is used when importing data from divisions.dmp

func GenCodeFromJSON Uses

func GenCodeFromJSON(s string) (GenCode, error)

GenCodeFromJSON return node object from JSON string

func (GenCode) ToJSON Uses

func (gencode GenCode) ToJSON() (string, error)

ToJSON get the JSON string of a gencode

type GeneticCodeItem Uses

type GeneticCodeItem struct {
    GCId   int
    GCName string
}

GeneticCodeItem is

type LineageExItem Uses

type LineageExItem struct {
    TaxId          int
    ScientificName string
    Rank           string
}

LineageExItem is

type MitoGeneticCodeItem Uses

type MitoGeneticCodeItem struct {
    MGCId   int
    MGCName string
}

MitoGeneticCodeItem is

type Name Uses

type Name struct {
    TaxID string     `json:"TaxID"`
    Names []NameItem `json:"Names"`
}

Name includes all names for a taxid

func MergeNames Uses

func MergeNames(names ...Name) Name

MergeNames is used when importing data from names.dmp

func NameFromArgs Uses

func NameFromArgs(items []string) Name

NameFromArgs is used when importing data from names.dmp

func NameFromJSON Uses

func NameFromJSON(s string) (Name, error)

NameFromJSON return Name object from JSON string

func (Name) ToJSON Uses

func (name Name) ToJSON() (string, error)

ToJSON transforms Name to JSON string

type NameItem Uses

type NameItem struct {
    Name       string `json:"Name"`
    UniqueName string `json:"UniqueName"`
    NameClass  string `json:"NameClass"`
}

NameItem defines

type Node Uses

type Node struct {
    TaxID  string `json:"TaxID"`
    PTaxID string `json:"PTaxID"`
    Rank   string `json:"Rank"`

    EMBLCode string `json:"EMBLCode"`

    DivisionID       string `json:"DivisionID"`
    InheritedDivFlag bool   `json:"InheritedDivFlag"`

    GeneticCodeID   string `json:"GeneticCodeID"`
    InheritedGCFlag bool   `json:"InheritedGCFlag"`

    MitochondrialGCID string `json:"MitochondrialGCID"`
    InheritedMGCFlag  bool   `json:"InheritedMGCFlag"`

    GenBankHiddenFlag     bool `json:"GenBankHiddenFlag"`
    HiddenSubtreeRootFlag bool `json:"HiddenSubtreeRootFlag"`

    Comments string `json:"Comments"`
}

Node defines the NCBI taxonomy node

func LCA Uses

func LCA(nodes map[string]Node, taxids []string) (Node, error)

LCA return the lowest common ancestor for a list of taxids

func NodeFromArgs Uses

func NodeFromArgs(items []string) Node

NodeFromArgs is used when importing data from nodes.dmp

func NodeFromJSON Uses

func NodeFromJSON(s string) (Node, error)

NodeFromJSON return node object from JSON string

func (Node) ToJSON Uses

func (node Node) ToJSON() (string, error)

ToJSON get the JSON string of a node

type Taxon Uses

type Taxon struct {
    TaxId           int `json:"TaxId"`
    ScientificName  string
    OtherNames      []TaxonNameItem
    ParentTaxId     int
    Rank            string
    Division        string
    GeneticCode     GeneticCodeItem
    MitoGeneticCode MitoGeneticCodeItem
    Lineage         string
    LineageEx       []LineageExItem
}

Taxon is for json output

func GetTaxonByTaxID Uses

func GetTaxonByTaxID(taxid string) (Taxon, error)

GetTaxonByTaxID return Taxon obejct by taxid

func (Taxon) ToJSON Uses

func (taxon Taxon) ToJSON() (string, error)

type TaxonNameItem Uses

type TaxonNameItem struct {
    ClassCDE string
    DispName string
}

TaxonNameItem is

Package nodes imports 7 packages (graph) and is imported by 1 packages. Updated 2016-07-16. Refresh now. Tools for package owners.