Documentation ¶
Overview ¶
Package importcmd implements a command to import phylogenetic trees from a newick file into tsv files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &command.Command{
Usage: `import [--age <value>] [-o|--output <file>]
--name <tree-name> [<newick-file>...]`,
Short: "import a newick tree",
Long: `
Command import reads one or more files that contain phylogenetic trees in
Newick format (i.e. parenthetical format), and import them into an equivalent
file in TSV format.
One or more newick files can be given as arguments. If no file is given the
input will be read from the standard input.
Trees in TSV format must have names. The flag --name is required and sets the
name of the tree. If multiple trees are found, the name will be append with
sequential numbers.
By default the output will be printed in the standard output. To define an
output file use the flag --output, or -o. If the file already exists, imported
trees will be added to the file.
The output TSV file will contain the following fields:
- tree, for the name of the tree
- node, for the ID of the node
- parent, for the ID of the parent node
(-1 is used for the root)
- age, the age of the node (in years)
- taxon, the taxonomic name of the node
By default, the age of the tree will be calculated using the maximum branch
length between the root and its terminals. Use the flag --age to set a
different age for the root (in million years). The given age should be greater
or equal to the maximum branch length.
`,
SetFlags: setFlags,
Run: run,
}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.