download

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2017 License: GPL-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	IMGFORMAT_SVG     = 0
	IMGFORMAT_PNG     = 1
	IMGFORMAT_EPS     = 2
	IMGFORMAT_PDF     = 3
	IMGFORMAT_UNKNOWN = 4
)

Variables

This section is empty.

Functions

func AddSpeciesTips added in v0.2.2

func AddSpeciesTips(t *tree.Tree)

if an internal node is a species, then we add a new tip

func Format

func Format(format string) int

func ParseNcbiNames added in v0.2.2

func ParseNcbiNames(reader io.Reader) (map[string]string, error)

Parse name file and convert names with the following rules: Special characters are replaces with "_" -> '(', ')', '[', ']', ':', ',', ' ', ';'

func ParseNcbiTree added in v0.2.2

func ParseNcbiTree(reader io.Reader) (*tree.Tree, error)

Build a gotree.tree.Tree

func RenameTreeNodes added in v0.2.2

func RenameTreeNodes(t *tree.Tree, namemap map[string]string)

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
}

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

type TreeDownloader added in v0.2.2

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

Jump to

Keyboard shortcuts

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