# The default arguments in DiscML are:
# model = "ER"
# reversible = FALSE
# alpha = FALSE
# rootprobability = FALSE
x<- c(1,2,1,0,1)
phy <- rtree(length(x))
# x is a vector with 5 elements, and phy is a randomly generated
# 5-taxon tree (using rtree from the 'ape' package).
DiscML(x, phy)
# x here is a matrix
x <- matrix(c(1,2,0,2,1,0),2,3, byrow = TRUE)
# phy is a randomly generated tree containing 3 tips.
phy <- rtree(3)
# a symmetric rate transition matrix is used in the estimation.
DiscML(x, phy, model = "SYM")
# the prior root probabilities will be estimated.
DiscML(x, phy, rootprobability = TRUE)
# the prior root probabilities are fixed to be 1/16, 5/16, and 10/16.
DiscML(x, phy, rootprobability = c(1/16,5/16,10/16))
# the alpha value in a gamma distribution will be estimated.
DiscML(x, phy, alpha = TRUE)
# DiscML allows the reversibility for the symmetric matrices, e.g., ER, SYM..
DiscML(x, phy, rootprobability = TRUE, reversible = TRUE)
# DiscML can convert all non-zero character states to be '1's to perform
# binary analysis.
DiscML(x, phy, simplify = TRUE)
# DiscML can compute for each gene family of 'x' individually,
DiscML(x, phy, individualrates = TRUE)
# this is equivalent to:
# phy <- "(A$mu2:0.1,(B$mu0:0.3,C$mu1:0.4)$mu2:0.5);"
phy <- "(A$mu2:0.1,(B:0.3,C$mu1:0.4)$mu2:0.5);"
# DiscML can optimize different mu's for each branches.
DiscML(x, phy)
# DiscML can plot each mu vs Gene families when individualrates =TRUE.
DiscML(x, phy, individualrates = TRUE, plotmu = TRUE)
Run the code above in your browser using DataLab