genTrees: Generate permuted trees using rNNI or rtree, and check for...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/genTrees.R

Description

This function generates a specified number of trees by permutation or random generation, then checks to make sure that they are unique before returning the original tree plus the generated trees

Usage

1
2
genTrees(x, N = 200, filebase = "trial", method = c("nni", "random"),
         maxmoves = 2, perms = "DEFAULT", software = c("raxml"), ...)

Arguments

x

an object of class "phylo"

N

number of new trees to return

filebase

base name of the file to which trees will be written

method

method of generating the trees, either nearest neighbor interchange (nni) or random

maxmoves

maximum number nni moves

perms

number of permutations per nni stratum; defaults to the number of single-step nni trees, then the remainder of N divided by the number of nni strata requested (negatives not allowed)

software

not currently used; in an earlier version, would write out analysis file for PAUP or RAxML

...

further arguments to be passed to rtree

Details

The main need for this function is to ensure that the trees you get back are unique... mainly just a wrapper to rNNI and rtree. perms defaults to:

c(length(nni(x)), max(1, as.integer(N - (length(nni(x))))))

Value

an object of class "multiPhylo"

Author(s)

Andrew Hipp

See Also

gen.RAD.loci.datasets, compare.all.trees

Examples

1
2
3
4
5
  data(oak.tree)
  out <- genTrees(oak.tree, N = 10, maxmoves = 2, perms = c(5, 5))
  plot(out[[1]]) # this is the tree you input
  plot(out[[2]]) # this is the first generated tree...
  plot(out[[11]]) # ... and this is the last generated tree.

RADami documentation built on May 30, 2017, 8:23 a.m.