Phy2Sky: Phy2Sky

Description Usage Arguments Author(s) Examples

Description

Converts a (multi)Phylo object to a series of skylines

For a set of unrooted trees, remove the burnin trees and root the rest at

the root.node. Limit the total number of output trees to be less than max.trees

Robust to trees with tips sampled at different times

Can be directly applied to BEAST or MrBayes output, or files can be directly parsed by argument

Usage

1
2
3
4
5
Phy2Sky(trees, output_type = c("list", "matrices", "master", "conf.int",
  "conf.int.plot"), file_type = "nex", package = NULL, outgroup = NULL,
  param.file.name = NULL, burninfrac = 0, max.trees = 1000,
  fixToDate = F, Date_FUN = Date_FUN, timeForwards = F, scaling = 1,
  plot_type = "step", epsilon = 0, x_lab = "Time", ...)

Arguments

trees

Either a character string specifying the path to the tree file, or a multiPhylo object

output_type

list (a list of skyline objects)

output_type

matrices (two matrices, each with a column for each tree and a row for each coalescent event in the tree. One matrix specifies the population size and one specifies the time at the end of the interval)

output_type

master (a master table with the rows being every unique time point across all trees, with time specified in the row name, and each column is a different tree)

output_type

conf.int (a matrix with each row being each unique event time and the columns being the 50th, 2.5th and 97.5th percentiles respectively)

output_type

conf.int.plot (outputs the conf.int table but also plots them)

file_type:

the format of the tree file

package:

what package has been used to create the param file (BEAST, MrBayes)

outgroup:

specify if the tree should be re-rooted at this node and then this node removed.

param.file.name:

if there is a parameter output file, specify it here so the clock rate can be fetched

burninfrac:

what proportion of trees should be discarded from the multiPhylo object

max.trees:

the maximum number of trees which will be sampled. If more exist, they are taken from the total at regular intervals.

fixToDate:

if true, the times in the skyline will be linked directly to dates given in the tree name.

DateFUN:

a function for recovering dates from the tip labels in the tree e.g. function(label) gsub(".*_([.0-9]+)","\1",label)

timeForward:

if TRUE the times of coalescent events wil be specified forwards, otherwise backwards.

scaling:

a scaling factor for the branch lengths, if the branch lengths are not on the same scale as time.

plot_type:

choose between "step", where adjacent points on the skyline are joined by a vertical and a horizontal line, and "linear", where adjacent points on the skyline are joined by a single sloping straight line.

Author(s)

Lucy Mengqi Li <mengqi.li09@imperial.ac.uk>, adapted by George Shirreff <georgeshirreff@gmail.com>

Examples

1
library(ape)

georgeshirreff/multiNe documentation built on May 17, 2019, 1:15 a.m.