Documentation ¶
Index ¶
- Constants
- func Format(format string) int
- func StrFormat(format int) string
- type ImageDownloader
- type ItolImageDownloader
- type NcbiTreeDownloader
- type PantherAnswer
- type PantherAnswerAnnotationNode
- type PantherAnswerChildren
- type PantherAnswerParameters
- type PantherAnswerProduct
- type PantherAnswerSearch
- type PantherAnswerTreeTopology
- type PantherTreeDownloader
- type TreeDownloader
Constants ¶
const ( IMGFORMAT_SVG = iota IMGFORMAT_PNG IMGFORMAT_EPS IMGFORMAT_PDF TXTFORMAT_NEWICK TXTFORMAT_NEXUS TXTFORMAT_PHYLOXML FORMAT_UNKNOWN )
Variables ¶
This section is empty.
Functions ¶
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
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
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