download

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: GPL-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (
	IMGFORMAT_SVG = iota
	IMGFORMAT_PNG
	IMGFORMAT_EPS
	IMGFORMAT_PDF
	TXTFORMAT_NEWICK
	TXTFORMAT_NEXUS
	TXTFORMAT_PHYLOXML
	FORMAT_UNKNOWN
)

Variables

This section is empty.

Functions

func Format

func Format(format string) int

func StrFormat

func StrFormat(format int) string

Types

type ImageDownloader

type ImageDownloader interface {
	Download(id string, format int) ([]byte, error) // Downdload a tree image from a server
}

ImageDownloader defines function to download an image

type ItolImageDownloader

type ItolImageDownloader struct {
	// contains filtered or unexported fields
}

func NewItolImageDownloader

func NewItolImageDownloader(config map[string]string) *ItolImageDownloader

func (*ItolImageDownloader) Download

func (d *ItolImageDownloader) Download(id string, format int) ([]byte, error)

Down a tree image from ITOL

type NcbiTreeDownloader added in v0.2.2

type NcbiTreeDownloader struct {
	// contains filtered or unexported fields
}

func NewNcbiTreeDownloader added in v0.2.2

func NewNcbiTreeDownloader() *NcbiTreeDownloader

NCBI taxonomy downloader

func (*NcbiTreeDownloader) Download added in v0.2.2

func (d *NcbiTreeDownloader) Download(id string) (*tree.Tree, error)

Download the NCBI taxonomy as a tree.Tree

func (*NcbiTreeDownloader) SetInternalNodesTaxId added in v0.2.3

func (d *NcbiTreeDownloader) SetInternalNodesTaxId(val bool)

If taxids only must be printed as internal nodes of the output tree Otherwise taxa names

func (*NcbiTreeDownloader) SetMapFileOutputPath added in v0.2.3

func (d *NcbiTreeDownloader) SetMapFileOutputPath(output string)

If called, the downloader will also write mapping between ncbi taxid and tax name in the given output file

func (*NcbiTreeDownloader) SetTipsTaxId added in v0.2.3

func (d *NcbiTreeDownloader) SetTipsTaxId(val bool)

If taxids only must be printed as tips of the output tree Otherwise taxa names

type PantherAnswer added in v0.4.0

type PantherAnswer struct {
	Search PantherAnswerSearch `json:"search"`
}

PantherAnswer is the root of Panther JSON answer

type PantherAnswerAnnotationNode added in v0.4.0

type PantherAnswerAnnotationNode struct {
	SfID           string                `json:"sf_id"`
	PersistentID   string                `json:"persistent_id"`
	BranchLength   float64               `json:"branch_length"`
	PropSfID       string                `json:"prop_sf_id"`
	EventType      string                `json:"event_type"`
	Species        string                `json:"species"`
	TreeNodeType   string                `json:"tree_node_type"`
	TaxonomicRange string                `json:"taxonomic_range"`
	SfName         string                `json:"sf_name"`
	GeneSymbol     string                `json:"gene_symbol"`
	NodeName       string                `json:"node_name"`
	Organism       string                `json:"organism"`
	Children       PantherAnswerChildren `json:"children"`
}

PantherAnswerAnnotationNode defines information about the node

type PantherAnswerChildren added in v0.4.0

type PantherAnswerChildren struct {
	TreeNodeType   string                        `json:"tree_node_type"`
	TaxonomicRange string                        `json:"taxonomic_range"`
	SfName         string                        `json:"sf_name"`
	AnnotationNode []PantherAnswerAnnotationNode `json:"annotation_node"`
}

PantherAnswerChildren defines the children type

type PantherAnswerParameters added in v0.4.0

type PantherAnswerParameters struct {
	Family string `json:"family"`
}

PantherAnswerParameters defines information about family

type PantherAnswerProduct added in v0.4.0

type PantherAnswerProduct struct {
	Source  string  `json:"source"`
	Version float64 `json:"version"`
}

PantherAnswerProduct defines information version and source of the answer

type PantherAnswerSearch added in v0.4.0

type PantherAnswerSearch struct {
	Product      PantherAnswerProduct      `json:"product"`
	SearchType   string                    `json:"search_type"`
	Parameters   PantherAnswerParameters   `json:"parameters"`
	TreeTopology PantherAnswerTreeTopology `json:"tree_topology"`
	Error        string                    `json:"error"`
}

PantherAnswerSearch defines information on answer search

type PantherAnswerTreeTopology added in v0.4.0

type PantherAnswerTreeTopology struct {
	AnnotationNode PantherAnswerAnnotationNode `json:"annotation_node"`
}

PantherAnswerTreeTopology defines information on node

type PantherTreeDownloader added in v0.4.0

type PantherTreeDownloader struct {
	// contains filtered or unexported fields
}

PantherTreeDownloader allows to download trees from Panther using a family ID

func NewPantherTreeDownloader added in v0.4.0

func NewPantherTreeDownloader() *PantherTreeDownloader

NewPantherTreeDownloader initializes a new Panther tree downloader

func (*PantherTreeDownloader) Download added in v0.4.0

func (p *PantherTreeDownloader) Download(id string) (t *tree.Tree, err error)

Download a tree from Panther

type TreeDownloader added in v0.2.2

type TreeDownloader interface {
	Download(id string) (*tree.Tree, error) // Download a tree from a server
}

TreeDownloader defines function to download an Tree

Jump to

Keyboard shortcuts

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