## Finding ML Trees in R install.packages('ape', repos='http://cran.wustl.edu/') install.packages('phangorn', repos='http://cran.wustl.edu/') library(ape) library(phangorn) data<- read.dna('PrimateData.fasta.txt', format="fasta") nj_tree<- nj(dist.dna(data, model="TN93", gamma=1)) initial_fit <- pml(nj_tree, as.phyDat(data)) fitGTR <- optim.pml(initial_fit, optNni=TRUE, optGamma=TRUE, optInv=TRUE, model="GTR") attributes(fitGTR) plot(fitGTR$tree) ## READING In and Ploting PhyML output ## apes<- "((M_sylvanus:0.08076373,(M_fascicul:0.06368886,(M_mulatta:0.02534877,Macacafusc:0.01832417)97:0.03810797)93:0.04883620)100:0.26272551,(Saimiri_sc:0.47880650,(Tarsius_sy:0.52272112,Lemurcatta:0.35909584)99:0.27603200)99:0.11265468,(Hylobates:0.18870720,(Pongo:0.15228348,(Gorilla:0.06721971,(Homosapien:0.05495056,Pan:0.06771191)87:0.02740879)100:0.08496889)97:0.04912443)100:0.12058326);" ape_tree<-read.tree(text=apes) plot(ape_tree, show.node.label=TRUE)