Documentation ¶
Index ¶
- Constants
- func GetReader(inputfile string) (*os.File, *bufio.Reader, error)
- func OpenFile(inputfile string) (*os.File, error)
- func ReadMultiTrees(reader *bufio.Reader, format int) <-chan tree.Trees
- func ReadTree(inputfile string, format int) (*tree.Tree, error)
- func ReadTreeReader(reader *bufio.Reader, format int) (*tree.Tree, error)
- func ReadUntilSemiColon(r *bufio.Reader) (string, error)
- func Readln(r *bufio.Reader) (string, error)
Constants ¶
const ( FORMAT_NEWICK = iota FORMAT_NEXUS FORMAT_PHYLOXML )
Variables ¶
This section is empty.
Functions ¶
func GetReader ¶ added in v0.1.10
Returns the opened file and a buffered reader (gzip or not) for the file
func ReadMultiTrees ¶ added in v0.2.0
Read a bunch of trees from the input reader and send each of them to the output channel this function does not close the reader, but closes the channel at the end of the reading. It returns almost immediately because parsing is performed in a go routine. Iterating over the tree channel will synchronize computations. If an error occures while parsing, it stops parsing and sends a nil tree with the error in the channel Different parsing formats: utils.FORMAT_NEWICK or utils.FORMAT_NEXUS
func ReadTreeReader ¶ added in v0.2.0
Reads one tree from the input reader this function does not close the reader May take several formats: newick or nexus In both case, takes the first tree in the file.
func ReadUntilSemiColon ¶ added in v0.1.1
ReadUntilSemiColon returns a string (without the ending \n) from the input buffered reader, ending at ';' or at end of file It allows to read a newick tree on several lines An error is returned iff there is an error with the buffered reader.
Types ¶
This section is empty.