rbeauti: XML Input Files for BEAST

View source: R/rbeauti.R

rbeautiR Documentation

XML Input Files for BEAST

Description

Prepare XML files for BEAST with R. BEAST uses an MCMC approach to estimate rooted phylogenies from molecular data (Drummond & Rambaut, 2007).

Usage

rbeauti(
  ...,
  file,
  template = "standard",
  link.clocks = TRUE,
  link.trees = TRUE,
  subst.model,
  clock,
  tree,
  taxonset,
  chain.length = 1e+07,
  log.every = 1000
)

Arguments

...

One or more object(s) of class DNAbin.

file

A connection, or a character string naming the file to write to. If left empty the XML tree will be printed to the screen (see Examples).

template

Currently unused.

link.clocks

Logical, indicating if clock models should be linked over partitions.

link.trees

Logical, indicating if tree models should be linked over partitions.

subst.model

A character string defining a substituion model, either "JC69", "HKY","TN93", or "GTR".

clock

A character string defining a clock model, either "Strict Clock", "Relaxed Clock Exponential","Relaxed Clock Log Normal", or "Random Local Clock".

tree

A character string defining a tree model.

taxonset

A list containing one or more taxon sets.

chain.length

Integer, the number of generations to run the MCMC.

log.every

Integer, defining how often samples from the posterior will be written to log files and shown on screen.

Details

rbeauti has been completely rewritten to work with BEAST 2. Currently rbeauti offers few options, because the idea is not to create ready-to-use XML file. That can be done conveniently with BEAUti (the BEAST package's genuine XML generator). Instead, rbeauti is intended to make the definition of large numbers of taxon sets easy. The creation of taxon sets can be done via R scripts and the resulting XML files can be further modified with BEAUti.

References

The XML reference at the BEAST 2 website: http://beast.community/xml_reference Drummond, A.J. & A. Rambaut. 2007. BEAST: Bayesian evolutionary analysis by sampling trees. BMC Evolutionary Biology 7: 240.

See Also

read.beast, read.beast.table

Examples

data(ips.16S)

## define taxon sets
spec <- rownames(ips.16S)
ingroup <- spec[grep("Ips|Orthomotomicus", spec)]
outgroup <- spec[grep("Pityogenes", spec)]
ts <- list(list(id = "ingroup", taxon = ingroup),
           list(id = "outgroup", taxon = outgroup))

## print XML file to screen
# rbeauti(ips.16S, taxonset = ts)

heibl/ips documentation built on April 24, 2024, 3:19 a.m.