Documentation ¶
Overview ¶
Package external allows uniform interaction with external tools based on a config struct.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(cb CommandBuilder, funcs ...template.FuncMap) (args []string, err error)
Build builds a set of command line args from cb, which must be a struct. cb's fields are inspected for struct tags "buildarg" key. The value for buildarg tag should be a valid text template. Build applies executes the template using the value of the field or each element of the value of the field if the field is a slice or an array. An argument split tag, "\x00", can be used to denote separation of elements of the args array within any single parameter specification. Template functions can be provided via funcs.
Four convenience functions are provided:
args Joins %v representation of elements of an array, slice or map, or reference to any of these, using split tag as a separator. Otherwise it returns the %v representation of the underlying value. join Joins %v representation of elements of an array, slice or map, or reference to any of these, using the the value of the first argument as a separator. Otherwise it returns the %v representation of the underlying value. mprintf Applies fmt.Sprintf, given a format string, to a value or each element of an array, slice or map, or reference to any of these. quote Wraps in quotes a value or each element of an array, slice or map, or reference to any of these. split Includes a split tag in a pipeline. Note that args, join, mprintf and quote will return randomly ordered arguments if a map is used as a template input.
Types ¶
type CommandBuilder ¶
CommandBuilder is an interface that assembles a set of command line arguments, and creates an *exec.Cmd that can run the command. The method BuildCommand is responsible for handling set up of redirections and parameter sanity checking if required.
Directories ¶
Path | Synopsis |
---|---|
Package kmeans implements interaction with the kmeans clustering tool.
|
Package kmeans implements interaction with the kmeans clustering tool. |
Package last implements interaction with the last alignment tool.
|
Package last implements interaction with the last alignment tool. |
Package mafft implements interaction with the MAFFT multiple alignment tool.
|
Package mafft implements interaction with the MAFFT multiple alignment tool. |
Package muscle implements interaction with the MUSCLE multiple alignment tool.
|
Package muscle implements interaction with the MUSCLE multiple alignment tool. |