Generates a distance phylogeny from a distance object using the Fitch-Margoliash algorithm in Phylip.
gl.tree.fitch(
D,
x = NULL,
phylip.path,
out.path = tempdir(),
tree.method = "FM",
outgroup = NULL,
global.rearrange = FALSE,
randomize = FALSE,
n.jumble = 9,
bstrap = 1,
plot.type = "phylogram",
bstrap.threshold = 0.8,
branch.width = 2,
branch.color = "blue",
node.label.color = "red",
terminal.label.cex = 0.8,
node.label.cex = 0.8,
offset = 1.2,
verbose = NULL
)
The tree file in newick format.
Name of the distance matrix for tree building [required]
Name of the genlight object containing the SNP data [required for bootstrapping, default NULL].
Path to the directory that holds the Phylip executables [required].
Path to the directory to save files produced by the analysis [default tempdir()]
Algorithm used for constructing trees and selecting the best tree [default "FM"]
Name of the outgroup taxon [default NULL, no outgroup, tree not rooted]
If TRUE, undertake global rearrangements when generating the tree [default FALSE].
If TRUE, randomize the order of the input taxa [default FALSE].
Number of randomizations of the input order, must be odd [default 9]
Number of bootstrap replicates [default 1000]
One of 'phylogram','cladogram','unrooted','fan','tidy','radial' [default "phylogram"]
Threshold for bootstrap values to be displayed on the tree [default 0.8]
Width of the branches [default 2]
Colour of the branches [default "blue"]
Colour of the node labels [default "red"]
Height of the taxon label text [default 0.8]
Height of the node label text [default 0.8]
Horizontal offset of the node labels from the node [default 1.8]
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2, unless specified using gl.set.verbosity].
Custodian: Arthur Georges -- Post to https://groups.google.com/d/forum/dartr
The script takes a distance object as input. This distance object is typically created with gl.dist.phylo(). The script then creates a file consistent with what is expected by program fitch in the Phylip suite of executables. It then runs fitch to generate the "best" phylogenetic tree. Program fitch is run again with bstrap replicates to generate bootstrap support for each node in the tree and plots these on the tree.
tree.method : Currently only Fitch-Margoliash is implemented.
outgroup : Name the taxon to be used as outgroup. Must be among the names of the populations defined in the genlight object.
Other phylogeny:
gl.dist.phylo()
if (FALSE) {
tmp <- gl.filter.monomorphs(testset.gl)
D <- gl.dist.phylo(testset.gl,subst.model="F81")
gl.phylip(D=D,x=tmp,phylip.path="D:/workspace/R/phylip-3.695/exe",plot.type="unrooted",
node.label.cex=0.5,terminal.label.cex=0.6,global.rearrange = FALSE, bstrap=10)
}
Run the code above in your browser using DataLab