phybin-0.3: Utility for clustering phylogenetic trees in Newick format based on Robinson-Foulds distance.

Safe HaskellNone

Bio.Phylogeny.PhyBin.Parser

Synopsis

Documentation

newick_parser :: NameHack -> Parser TempTreeSource

This parser ASSUMES that whitespace has been prefiltered from the input.

parseNewick :: LabelTable -> NameHack -> String -> ByteString -> (LabelTable, [NewickTree DefDecor])Source

Parse a bytestring into a NewickTree with branch lengths. The first argument is file from which the data came and is just for better error messages.

If the single bytestring contains more than one tree, then a number is appended to the tree names.

parseNewicks :: NameHack -> [(String, ByteString)] -> (LabelTable, [FullTree DefDecor])Source

A version which takes in-memory trees as ByteStrings.

parseNewickFiles :: NameHack -> [String] -> IO (LabelTable, [FullTree DefDecor])Source

Parse a list of trees, starting with an empty map of labels and accumulating a final map.