bvtreeToNewick: Convert 'bvtree' to Newick Tree Format

View source: R/conversions.R

bvtreeToNewickR Documentation

Convert bvtree to Newick Tree Format

Description

Recursively converts bvtree to Newick tree format for compatibility with other downstream packages. The output format named leafs with distances that correspond to coalescent times. Additionally, clades have the total tree length explicitly (versus the acceptable Newick shorthand without total length).

Usage

bvtreeToNewick(bvtree, tlim = 10)

Arguments

bvtree

S3 class; internal class for the polySimIBD: package bvtree

tlim

numeric; the maximum number of generations to consider before exiting gracefully if all samples have not coalesced

Details

Note, the overall time to the most recent common ancestor (TMRCA) is set to the tlim, which in Newick format looks inappropriately rooted.

Note, the function does not "know" the original tlim that was specified in the forward-simulation, and thus must be re-stated by the user.

Value

Newick String


nickbrazeau/polySimIBD documentation built on Sept. 26, 2024, 5:29 p.m.