elynx-tree-0.5.0.2: Handle phylogenetic trees
Copyright(c) Dominik Schrempf 2020
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Tree.Import.Newick

Description

Creation date: Thu Jan 17 14:56:27 2019.

Some functions are inspired by Biobase.Newick.Import.

Specifications

In particular, no conversion from _ to (space) is done right now.

For a description of rooted Trees, please see the Rooted

Code snippet:

import Data.Attoparsec.ByteString
import ELynx.Tree

getOneNewick = either error id . parseOnly (oneNewick Standard)
Synopsis

Documentation

data NewickFormat Source #

Newick tree format.

>>> unlines $ map (("- " <>) . description) (allValues :: [NewickFormat])
- 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 is provided in square brackets after node names as well as branch lengths. XXX: Key value pairs are ignored at the moment.

Constructors

Standard 
IqTree 
RevBayes 

Instances

Instances details
Bounded NewickFormat Source # 
Instance details

Defined in ELynx.Tree.Import.Newick

Enum NewickFormat Source # 
Instance details

Defined in ELynx.Tree.Import.Newick

Eq NewickFormat Source # 
Instance details

Defined in ELynx.Tree.Import.Newick

Read NewickFormat Source # 
Instance details

Defined in ELynx.Tree.Import.Newick

Show NewickFormat Source # 
Instance details

Defined in ELynx.Tree.Import.Newick

Generic NewickFormat Source # 
Instance details

Defined in ELynx.Tree.Import.Newick

Associated Types

type Rep NewickFormat :: Type -> Type #

ToJSON NewickFormat Source # 
Instance details

Defined in ELynx.Tree.Import.Newick

FromJSON NewickFormat Source # 
Instance details

Defined in ELynx.Tree.Import.Newick

type Rep NewickFormat Source # 
Instance details

Defined in ELynx.Tree.Import.Newick

type Rep NewickFormat = D1 ('MetaData "NewickFormat" "ELynx.Tree.Import.Newick" "elynx-tree-0.5.0.2-GziknJIwzW98btoIzMRbOK" 'False) (C1 ('MetaCons "Standard" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IqTree" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RevBayes" 'PrefixI 'False) (U1 :: Type -> Type)))

describeNewickFormat :: NewickFormat -> String Source #

Short description of the supported Newick formats.

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.

someNewick :: NewickFormat -> Parser (Forest Phylo Name) Source #

One or more Newick trees parser.