ctlMCMCtree | R Documentation |
Function that outputs the control file to run MCMCtree. It can be used to run only with morphological data or morphological+molecular data (more than one partition in the alignment file) together.
ctlMCMCtree(
filename,
mol = FALSE,
seed = -1,
seqfile,
treefile,
mcmcfile = "mcmc.txt",
outfile = "out.txt",
ndata,
seqtype = 0,
usedata = 1,
clock,
RootAge,
TipDate,
alpha,
ncatG,
cleandata = 0,
BDparas,
kappa_gamma,
alpha_gamma,
rgene_gamma,
sigma2_gamma,
print = 2,
burnin,
sampfreq,
nsample,
model
)
filename |
Character, name for the output control file. |
mol |
Boolean, TRUE if you include molecular data, FALSE otherwise. Default = FALSE. |
seed |
Numeric, seed value. Default = -1 (assigns random seed using computer's current time). |
seqfile |
Character, path to the alignment file. |
treefile |
Character, path to the tree file. |
mcmcfile |
Character, path to the file with the report of MCMC runs. By default it generates a file called "mcmc.txt" in the directory where MCMCtree is run. |
outfile |
Character, path to the summary results file. By default it generates a file called "out.txt" in the directory where MCMCtree is run. |
ndata |
Numeric, number of partitions in the alignment file. |
seqtype |
Numeric, 0 for nucleotide sequences, 1 for codon sequences, and 2 for amino acid sequences. Default = 0. |
usedata |
Numeric, 1: Calculate the likelihood function in the normal way, 0: Likelihood is not calculated (likelihood = 1), 2 and 3: approximate likelihood calculation and ML estimation of branch lengths (see details). Default = 1. |
clock |
Numeric, 1: strict clock model, 2: independent rates model, 3: autocorrelated rates model (see details). |
RootAge |
Character, calibration for the root. |
TipDate |
Numeric, time unit to scale the estimated divergence times. See details. |
alpha |
Numeric, alpha value for the discrete-gamma model of rate variation. Only used if molecular data is available. |
ncatG |
Numeric, number of categories for the discrete-gamma model of rate variation. Only used if molecular data is available. |
cleandata |
Numeric, 0: alignment gaps and ambiguity characters are treated as missing data, 1: any site where at least one sequences has an alignment gap or ambiguity character is deleted (see details). Default = 0. |
BDparas |
Numeric, vector with the parameters controlling the birth-death-sequential-sampling (BDSS) process (see details). |
kappa_gamma |
Numeric, vector with the parameters for the substitution model parameter kappa (transition/transversion rate ratio). Only used if molecular data is available. |
alpha_gamma |
Numeric, vector with the parameters for the substitution model parameter gamma (gamma shape parameter for variable rates among sites). Only used if molecular data is available. |
rgene_gamma |
Numeric, vector with the parameters for the Dirichlet-gamma prior for the mean substitution rate (see details). |
sigma2_gamma |
Numeric, vector with the parameters for the Dirichlet-gamma prior for the rate drift parameter (see details). |
print |
Numeric, 0: results are printed to screen only, 1: MCMC is written to "mcmcfile" and the summary to the "outfile", 2: same as 1 but rates for branches for each partitions are appended to "outfile". Default = 2. |
burnin |
Numeric, number of iterations to be discarded (burn-in). |
sampfreq |
Numeric, number of iterations after which a sample will be collected. |
nsample |
Numeric, number of samples to be gathered. |
model |
Numeric, substitution model to be used (see details). 0:JC69, 1:K80, 2:F81, 3:F84, 4:HKY85, 5:T92, 6:TN93, 7:REV, 8:UNREST, 9:REVu; 10:UNRESTu. Only used if molecular data is available. |
For more information, please check the MCMCtree tutorial and the PAML documentation.
# First create objects with the path to alignment and tree files and then
# call the function to generate the control file. The parameters not passed
# to the function are used as the default values
tree <- system.file( "extdata", "19s.trees", package = "morpho")
aln <- system.file( "extdata", "seqfile.aln", package = "morpho")
# Uncomment the following lines followed by "##" and change the path in the filename so
# it is saved where you want
##ctlMCMCtree( filename = "../mcmctree.ctl", mol = FALSE, seqfile = aln, treefile = tree,
##ndata = 1, clock = 2, TipDate = 1, RootAge = c("B(37.3, 66.0, 0.025, 0.025)"),
##BDparas = c( 1, 1, 0, 0.001 ), rgene_gamma = c( 2, 5 ),
##sigma2_gamma = c( 2, 2 ), burnin = 50000, sampfreq = 50, nsample = 20000 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.