SMARTree
Chaozhi Zheng
The functions of this package provide components for Metroplolis coupled Markov Chain Monte Carlo (MC3) simulations in the inference of Sequential Markov Ancestral Recombination Trees (SMARTree) from SNP data.
Definitions
nsq Number of sequences/chromsomes.
nbp Length of chromosomes in unit of base pair.
treels Local trees along chromosomes T(x), represented as a matrix. Column 1 is the location of change-point, column 2 is the interval tree after (including) the change-point, column 3 is the total branch length of the tree, and the last column (column 4) is the transition probability between subsequent trees.
snpls SNP data matrix. Column 1 is the location of SNP sites, column 2 is the alleles vector, column 3 is the vector of allele frequecy, and the last coclumn (column 4) is the log likelihood given the local tree.
theta The scaled mutation rate. theta = 4 Ne mu, where Ne is the effective population size and mu is the mutation rate per generation per bp.
rho The scaled recombiation rate. rho = 4 Ne r, where r is the recombation rate per generation per bp.
epsilon The probability of an allelic typing error.
chainstate The state of a MCMC chain consists of inverse temperature, log (full posterior), {theta, epsilon, rho}, treels, adpaptive parameters, snpls}.
mcstate The matrix of chainstates, and the element (mcstate)ij is the chainstate for the jth chain of the ith group.
    
SMARTree Sampler
initializeSMARTchain initializes parameters for one MCMC chain
updateSMARTchain updates chainstate for one MCMC chain
swapSMARTchain swaps temperatures of two random chosen chains in a group.
permuteSMARTchain permute temperaures of all chain of a group.
saveSMARTchain save mcstate for all the chains.
Likelihood
TreeLogPriorProb Log prior probability of the tree at first site.
TreeLogLikelihood Log likelihood of SNP data given local trees.
PolymorphicProb The probablity that the number of minor alleles ≥2.
TreeTransitionProb Transition probability between two trees of distance ≤ 1.
TreeTransitionTypeI Transtion type of two trees given their distance ≤ 1.
TreeTransitionTypeII Transtion type of two trees given their distance ≤ 2.