Copyright | (c) Dominik Schrempf 2021 |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Creation date: Thu Jan 17 14:56:27 2019.
Some functions are inspired by Biobase.Newick.Import.
In particular, no conversion from _ to (space) is done right now.
Synopsis
- data NewickFormat
- newick :: NewickFormat -> Parser (Tree Phylo Name)
- oneNewick :: NewickFormat -> Parser (Tree Phylo Name)
- parseOneNewick :: NewickFormat -> ByteString -> Either String (Tree Phylo Name)
- readOneNewick :: NewickFormat -> FilePath -> IO (Tree Phylo Name)
- someNewick :: NewickFormat -> Parser (Forest Phylo Name)
- parseSomeNewick :: NewickFormat -> ByteString -> Either String [Tree Phylo Name]
- readSomeNewick :: NewickFormat -> FilePath -> IO [Tree Phylo Name]
Documentation
data NewickFormat Source #
Newick tree format.
- Standard: Branch support values are stored in square brackets after branch lengths.
- IqTree: Branch support values are stored as node names after the closing bracket of forests.
- RevBayes: Key-value pairs are provided in square brackets after node names as well as branch lengths. NOTE: Key value pairs are ignored.
Instances
newick :: NewickFormat -> Parser (Tree Phylo Name) Source #
Newick tree parser. Also succeeds when more trees follow.
oneNewick :: NewickFormat -> Parser (Tree Phylo Name) Source #
One Newick tree parser. Fails when end of input is not reached.
parseOneNewick :: NewickFormat -> ByteString -> Either String (Tree Phylo Name) Source #
See oneNewick
.
readOneNewick :: NewickFormat -> FilePath -> IO (Tree Phylo Name) Source #
someNewick :: NewickFormat -> Parser (Forest Phylo Name) Source #
One or more Newick trees parser.
parseSomeNewick :: NewickFormat -> ByteString -> Either String [Tree Phylo Name] Source #
See someNewick
.
readSomeNewick :: NewickFormat -> FilePath -> IO [Tree Phylo Name] Source #
See someNewick
; may fail with error
.