generateControlFile {BAMMtools} | R Documentation |
Generate control file for BAMM
Description
Generates a template diversification or trait control file
for BAMM
, while allowing the user to specify parameter values.
Usage
generateControlFile(
file = "controlfile.txt",
type = "diversification",
params = NULL
)
Arguments
file |
Destination file name with or without path. |
type |
Character, either “ |
params |
List of parameters, see |
Details
The user can supply parameters as a list, where the name of the list item is the name of the parameter as it appears in the control file, and the value of the list item is what will be placed in the contol file.
If a parameter is specified by the user, it will automatically be uncommented if it was commented in the template.
Author(s)
Pascal Title
References
Examples
## Not run:
#Produce a blank template control file
generateControlFile(file = 'traitcontrol.txt', type='trait')
#Produce a customized control file
data(whales)
#get bamm priors to supply to control file
priors <- setBAMMpriors(whales, outfile = NULL)
generateControlFile(file = 'divcontrol.txt', params = list(
treefile = 'whales.tre',
globalSamplingFraction = '1',
numberOfGenerations = '100000',
overwrite = '1',
lambdaInitPrior = as.numeric(priors['lambdaInitPrior']),
lambdaShiftPrior = as.numeric(priors['lambdaShiftPrior']),
muInitPrior = as.numeric(priors['muInitPrior']),
expectedNumberOfShifts = '1'))
## End(Not run)
[Package BAMMtools version 2.1.11 Index]