RandomDates: randomize dates among tips in the BEAST input file

Description Usage Arguments Details Value References Examples

Description

This function read an XML file (BEAST version 1), randomize dates among all tips and produce a new XML input file with such randomization. The process is repeated up to the number of replicates (default is 20).

Usage

1
RandomDates(name, reps = 20, writeTrees = T)

Arguments

name

The name of the original XML-formatted input file on which to apply the date-randomization procedure. Quote the name ("example"). The .xml extension should not be included.

reps

The number of repetions required by the user. There will be as many date-randomized datasets produced as the value of reps (default = 20).

writeTrees

Set to False (F) if you do not want the trees to be written when running the date-randomized datasets in BEAST. To make the DRT, only the log files are needed (default = T).

Details

The function works only with a .xml file generated with BEAUti

Value

The function returns one or many files (the number is set by the "reps" argument; default is 20) In each new file, the date values are randomized among all tips.

References

Rieux A & Khatchikian, C. Unpublished. Drummond AJ, Suchard MA, Xie D & Rambaut A (2012) Bayesian phylogenetics with BEAUti and the BEAST 1.7 Molecular Biology And Evolution 29: 1969-1973.

Examples

1
2
3
4
5
6
7
## Not run: 
    # using the example files "Flu-BEAST-1.8.xml" found in example folder.
	# example file can be found in the example folder
	RandomDates("Flu-BEAST-1.8", reps = 20, writeTrees = F)
	# produce 20 replicate input files (.xml) in working directory

## End(Not run)


Search within the TipDatingBeast package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.