Learn R Programming

ips (version 0.0.11)

rbeauti: XML Input Files for BEAST

Description

This function is intended to 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", taxonset)

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.

taxonset

A list containing one or more taxon sets.

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 BEAST 2 website: http://beast.bio.ed.ac.uk/BEAST_v1.5.x_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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab